Submission #1204132

#TimeUsernameProblemLanguageResultExecution timeMemory
1204132cbnhtmanhLjeto (COCI21_ljeto)C++20
50 / 50
0 ms328 KiB
/* .=#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#=. .*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+ :%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% =%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# .+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= .*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%: :#%%%%%%%%%#=....-#:......-*%%*:......:**+++++++++++++#%%%#++++++++++++++%*+++++++++++++++%%%%%%#. -%%%%%%%%+:......+%#-.....:+#-......:*%#+++++++++++++++*%%*+++++++++++++*%+++++++++++++++*%%%%%%*. .=%%%%%%-.........#%%%-...+#-.......+%%%#+++++#####*+++++#%++++++########%%####*+++++#####%%%%%%%=. .*%%%%%%:........-%%%%%+-#=.......=%%%%%*+++++%%%%%#+++++%#+++++#%%%%%%%%%%%%%%++++++%%%%%%%%%%%%-. :#%%%%%%--*+.....+%%%%%%+........#%%%%%%++++++++++++++++%%*++++++++++++#%%%%%%%+++++*%%%%%%%%%%%#: .:%%%%%%%%%%=....:#%%%%+...........*%%%%#++++++++++++++++#%+++++++++++++#%%%%%%*+++++%%%%%%%%%%%%*: .-%%%%%%%%%#:....-%%%*..............=%%%++++++%%%%%%*++++**+++++#%%%%%%%%%%%%%%++++++%%%%%%%%%%%%+. .+%%%%%%%%%*.....+%#:......:*-.......=%#+++++*#####*+++++#*+++++########%%%%%%#+++++#%%%%%%%%%%%%=. .*%%%%%%%%%=....:+-.......+%%%+.......-#*+++++++++++++++##++++++++++++++*%%%%%*+++++%%%%%%%%%%%%%- .%%%%%%%%%%:............+%%%%%%#=.......#*+++++++++++*#%%#++++++++++++++#%%%%%*++++*%%%%%%%%%%%%#- -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#: +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*. #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%- +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*. .=#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#=. */ #include <bits/stdc++.h> #define fi(i, a, b) for( int i = a; i <= b; i++ ) #define fid(i, a, b) for( int i = a; i >= b; i-- ) #define getbit(x, i) ((x>>i)&1) #define ll long long #define pb push_back #define pii pair<int,int> #define pli pair<ll,int> #define pll pair<ll,ll> #define st first #define nd second #define mp make_pair #define HTManh "" #define maxn 100009 #define endl '\n' using namespace std; int test; int n; int tg[10]; int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); if (fopen(HTManh".inp", "r")) { freopen(HTManh".inp", "r", stdin); freopen(HTManh".out", "w", stdout); } cin >> n; fi(i,1,8) tg[i] = -1e9; ll diem1, diem2; diem1 = diem2 = 0; fi(i,1,n) { int t, a, b; cin >> t >> a >> b; if (a <= 4) diem1 += 100; else diem2 += 100; if (t - tg[a] <= 10) { if (a <= 4) diem1 += 50; else diem2 += 50; } tg[a] = t; } cout << diem1 << " " << diem2 << endl; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:53:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   53 |         freopen(HTManh".inp", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:54:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   54 |         freopen(HTManh".out", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...