結果
問題 |
No.780 オフ会
|
ユーザー |
![]() |
提出日時 | 2019-01-22 22:10:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 1,582 ms |
コンパイル使用メモリ | 165,336 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-16 04:19:06 |
合計ジャッジ時間 | 2,406 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 22 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:10:9: warning: 'a' is used uninitialized [-Wuninitialized] 10 | if (a - 1 == b) { | ~~^~~ main.cpp:9:7: note: 'a' was declared here 9 | int a, b; | ^ main.cpp:10:3: warning: 'b' is used uninitialized [-Wuninitialized] 10 | if (a - 1 == b) { | ^~ main.cpp:9:10: note: 'b' was declared here 9 | int a, b; | ^
ソースコード
#include <bits/stdc++.h> typedef long long ll; const int INF = 1e9; const ll LINF = 1e18; const int MOD = 1e9+7; using namespace std; int main() { int a, b; if (a - 1 == b) { cout << "YES" << endl; } else { cout << "NO" << endl; cout << abs(a + 1 - b) << endl; } }