Submission #501193
Source Code Expand
#include<stdio.h>
int main(void){
int n,h;
int k,l;
int a[2000][2000]={2};
int temp=0;
int tmp;
int ans=0;
int i,j,b,c;
scanf("%d",&n);
scanf("%d",&h);
for(i=0;i!=h;i++){
scanf("%d%d",&k,&l);
if((k+l)%2==0){a[k][l]=0;}else{a[k][l]=1;}
}
for(i=0;i!=n;i++){
for(j=0;j!=n;j++){
if(a[j][i]==0||a[j][i]==1){
for(b=i;i!=n;b++){
for(c=j+1;j<n;c++){
if(a[c][b]==0){
temp++;}
if(a[c][b]==1){temp--;}
if(temp<0){tmp=0-temp;}else{tmp=temp;}
if(ans<tmp){ans=tmp;}
}
}
}
temp=0;
}
}
printf("%d\n",temp);
return 0;}
Submission Info
| Submission Time | |
|---|---|
| Task | E - マス目色ぬり |
| User | unsepttrium |
| Language | C (GCC 4.9.2) |
| Score | 0 |
| Code Size | 991 Byte |
| Status | WA |
| Exec Time | 27 ms |
| Memory | 796 KiB |
Compile Error
./Main.c: In function ‘main’:
./Main.c:16:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
./Main.c:17:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&h);
^
./Main.c:19:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&k,&l);
^
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_0.txt, example_1.txt, example_2.txt |
| All | all_black_0.txt, all_black_1.txt, all_edge_0.txt, all_edge_1.txt, all_edge_2.txt, all_white_0.txt, all_white_1.txt, corner_0.txt, example_0.txt, example_1.txt, example_2.txt, maxrand_0.txt, maxrand_1.txt, maxrand_2.txt, maxrand_3.txt, maxrand_4.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, smallrand_0.txt, smallrand_1.txt, smallrand_2.txt, example_0.txt, example_1.txt, example_2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| all_black_0.txt | WA | 27 ms | 724 KiB |
| all_black_1.txt | WA | 24 ms | 788 KiB |
| all_edge_0.txt | WA | 25 ms | 784 KiB |
| all_edge_1.txt | WA | 24 ms | 788 KiB |
| all_edge_2.txt | WA | 26 ms | 788 KiB |
| all_white_0.txt | WA | 26 ms | 732 KiB |
| all_white_1.txt | WA | 26 ms | 784 KiB |
| corner_0.txt | WA | 26 ms | 764 KiB |
| example_0.txt | WA | 23 ms | 796 KiB |
| example_1.txt | WA | 27 ms | 796 KiB |
| example_2.txt | WA | 23 ms | 796 KiB |
| maxrand_0.txt | WA | 25 ms | 788 KiB |
| maxrand_1.txt | WA | 23 ms | 788 KiB |
| maxrand_2.txt | WA | 24 ms | 788 KiB |
| maxrand_3.txt | WA | 25 ms | 796 KiB |
| maxrand_4.txt | WA | 25 ms | 784 KiB |
| random_0.txt | WA | 23 ms | 796 KiB |
| random_1.txt | WA | 23 ms | 744 KiB |
| random_2.txt | WA | 25 ms | 796 KiB |
| random_3.txt | WA | 25 ms | 784 KiB |
| random_4.txt | WA | 25 ms | 792 KiB |
| smallrand_0.txt | WA | 25 ms | 776 KiB |
| smallrand_1.txt | WA | 25 ms | 788 KiB |
| smallrand_2.txt | WA | 24 ms | 792 KiB |