<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ### 題目描述 為了用事實說明挖掘機技術到底哪家強,PAT組織了一場挖掘機技能大賽。現請你根據比賽結果統計出技術最強的那個學校。 輸入格式: 輸入在第1行給出不超過105的正整數N,即參賽人數。隨后N行,每行給出一位參賽者的信息和成績,包括其所代表的學校的編號(從1開始連續編號)、及其比賽成績(百分制),中間以空格分隔。 輸出格式: 在一行中給出總得分最高的學校的編號、及其總分,中間以空格分隔。題目保證答案唯一,沒有并列。 輸入樣例: 6 3 65 2 80 1 100 2 70 3 40 3 0 輸出樣例: 2 150 ### 分析(偽代碼和知識點) 首先輸入一個n值(n<100000),通過for循環進行計算,比較出分值最大的,然后輸出最大值及其對應的下標。 ### 代碼 ``` #include<stdio.h> int main() { int a[100000]={0}; int n,x,y; int max=0; //輸入 scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%d %d",&x,&y); //計算 a[x]+=y; if(a[x]>a[max]) max=x; } //輸出 printf("%d %d",max,a[max]); return 0; } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看