제출 #974717

#제출 시각아이디문제언어결과실행 시간메모리
974717vjudge1Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms456 KiB
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") typedef long long ll; const ll INF = 1e9; const ll MOD = 1e9 + 7; const ll MAXN = 1e6 + 5; const ll LOG = 61; #define vll vector <ll> #define pll pair <ll, ll> #define fi first #define se second #define endl '\n' ll n, m; ll a [20]; ll ans [5]; void solve(){ cin >> n; for(ll i = 1; i <= n; i++){ ll b, x, y; cin >> b >> x >> y; bool ya = 0; if(x >= 5) ya = 1; ans[ya] += 100; if(a[x] && b-a[x] <= 10) ans[ya] += 50; a[x] = b; } cout << ans[0] << " " << ans[1] << endl; } int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // ll t; cin >> t; // while(t--){ solve(); // } } // 3 // 10 1 6 // 20 1 7 // 21 8 1 // 3 // 10 2 5 // 15 2 6 // 25 2 5 // 2 // 10 5 2 // 11 6 3 // 3 3 5 // 7 6 2 // 15 1 8 // 16 5 4 // 18 2 7 // 23 4 6 // 26 8 3 // 30 7 1 // 34 1 5 // 36 3 6
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...