Skip to content

Commit

Permalink
feat: add 10825 15641
Browse files Browse the repository at this point in the history
  • Loading branch information
owl1753 committed Aug 8, 2024
1 parent 51ba1c7 commit 387b5f6
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 33 deletions.
41 changes: 41 additions & 0 deletions 10000/10825.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

struct Score {
string name;
int korean;
int english;
int math;
};

Score students[100001];
int n;

bool cmp(Score a, Score b) {
if (a.korean == b.korean && a.english == b.english && a.math == b.math) {
return a.name < b.name;
}

if (a.korean == b.korean && a.english == b.english) {
return a.math > b.math;
}

if (a.korean == b.korean) {
return a.english < b.english;
}

return a.korean > b.korean;
}

int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> students[i].name >> students[i].korean >> students[i].english >> students[i].math;
}
sort(students, students + n, cmp);
for (int i = 0; i < n; i++) {
cout << students[i].name << "\n";
}
}
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,36 +42,36 @@

## 8월

| 날짜 | 대회 | 푼 문제 | 문제 유형 |
|:----:|------------------------------------------------------------------------------------------|:--------------------------------------------------:|:------:|
| 8/1 | [2016 Arab Collegiate Programming Contest](https://www.acmicpc.net/category/detail/2188) | [18691](https://www.acmicpc.net/problem/18691) | 수학 |
| 8/2 | | **_[1247](https://www.acmicpc.net/problem/1247)_** | 큰 수 연산 |
| 8/3 | | **_[2338](https://www.acmicpc.net/problem/2338)_** | 큰 수 연산 |
| 8/4 | [제1회 한국항공대학교 프로그래밍 경진대회(KAUPC)](https://www.acmicpc.net/category/detail/2838) | [23351](https://www.acmicpc.net/problem/23351) | 그리디 |
| 8/5 | | | |
| 8/6 | | | |
| 8/7 | | | |
| 8/8 | | | |
| 8/9 | | | |
| 8/10 | | | |
| 8/11 | | | |
| 8/12 | | | |
| 8/13 | | | |
| 8/14 | | | |
| 8/15 | | | |
| 8/16 | | | |
| 8/17 | | | |
| 8/18 | | | |
| 8/19 | | | |
| 8/20 | | | |
| 8/21 | | | |
| 8/22 | | | |
| 8/23 | | | |
| 8/24 | | | |
| 8/25 | | | |
| 8/26 | | | |
| 8/27 | | | |
| 8/28 | | | |
| 8/29 | | | |
| 8/30 | | | |
| 8/31 | | | |
| 날짜 | 대회 | 푼 문제 | 문제 유형 |
|:----:|:-------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------:|:---------:|
| 8/1 | [2016 Arab Collegiate Programming Contest](https://www.acmicpc.net/category/detail/2188) | [18691](https://www.acmicpc.net/problem/18691) | 수학 |
| 8/2 | | **_[1247](https://www.acmicpc.net/problem/1247)_** | 큰 수 연산 |
| 8/3 | | **_[2338](https://www.acmicpc.net/problem/2338)_** | 큰 수 연산 |
| 8/4 | [제1회 한국항공대학교 프로그래밍 경진대회(KAUPC)](https://www.acmicpc.net/category/detail/2838) | [23351](https://www.acmicpc.net/problem/23351) | 그리디 |
| 8/5 | | | |
| 8/6 | | | |
| 8/7 | [NCPC 2007](https://www.acmicpc.net/category/detail/214) [coci1314-5](https://www.acmicpc.net/category/detail/1230) | [5052](https://www.acmicpc.net/problem/5052) [9935](https://www.acmicpc.net/problem/9935) | 문자열 집합 스택 |
| 8/8 | | **_[10825](https://www.acmicpc.net/problem/10825)_** | 정렬 |
| 8/9 | | | |
| 8/10 | | | |
| 8/11 | | | |
| 8/12 | | | |
| 8/13 | | | |
| 8/14 | | | |
| 8/15 | | | |
| 8/16 | | | |
| 8/17 | | | |
| 8/18 | | | |
| 8/19 | | | |
| 8/20 | | | |
| 8/21 | | | |
| 8/22 | | | |
| 8/23 | | | |
| 8/24 | | | |
| 8/25 | | | |
| 8/26 | | | |
| 8/27 | | | |
| 8/28 | | | |
| 8/29 | | | |
| 8/30 | | | |
| 8/31 | | | |
1 change: 1 addition & 0 deletions 제1회 구데기컵/15641.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
70

0 comments on commit 387b5f6

Please sign in to comment.