# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159560 | geon040702 | 방 배정 (KOI16_aa) | C++14 | 5 ms | 392 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 <bits/stdc++.h>
using namespace std;
int Male[10], Female[10];
int student, full_room, ans;
int main(void)
{
int i, gender, grade;
scanf("%d %d", &student, &full_room);
for(i=0;i<student;i++) {
scanf("%d %d", &gender, &grade);
if(gender == 0) {
Female[grade]++;
}
else {
Male[grade]++;
}
}
for(i=1;i<=6;i++) {
ans += (Male[i] + full_room - 1) / full_room;
ans += (Female[i] + full_room - 1) / full_room;
}
printf("%d\n", ans);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |