1 solutions
-
0
#include<bits/stdc++.h> using namespace std; int n,m,a,b,xz[110]; bool st[110][110],st2[110][14]; int main() { freopen("revegetate.in","r",stdin); freopen("revegetate.out","w",stdout); cin>>n>>m; for(int i=1;i<=m;i++) { cin>>a>>b; st[a][b]=st[b][a]=true; } for(int i=1;i<=n;i++) { for(int j=1;j<=i-1;j++) { if(st[i][j]) { st2[i][xz[j]]=true; } } for(int j=1;j<=4;j++) { if(!st2[i][j]) { xz[i]=j; cout<<j; break; } } } return 0; }
- 1
Information
- ID
- 775
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 10
- Tags
- # Submissions
- 5
- Accepted
- 3
- Uploaded By