QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#358913 | #6376. LaLa and Lamp | ucup-team266 | WA | 1ms | 3672kb | C++23 | 1.3kb | 2024-03-20 08:30:46 | 2024-03-20 08:30:46 |
Judging History
answer
//Author: Kevin5307
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb push_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
namespace _kv_hash
{
const ull mask=std::chrono::steady_clock::now().time_since_epoch().count();
ull shift(ull x)
{
x^=mask;
x^=x<<13;
x^=x>>7;
x^=x<<17;
x^=mask;
return x;
}
}
using namespace _kv_hash;
int n;
char s[2020][2020];
pii rotate(int x,int y)
{
return mp(n+y-x,n+1-x);
}
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%s",s[i]+1);
for(int i=1;i<=n;i++)
for(int j=1;j<=i;j++)
{
int a=rotate(i,j).first,b=rotate(i,j).second;
int x=rotate(a,b).first,y=rotate(a,b).second;
int sum=(s[i][j]-'0')+(s[a][b]-'0')+(s[x][y]-'0');
if(sum%2)
die("No");
}
die("Yes");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3672kb
input:
6 0 00 000 0110 00100 000000
output:
No
result:
wrong answer expected YES, found NO