# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22577 | wim (#40) | Donut-shaped Enclosure (KRIII5_DE) | C++98 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
using namespace std;
typedef struct data {
int x, y;
int score;
}Data;
int main()
{
freopen("input.txt", "r", stdin);
setbuf(stdout, NULL);
int N, L, R;
cin >> N >> L >> R;
vector<Data> donut;
for (int i = 0; i < N; i++){
Data tmp;
cin >> tmp.x >> tmp.y >> tmp.score;
if(0 < tmp.score)
donut.push_back(tmp);
}
int sum = 0;
for (int i = 0; i < donut.size(); i++)
sum += donut[i].score;
cout << sum << endl;
return 0;
}