Submission #889714

#TimeUsernameProblemLanguageResultExecution timeMemory
889714IsamProsjek (COCI14_prosjek)C++17
50 / 50
0 ms452 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...