Submission #956596

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9565962024-04-02 08:11:15MrBrionixCostinland (info1cup19_costinland)C++17
100 / 100
1 ms600 KiB
#include<bits/stdc++.h>
using namespace std;
long long k,pos=0,tmp;
char mat[100][100];
void f1(){
for(int i=pos;i<pos+4;i++)for(int j=pos;j<pos+4;j++)mat[i][j]='X';
mat[pos+1][pos+2]=mat[pos+2][pos+1]=mat[pos+2][pos+2]='.';
for(int i=0;i<4;i++)mat[pos+4][pos+i]='r';
for(int i=0;i<4;i++)mat[pos+i][pos+4]='d';
if(tmp&1)mat[pos+4][pos]='X';
if(tmp&4)mat[pos+4][pos+1]='X';
if(tmp&8)mat[pos+4][pos+2]='X';
if(tmp&16)mat[pos+4][pos+3]='X';
if(tmp&2){
mat[pos][pos+4]='X';
mat[pos][pos+5]='X';
mat[pos+1][pos+5]='r';
}
}
void f2(){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

costinland.cpp: In function 'void f1()':
costinland.cpp:11:58: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   11 |     mat[pos+1][pos+2]=mat[pos+2][pos+1]=mat[pos+2][pos+2]='.';
      |                                         ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:11:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   11 |     mat[pos+1][pos+2]=mat[pos+2][pos+1]=mat[pos+2][pos+2]='.';
      |                       ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:11:22: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   11 |     mat[pos+1][pos+2]=mat[pos+2][pos+1]=mat[pos+2][pos+2]='.';
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:14:42: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   14 |     for(int i=0;i<4;i++)mat[pos+i][pos+4]='d';
      |                         ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:14:42: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   14 |     for(int i=0;i<4;i++)mat[pos+i][pos+4]='d';
      |                         ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:14:42: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   14 |     for(int i=0;i<4;i++)mat[pos+i][pos+4]='d';
      |                         ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:17:31: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   17 |     if(tmp&4)mat[pos+4][pos+1]='X';
      |              ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:18:31: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   18 |     if(tmp&8)mat[pos+4][pos+2]='X';
      |              ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:19:32: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   19 |     if(tmp&16)mat[pos+4][pos+3]='X';
      |               ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
costinland.cpp:24:26: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
   24 |         mat[pos+1][pos+5]='r';
      |         ~~~~~~~~~~~~~~~~~^~~~
costinland.cpp:5:6: note: at offset 0 to object 'mat' with size 10000 declared here
    5 | char mat[100][100];
      |      ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...