結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー kotatsugamekotatsugame
提出日時 2016-10-30 10:12:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 125 bytes
コンパイル時間 1,681 ms
コンパイル使用メモリ 169,296 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-03 19:45:58
合計ジャッジ時間 2,432 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 RE -
testcase_03 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;);}
      | ^~~~
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;);}
      |                                                 ~^~
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;);}
      |            ^

ソースコード

diff #

#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;);}
0