Submission #884814

#TimeUsernameProblemLanguageResultExecution timeMemory
884814IsamLjeto (COCI21_ljeto)C++17
50 / 50
1 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; array<vector<int>, 9> A; for(register int i = 0, a, b, t; i < N; ++i){ cin >> t >> a >> b; if((a <= 4 && b <= 4) || (a > 4 && b > 4)) continue; A[a].emplace_back(t); } long long pinneapple(0), blueberry(0); for(register int i = 1; i <= 4; ++i){ pinneapple += 1ll * 100 * (int)A[i].size(); for(register int j = 1; j < (int)A[i].size(); ++j) if(A[i][j] - A[i][j-1] <= 10) pinneapple += 50; } for(register int i = 5; i <= 8; ++i){ blueberry += 1ll * 100 * (int)A[i].size(); for(register int j = 1; j < (int)A[i].size(); ++j) if(A[i][j] - A[i][j-1] <= 10) blueberry += 50; } cout << pinneapple << ' ' << blueberry << '\n'; return 0; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:16:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                   ^
Main.cpp:16:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                          ^
Main.cpp:16:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                             ^
Main.cpp:16:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   16 |  for(register int i = 0, a, b, t; i < N; ++i){
      |                                ^
Main.cpp:22:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   22 |  for(register int i = 1; i <= 4; ++i){
      |                   ^
Main.cpp:24:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   24 |   for(register int j = 1; j < (int)A[i].size(); ++j) if(A[i][j] - A[i][j-1] <= 10) pinneapple += 50;
      |                    ^
Main.cpp:26:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   26 |  for(register int i = 5; i <= 8; ++i){
      |                   ^
Main.cpp:28:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   28 |   for(register int j = 1; j < (int)A[i].size(); ++j) if(A[i][j] - A[i][j-1] <= 10) blueberry += 50;
      |                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...