結果
問題 | No.548 国士無双 |
ユーザー |
|
提出日時 | 2017-11-18 12:56:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 345 bytes |
コンパイル時間 | 1,513 ms |
コンパイル使用メモリ | 165,004 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 20:31:51 |
合計ジャッジ時間 | 2,165 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 WA * 3 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:8:11: warning: 's' is used uninitialized [-Wuninitialized] 8 | s |= 1 << (getchar() - 'a'); | ~~^~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:6:9: note: 's' was declared here 6 | int s, f; | ^ main.cpp:13:14: warning: 'f' may be used uninitialized [-Wmaybe-uninitialized] 13 | f++; | ~^~ main.cpp:6:12: note: 'f' was declared here 6 | int s, f; | ^
ソースコード
#include<bits/stdc++.h> #define rep(i,a,n) for (int i = a;i < n;i++) using namespace std; int main() { int s, f; rep(i, 0, 13) { s |= 1 << (getchar() - 'a'); } rep(i, 0, 13) { if ((s | 1 << i) == 0x1FFF) { printf("%c\n", 'a' + i); f++; } } if (f == 0)puts("Impossible"); }