제출 #974579

#제출 시각아이디문제언어결과실행 시간메모리
974579vjudge1Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms436 KiB
// Source: https://usaco.guide/general/io #include <bits/stdc++.h> using namespace std; int main() { int temp[8], duck = 0, eagle = 0; memset(temp, 0, sizeof(temp)); int times; cin >> times; int arr[times][3]; for(int i = 0 ; i < times ; i++){ cin >> arr[i][0] >> arr[i][1] >> arr[i][2]; if(arr[i][0] - temp [arr[i][1] - 1] <= 10 && temp[arr[i][1] - 1] != 0){ if(1 <= arr[i][1] && arr[i][1] <= 4){ eagle += 150; } else{ duck += 150; } } else{ if(1 <= arr[i][1] && arr[i][1] <= 4){ eagle += 100; } else{ duck += 100; } } temp [arr[i][1] - 1] = arr[i][0]; } cout << eagle << " " << duck << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...