Submission #783273

#TimeUsernameProblemLanguageResultExecution timeMemory
783273LucaGregNewspapers (CEOI21_newspapers)C++17
0 / 100
1 ms328 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second #define int long long int const int INF = 2000000000000000000; const int mod = 1000000007; int grau[1010]; main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(0); int n, m; cin>>n>>m; for(int i=1;i<=m;i++){ int a, b; cin>>a>>b; } if(n==1){ cout<<"YES\n"; cout<<"1\n"; cout<<"1\n"; }else if(n==2){ cout<<"YES\n"; cout<<"2\n"; cout<<"1 1\n"; }else if(n==3){ cout<<"YES\n"; cout<<"2\n"; cout<<"2 2\n"; }else if(n==4){ cout<<"YES\n"; cout<<"5\n"; cout<<"2 3 2 2 3\n"; }else{ cout<<"NO\n"; } return 0; }

Compilation message (stderr)

newspapers.cpp:16:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   16 | main()
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...