Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 자바
- SQL
- 이분탐색
- BFS
- COS PRO
- 건강
- 문제해결
- MySQL
- oracle
- 코딩테스트
- DP
- 프로그래머스
- 운동기록
- 코테
- greedy
- 알고리즘
- SWEA
- binary search
- 문제풀이
- 백준
- 시뮬레이션
- 러닝일지
- Java
- 투포인터
- math
- dfs
- db
- 문자열
- priorityqueue
- BOJ
Archives
- Today
- Total
슈콩
[SWEA] 동철이의 프로그래밍 대회 본문


[문제]
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWjlFcGK3dMDFAVT
SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com
[소스 코드]
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
int T = Integer.parseInt(br.readLine());
for(int tc=1;tc<=T;tc++) {
st = new StringTokenizer(br.readLine());
int n = Integer.parseInt(st.nextToken());
int m = Integer.parseInt(st.nextToken());
int[] score = new int[n];
int max = 0;
for(int i=0;i<n;i++) {
st = new StringTokenizer(br.readLine());
for(int j=0;j<m;j++) {
score[i] += Integer.parseInt(st.nextToken());
}
max = Math.max(max, score[i]);
}
int result = 0;
for(int i=0;i<n;i++) {
if(score[i]==max) result++;
}
System.out.println("#"+tc+" "+result+" "+max);
}
}
}'Algorithms > SWEA' 카테고리의 다른 글
| [SWEA] 보충학습과 평균 (0) | 2025.11.19 |
|---|---|
| [SWEA] Digit sum (0) | 2025.11.18 |
| [SWEA] 두가지 빵의 딜레마 (0) | 2025.11.18 |
| [SWEA] 일요일 (0) | 2025.11.18 |
| [SWEA] 몬스터 사냥 (0) | 2025.11.18 |