Submission #889714

# Submission time Handle Problem Language Result Execution time Memory
889714 2023-12-20T05:58:19 Z Isam Prosjek (COCI14_prosjek) C++17
50 / 50
0 ms 452 KB
#include<bits/stdc++.h>

#ifdef DEBUG
  #include "debug.h"
#else
  #define debug(...) void(37)
#endif

using namespace std;

signed main(){
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int N;
	cin >> N;
	vector<int> A(N+1, 0), B(N+1, 0);
	for(register int i(1); i <= N; ++i) cin >> B[i], B[i] *= i;
	for(register int i = 1; i <= N; ++i){
		A[i] = B[i] - B[i-1];
	}
	for(register int i = 1; i <= N; ++i){
		cout << A[i] << ' ';
	}
	cout << '\n';
	return 0;
}

Compilation message

prosjek.cpp: In function 'int main()':
prosjek.cpp:16:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i(1); i <= N; ++i) cin >> B[i], B[i] *= i;
      |                   ^
prosjek.cpp:17:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   17 |  for(register int i = 1; i <= N; ++i){
      |                   ^
prosjek.cpp:20:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   20 |  for(register int i = 1; i <= N; ++i){
      |                   ^
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 452 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct