Submission #783333

# Submission time Handle Problem Language Result Execution time Memory
783333 2023-07-14T20:54:55 Z vh50 Newspapers (CEOI21_newspapers) C++17
0 / 100
1 ms 300 KB
#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

newspapers.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
3 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
4 Partially correct 1 ms 212 KB Failed to provide a successful strategy.
5 Partially correct 1 ms 300 KB Failed to provide a successful strategy.
6 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
7 Incorrect 0 ms 212 KB Output isn't correct
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
3 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
4 Partially correct 1 ms 212 KB Failed to provide a successful strategy.
5 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
6 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
7 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
8 Partially correct 1 ms 212 KB Failed to provide a successful strategy.
9 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
10 Incorrect 0 ms 212 KB Integer parameter [name=k] equals to 55, violates the range [1, 50]
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
3 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
4 Partially correct 1 ms 212 KB Failed to provide a successful strategy.
5 Partially correct 1 ms 300 KB Failed to provide a successful strategy.
6 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
7 Incorrect 0 ms 212 KB Output isn't correct
8 Halted 0 ms 0 KB -