Submission #783273

# Submission time Handle Problem Language Result Execution time Memory
783273 2023-07-14T19:24:16 Z LucaGreg Newspapers (CEOI21_newspapers) C++17
0 / 100
1 ms 328 KB
 
#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

newspapers.cpp:16:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   16 | main()
      | ^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 328 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Partially correct 1 ms 320 KB Provide a successful but not optimal strategy.
5 Incorrect 1 ms 328 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Halted 0 ms 0 KB -