結果
| 問題 |
No.687 E869120 and Constructing Array 1
|
| コンテスト | |
| ユーザー |
mostfamousof
|
| 提出日時 | 2020-02-22 16:39:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 323 bytes |
| コンパイル時間 | 1,422 ms |
| コンパイル使用メモリ | 167,248 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-09 17:20:38 |
| 合計ジャッジ時間 | 2,753 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 2 WA * 4 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:10:17: warning: 'a' is used uninitialized [-Wuninitialized]
10 | while(a + b != N){
| ~~~~~~^~~~
main.cpp:9:9: note: 'a' was declared here
9 | int a, b = 0;
| ^
ソースコード
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
int main()
{
int N = 0;
cin >> N;
int a, b = 0;
while(a + b != N){
if(a < 10){
a++;
}
else{
b++;
}
}
cout << a << " " << b << endl;
}
mostfamousof