C E F 题目质量挺高的
https://ac.nowcoder.com/acm/contest/43844/A
A-我会开摆
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<LL,LL> PII;
const LL MAXN=1e18,MINN=-MAXN,INF=0x3f3f3f3f;
const LL N=2e6+10,M=3023;
const LL mod=100000007;
const double PI=3.1415926535;
#define endl '\n'
char a[M][M];
int main()
{
//cin.tie(0); cout.tie(0); ios::sync_with_stdio(false);
LL T=1;
cin>>T;
while(T--)
{
for(int i=1;i<=4;i++)
{
for(int j=1;j<=4;j++)
{
cin>>a[i][j];
}
}
bool flag=false;
for(int i=1;i<=3;i++)
{
for(int j=1;j<=3;j++)
{
if(a[i][j]==a[i+1][j]&&a[i][j]==a[i][j+1]&&a[i][j]==a[i+1][j+1])
{
flag=true;
break;
}
}
}
if(flag==false) cout<<"No"<<endl;
else cout<<"Yes"<<endl;
}
return 0;
}
https://ac.nowcoder.com/acm/contest/43844/B
B-走廊的灯
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<LL,LL> PII;
const LL MAXN=1e18,MINN=-MAXN,INF=0x3f3f3f3f;
const LL N=2e6+10,M=3023;
const LL mod=100000007;
const double PI=3.1415926535;
#define endl '\n'
LL f[N];
int main()
{
//cin.tie(0); cout.tie(0); ios::sync_with_stdio(false);
LL T=1;
cin>>T;
while(T--)
{
LL n;
cin>>n;
string s;
cin>>s;
LL maxn=0;
LL sum=0;
for(int i=0;i<s.size();i++)
{
if(s[i]=='0'||s[i]=='2') sum++;
else if(s[i]=='1') sum=0;
maxn=max(maxn,sum);
}
sum=0;
for(int i=0;i<s.size();i++)
{
if(s[i]=='1'||s[i]=='2') sum++;
else if(s[i]=='0') sum=0;
maxn=max(maxn,sum);
}
cout<<maxn<<endl;
}
return 0;
}
https://ac.nowcoder.com/acm/contest/43844/C
C-输出练习
输入
4
1 10 2
2 4 5
19562 31702689720 17701
3680 37745933600 10
输出
1 2 4 8
None.
313325401
10000 100000 1000000 10000000 100000000 1000000000 10000000000
可以用这么暴力的方法我是没有想到的
标签:typedef,59,int,LL,cin,long,牛客,const,ABCDEF From: https://www.cnblogs.com/Vivian-0918/p/17277344.html
一整个吃惊