Submission #19488068
Source Code Expand
Copy
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; int main() { int a, b; cin >> a, b; cout << max({ a + b,a - b,a * b }) << endl; }
Submission Info
Submission Time | |
---|---|
Task | A - Add Sub Mul |
User | koni60 |
Language | C++ (GCC 9.2.1) |
Score | 0 |
Code Size | 271 Byte |
Status | WA |
Exec Time | 9 ms |
Memory | 3612 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:10:15: warning: right operand of comma operator has no effect [-Wunused-value] 10 | cin >> a, b; | ^ ./Main.cpp:11:20: warning: ‘b’ is used uninitialized in this function [-Wuninitialized] 11 | cout << max({ a + b,a - b,a * b }) << endl; | ~~^~~
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt, subtask_1_08.txt, subtask_1_09.txt, subtask_1_10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | WA | 9 ms | 3592 KB |
sample_02.txt | WA | 2 ms | 3540 KB |
sample_03.txt | AC | 2 ms | 3400 KB |
subtask_1_01.txt | WA | 2 ms | 3500 KB |
subtask_1_02.txt | AC | 2 ms | 3492 KB |
subtask_1_03.txt | WA | 2 ms | 3540 KB |
subtask_1_04.txt | WA | 2 ms | 3476 KB |
subtask_1_05.txt | WA | 2 ms | 3612 KB |
subtask_1_06.txt | WA | 8 ms | 3536 KB |
subtask_1_07.txt | AC | 2 ms | 3544 KB |
subtask_1_08.txt | WA | 2 ms | 3588 KB |
subtask_1_09.txt | WA | 2 ms | 3400 KB |
subtask_1_10.txt | WA | 2 ms | 3500 KB |