結果

問題 No.1499 羊が、何匹だっけ
ユーザー e6i24v_kyoproe6i24v_kyopro
提出日時 2021-05-07 22:15:42
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 686 bytes
コンパイル時間 3,221 ms
コンパイル使用メモリ 170,724 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-13 13:28:17
合計ジャッジ時間 3,958 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,356 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,352 KB
testcase_06 AC 1 ms
4,352 KB
testcase_07 AC 2 ms
4,356 KB
testcase_08 AC 2 ms
4,352 KB
testcase_09 AC 2 ms
4,352 KB
testcase_10 AC 1 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

 #include <bits/stdc++.h>
using ll =long long;

using namespace std;

int main(){
    int N;
    cin>>N;
    
    string s;

    vector<string> vs;
    
    vector<string> ans(N);
    
    string tmp;
    
    for(int i=0;i<N;i++){
        for(int n=0;n<4;n++){
            cin>>tmp;
            
            vs.push_back(tmp);
        }
      
        vs[2]=to_string(stoi(vs[2])+1);
        
        for(int p=0;p<4;p++){
       
            ans[i].append(vs[p]);
            if(p<vs.size()-1){
                ans[i].push_back(' ');
            }
        }
     

        vs.clear();
       
        
    }
    
    for(int i=0;i<ans.size();i++){
        cout<<ans[i]<<endl;
    }
}
0