Submission #2740634
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define SQ(a) (a)*(a)
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define int long long
#define REP(i,m,n) for(int i = m; i < (int)(n); i++)
int32_t main()
{
IOS
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int a,b;
cin>>a>>b;
cout<<max(a+b,max(a*b,a-b));
#ifndef ONLINE_JUDGE
cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n\n";
#endif
return 0;
}
Submission Info
Submission Time |
|
Task |
A - Add Sub Mul |
User |
Radhesh |
Language |
C++14 (GCC 5.4.1) |
Score |
0 |
Code Size |
645 Byte |
Status |
RE |
Exec Time |
100 ms |
Memory |
256 KB |
Compile Error
./Main.cpp: In function ‘int32_t main()’:
./Main.cpp:18:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("input.txt", "r", stdin);
^
./Main.cpp:19:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("output.txt", "w", stdout);
^
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 |
RE |
97 ms |
256 KB |
sample_02.txt |
RE |
98 ms |
256 KB |
sample_03.txt |
RE |
96 ms |
256 KB |
subtask_1_01.txt |
RE |
97 ms |
256 KB |
subtask_1_02.txt |
RE |
97 ms |
256 KB |
subtask_1_03.txt |
RE |
97 ms |
256 KB |
subtask_1_04.txt |
RE |
96 ms |
256 KB |
subtask_1_05.txt |
RE |
96 ms |
256 KB |
subtask_1_06.txt |
RE |
100 ms |
256 KB |
subtask_1_07.txt |
RE |
97 ms |
256 KB |
subtask_1_08.txt |
RE |
96 ms |
256 KB |
subtask_1_09.txt |
RE |
97 ms |
256 KB |
subtask_1_10.txt |
RE |
96 ms |
256 KB |