結果

問題 No.597 concat
ユーザー k
提出日時 2020-06-10 00:53:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 2,195 ms
コンパイル使用メモリ 191,828 KB
最終ジャッジ日時 2025-01-11 00:37:18
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:32: warning: ‘n’ is used uninitialized [-Wuninitialized]
    5 | #define REP(i,n) for(int i=0; i<(int)(n); i++)
      |                                ^
main.cpp:12:3: note: in expansion of macro ‘REP’
   12 |   REP (i, n) {
      |   ^~~
main.cpp:10:7: note: ‘n’ was declared here
   10 |   int n;
      |       ^

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for(int i=0; i<(int)(n); i++)

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  string t;
  REP (i, n) {
    string s;
    cin >> s;
    t += s;
  }
  cout << t << endl;
  
  return 0;
}
0