# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
150949 |
2019-09-01T12:49:01 Z |
JovanK26 |
Izlet (COI19_izlet) |
C++14 |
|
591 ms |
37932 KB |
#include <bits/stdc++.h>
using namespace std;
int n;
int mat[3001][3001];
int color[3001];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int sub;
cin >> sub;
if(sub==2)
{
cin >> n;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin >> mat[i][j];
}
}
int clr=1;
color[0]=1;
for(int i=1;i<n;i++)
{
bool chk=0;
for(int j=i-1;j>=0;j--)
{
if(mat[i][j]==i-j && color[j]!=color[j+1])
{
chk=1;
color[i]=color[j];
break;
}
}
if(!chk)
{
color[i]=++clr;
}
}
for(int i=0;i<n;i++)
{
cout << color[i]<<' ';
}
cout <<'\n';
for(int i=0;i<n-1;i++)
{
cout << i+1<<' '<<i+2<<'\n';
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
591 ms |
37932 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |