結果
| 問題 | No.256 桁の数字を入れ替え (2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-30 10:15:04 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
OLE
|
| 実行時間 | - |
| コード長 | 138 bytes |
| 記録 | |
| コンパイル時間 | 1,383 ms |
| コンパイル使用メモリ | 182,212 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2026-05-19 04:44:42 |
| 合計ジャッジ時間 | 8,128 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 2 OLE * 2 |
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){int i;char c[1<<14];while(~scanf("%c",&c[i++]));for(std::sort(c,c+i);printf("%c",c[--i]),i;);printf("\n");}
| ^~~~
main.cpp: In function 'int main()':
main.cpp:2:50: warning: 'i' is used uninitialized [-Wuninitialized]
2 | main(){int i;char c[1<<14];while(~scanf("%c",&c[i++]));for(std::sort(c,c+i);printf("%c",c[--i]),i;);printf("\n");}
| ~^~
main.cpp:2:12: note: 'i' was declared here
2 | main(){int i;char c[1<<14];while(~scanf("%c",&c[i++]));for(std::sort(c,c+i);printf("%c",c[--i]),i;);printf("\n");}
| ^
main.cpp:2:96: warning: iteration 2147483648 invokes undefined behavior [-Waggressive-loop-optimizations]
2 | main(){int i;char c[1<<14];while(~scanf("%c",&c[i++]));for(std::sort(c,c+i);printf("%c",c[--i]),i;);printf("\n");}
| ~~~~~~~~~~~~~~~~~~~^~
main.cpp:2:96: note: within this loop
2 | main(){int i;char c[1<<14];while(~scanf("%c",&c[i++]));for(std::sort(c,c+i);printf("%c",c[--i]),i;);printf("\n");}
| ~~~~~~~~~~~~~~~~~~~^~
ソースコード
#include<bits/stdc++.h>
main(){int i;char c[1<<14];while(~scanf("%c",&c[i++]));for(std::sort(c,c+i);printf("%c",c[--i]),i;);printf("\n");}