# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
91265 | Vardanyan | Chessboard (IZhO18_chessboard) | C++14 | 353 ms | 48872 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
const int N = 1000*100+5;
long long tox_type[N];
long long pref_type1[N];
long long pref_type2[N];
int X1[N],X2[N],Y1[N],Y2[N];
long long syun_pref_type[N];
int main()
{
int n,k;
scanf("%d%d",&n,&k);
for(int i = 1;i<=k;i++) scanf("%d%d%d%d",&X1[i],&Y1[i],&X2[i],&Y2[i]);
long long ans = 100000000000000005;
for(int w = 1;w<=n/2;w++){
if(n%w) continue;
memset(tox_type,0,sizeof tox_type);
memset(pref_type1,0,sizeof pref_type1);
memset(pref_type2,0,sizeof pref_type2);
memset(syun_pref_type,0,sizeof syun_pref_type);
for(int j = 1;j<=n;j++){
int x = (j-1)/w;
if(x%2 == 0){
// sev
tox_type[j] = 1;
syun_pref_type[j] = syun_pref_type[j-1]+1;
}
else{
// spitak
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |