Submission #884801

#TimeUsernameProblemLanguageResultExecution timeMemory
884801IsamLjeto (COCI21_ljeto)C++17
0 / 50
0 ms348 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); // ou } for(register int i = 1; i <= 8; ++i){ sort(A[i].begin(), A[i].end()); } long long pinneapple(0), blueberry(0); for(register int i = 1; i <= 4; ++i){ vector<int> tmp = A[i]; pinneapple += 1ll * (int)tmp.size() * 100; for(register int j = 1; j < (int)tmp.size(); ++j){ if(tmp[j] - tmp[j-1] >= 10) pinneapple += 50; } } for(register int i = 5; i <= 8; ++i){ vector<int> tmp = A[i]; blueberry += 1ll * (int)tmp.size() * 100; for(register int j = 1; j < (int)tmp.size(); ++j){ if(tmp[j] - tmp[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:21:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   21 |  for(register int i = 1; i <= 8; ++i){
      |                   ^
Main.cpp:25:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   25 |  for(register int i = 1; i <= 4; ++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)tmp.size(); ++j){
      |                    ^
Main.cpp:32:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   32 |  for(register int i = 5; i <= 8; ++i){
      |                   ^
Main.cpp:35:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   35 |   for(register int j = 1; j < (int)tmp.size(); ++j){
      |                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...