厦门大学“网宿杯“17届程序设计竞赛决赛(同步赛)

A-这波啊,这波是……

签到题,照着输出就可

#include<bits/stdc++.h>
using namespace std;
int main()
{
    cout<<"roudancongji";
}

B-李在赣神魔

将矩阵顺时针旋转90度,就是把矩阵换个方向开始输出就行
把第一列从下到上当作第一行从左到右,其余列类似

#include<bits/stdc++.h>
using namespace std;
int n;
char tu[1005][1005];
int main()
{
    cin>>n;
    for(int i=0;i<n;i++)
        cin>>tu[i];
    for(int i=0;i<n;i++)
    {
        for(int j=n-1;j>=0;j--)
            cout<<tu[j][i];
        cout<<endl;
    }
}

电竞希金斯

ax+by+c=0
这题就是分类讨论。
分类情况代码中有,我就不重复了

#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main()
{
    cin>>a>>b>>c;
    if(a*b>0)
    {
        if(c==0)
            cout<<"2 4";
        else if(-b*c>0)
            cout<<"1 2 4";
        else
            cout<<"2 3 4";
    }
    else if(a*b<0)
    {
        if(c==0)
            cout<<"1 3";
        else if(-b*c>0)
            cout<<"1 2 3";
        else
            cout<<"1 3 4";
    }
    else if(a==0&&b==0)
    {
        if(c==0)
            cout<<"1 2 3 4";
        else cout<<"non";
    }
    else if(a==0)
    {
        if(c==0)cout<<"non";
        else if(b*c>0)cout<<"3 4";
        else cout<<"1 2";
    }
    else if(b==0)
    {
        if(c==0)cout<<"non";
        else if(a*c>0)cout<<"2 3";
        else cout<<"1 4";
    }
}
全部评论

相关推荐

2025-12-14 11:43
黑龙江大学 Java
用微笑面对困难:确实比较烂,可以这么修改:加上大学的qs排名,然后大学简介要写一些,然后硕士大学加大加粗,科研经历第一句话都写上在复旦大学时,主要负责xxxx,简历左上角把学校logo写上,建议用复旦大学的简历模板
点赞 评论 收藏
分享
01-11 08:47
门头沟学院 Java
羊村你懒哥1:如果不放毕业,我只能说导师是自己选的,错在你选了个垃圾导师,不在你实习
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务