Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author: 曹北健(37509)
- Result: AC Submission_id: 4242607
- Created at: Mon Mar 28 2022 21:51:26 GMT+0800 (China Standard Time)
- Problem: 5428 Time: 3 Memory: 1696
- */
- #include <stdio.h>
- int main(){
- char x;
- int ans[6] = { 0 }, n, a, b, i, j;
- scanf("%d", &n);
- while(~scanf("%x %c %x", &a, &x, &b)){
- if(x == '<'){
- ans[b - 0xa] += 1;
- }
- else{
- ans[a - 0xa] += 1;
- }
- }
- for(j = 4; j >= 0; j--){
- for(i = 0; i < n; i++){
- if(ans[i] == j){
- printf("%c:%d\n", i + 'A', j);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment