This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// 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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |