結果
問題 |
No.2827 Enter User Name to Play
|
ユーザー |
![]() |
提出日時 | 2025-04-17 18:10:04 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 326 bytes |
コンパイル時間 | 861 ms |
コンパイル使用メモリ | 66,100 KB |
実行使用メモリ | 814,464 KB |
最終ジャッジ日時 | 2025-04-17 18:10:08 |
合計ジャッジ時間 | 3,339 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | MLE * 2 -- * 1 |
other | -- * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ‘N’ is used uninitialized [-Wuninitialized] 6 | char og[N+1]; | ~^~ main.cpp:4:9: note: ‘N’ declared here 4 | int N; | ^
ソースコード
#include <iostream> int main(){ int N; int num; char og[N+1]; char newchar[N]; std::cin>>N; for(int i=0;i<N;i++) std::cin>>og[i]; for(int i=0;i<N;i++) { std::cin>>num; newchar[i]=og[num-1]; num=0; } for(int i=0;i<N;i++) std::cout<<newchar[i]; return 0; }