Submission #783331

#TimeUsernameProblemLanguageResultExecution timeMemory
783331vh50Newspapers (CEOI21_newspapers)C++17
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> #define int long long #define endl "\n" using namespace std; int n, m; main() { cin >> n >> m; cout << "YES" << endl; if(n == 1) {cout << 1 << endl << 1; return 0;} cout << (n * (n - 1))/2 << endl; for(int i = 1; i <= n; i++) { for(int j = 0; j < i; j++) cout << i << " "; } cout << endl; }

Compilation message (stderr)

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