PATB1032. 挖掘機技術哪家強(20)
在第二個迴圈裡,j<10010,而不是j<n
AC程式碼
#include<stdio.h> int main() { int n; scanf("%d",&n); int number[100010]={0}; int ID; int score; for(int i=0;i<n;i++){ scanf("%d %d",&ID,&score); number[ID]+=score; } int maxIndex,maxScore=-1; for(int j=0;j<100010;j++){ if(number[j]>maxScore) { maxScore = number[j]; maxIndex = j; } } printf("%d %d",maxIndex,maxScore); return 0; }
相關推薦
PATB1032. 挖掘機技術哪家強(20)
在第二個迴圈裡,j<10010,而不是j<n AC程式碼#include<stdio.h> int main() { int n; scanf("%d",
PATB 1032 挖掘機技術哪家強(20)
include main class std body clu div sch iter #include <cstdio> #include <vector> using namespace std; const int N = 100001;
1032. 挖掘機技術哪家強(20)
超過 color tro nbsp 組織 學校 ons 挖掘 int 為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第1行給出不超過105的正整數N,即參賽人數。隨後N行,每行給出一位參賽
挖掘機技術哪家強(20)
題目描述 為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入描述: 輸入在第1行給出不超過105的正整數N,即參賽人數。隨後N行,每行給出一位參賽者的資訊和成績,包括其所代表的學校的編號、及其比賽成
乙級PAT 1032. 挖掘機技術哪家強(20)
為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第1行給出不超過105的正整數N,即參賽人數。隨後N行,每行給出一位參賽者的資訊和成績,包括其所代表的學校的編號(從1開始連續編號)、及其比賽成績(百分制),中間以
PAT乙1032. 挖掘機技術哪家強(20)
題目在這裡 1032. 挖掘機技術哪家強(20) 時間限制 200 ms 記憶體限制 65536 kB 程式碼長度限制
PAT(乙級)1022 挖掘機技術哪家強(20)
題目來源:http://www.nowcoder.com/pat/6/problem/4058 題目描述 為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計
PAT乙級1032 挖掘機技術哪家強(20)
----------------------------------------------------------------------------------------------------------------用C++完成--------------------
1032. 挖掘機技術哪家強(20)——C語言
為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第1行給出不超過105的正整數N,即參賽人數。隨後N行,每行給出一位參賽者的資訊和成績,包括其所代表的學校的編號(從1開始連續編號)、及
1032 挖掘機技術哪家強(20)(20 分)提問
為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第1行給出不超過10^5^的正整數N,即參賽人數。隨後N行,每行給出一位參賽者的資訊和成績,包括其所代表的學校的編號(從1開始連續編號)
【PAT】B1032 挖掘機技術哪家強(20 分)
printf 數組 hid () can scanf 獲取 tdi 技術 #include<cstdio> const int maxx= 100010; int school[maxx]={0}; int main() { int n,schid,sc
PAT-乙-1032 1032 挖掘機技術哪家強 (20 分)
程式碼 #include <iostream> #include <map> using namespace std; int main() { int n; cin>>n; map<int, int&g
1032 挖掘機技術哪家強 (20 分)
1032 挖掘機技術哪家強 (20 分) 為了用事實說明挖掘機技術到底哪家強,PAT 組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第 1 行給出不超過 105 的正整數 N,即參賽人數。隨後 N 行,每行給出一位參賽者
1032 挖掘機技術哪家強 (20 分)
為了用事實說明挖掘機技術到底哪家強,PAT 組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第 1 行給出不超過 105 的正整數 N,即參賽人
PAT (Basic Level) Practice (中文) 1032 挖掘機技術哪家強 (20 分)(C++)
1032 挖掘機技術哪家強 (20 分) 為了用事實說明挖掘機技術到底哪家強,PAT 組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第 1 行給出不超過 10 5 的正整數 N,即參賽人數。隨後 N 行,每行給出一位參賽者的
PAT_B_1032 挖掘機技術哪家強 (20 分)【最後一個測試點超時】
為了用事實說明挖掘機技術到底哪家強,PAT 組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第 1 行給出不超過 105 的正整數 N,即參賽人數。隨後 N 行,每行給出一位參賽者的資訊和成績,包括其所代表的學校的編號(從 1 開始連續編號)、
1032 挖掘機技術哪家強 (20 分)(C語言)
1032 挖掘機技術哪家強 (20 分) 為了用事實說明挖掘機技術到底哪家強,PAT 組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第 1 行給出不超過 105 的正整數 N,即參賽人數。隨後 N 行,每行給出一位參賽者
PAT 1032. 挖掘機技術哪家強
整數 cto std () 包括 輸入格式 code clu algorithm PAT1032. 挖掘機技術哪家強 為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第1行給出不超過105的
PAT (Basic Level) Practice 1032 挖掘機技術哪家強
中間 tom main -o align pan out htm -s 個人練習 為了用事實說明挖掘機技術到底哪家強,PAT 組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第 1 行給出不超過 10?^5的正整數 N,即參賽
1032 挖掘機技術哪家強
max href bsp title 鏈接 score cor sco turn 題目鏈接:https://pintia.cn/problem-sets/994805260223102976/problems/994805289432236032 題解: 1 #incl