제출 #1206931

#제출 시각아이디문제언어결과실행 시간메모리
1206931FatonimLjeto (COCI21_ljeto)C++20
50 / 50
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; #ifdef ONPC #include "debug.h" #else #define dbg(...) #endif #define ll long long #define int long long #define ld long double #define pi pair<int, int> #define sz(a) ((int)(a.size())) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define sqr(n) ((n) * (n)) #define divup(a, b) (((a) + (b)-1) / (b)) #define popcount(n) __builtin_popcountll(n) #define clz(n) __builtin_clzll(n) #define Fixed(a) cout << fixed << setprecision(12) << a; template <class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; } template <class T> bool chmax(T& a, const T& b) { return b > a ? a = b, 1 : 0; } const int mod = 998244353; // 998244353 1e9 + 7 const ll inf = (ll)(1e18) + 7; const ld eps = 1e-9; const int B = 32; const int N = 1000 + 3; const int logn = 20; const int maxn = 2e5 + 7; /////////////////////////solve///////////////////////// void solve() { int n; cin >> n; vector<int> lst(8, -inf); int ans0 = 0, ans1 = 0; for (int i = 0; i < n; ++i) { int t, a, b; cin >> t >> a >> b; if (1 <= a && a <= 4) { ans0 += 100; if (t - lst[a] <= 10) { ans0 += 50; } } else { ans1 += 100; if (t - lst[a] <= 10) { ans1 += 50; } } lst[a] = t; } cout << ans0 << " " << ans1 << "\n"; } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifdef ONPC freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); freopen("error.txt", "w", stderr); #endif solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...