Submission #53828095
Source Code Expand
/*
Author: Bishal Suvechha Manindra
Algorithm:
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FASTIO ios::sync_with_stdio(false); cin.tie(NULL);
#define ll long long
#define ull unsigned long long
#define endl "\n"
#define INF INT_MAX
#define NINF INT_MIN
#define pb push_back
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define sz(a) ((int)((a).size()))
#define char unsigned char
#define debug(x) cout<<#x<<"-->"<<x<<endl
#define print(x) cout<<x<<endl
#define printc(x) cout<<x<<" "
#define foreach(arr) for(auto &e : arr) cout<<e<<" "
#define nextline cout<<"\n"
#define MOD 1000000007
#define mem(dp,i) memset(dp,i,sizeof(dp))
#define timeTaken std::cout <<"\nTime: "<< float( clock () - begin_time ) / CLOCKS_PER_SEC
using namespace std;
using namespace __gnu_pbds;
template<class T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// less: it is the basic for comparison of two function. Use less_equal for ordered multiset.
// order_of_key(k): Number of items strictly smaller than k
// find_by_order(k): kth element in a set (counting from zero)
const int N = 1e5+2;
/* ---------------------------- Code Start Here ------------------------------ */
void run(){
int a, b;
cin>>a>>b;
if(a==b){
cout<<-1;
return;
}
cout<<6-a-b;
}
/* ---------------------------- Code End Here ---------------------------------*/
int32_t main(){
FASTIO;
const clock_t begin_time = clock();
ll t=1;
//cin>>t;
while(t--){
run();
nextline;
}
//timeTaken;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Who Ate the Cake? |
| User | xor09 |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 1775 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3540 KiB |
Compile Error
Main.cpp: In function ‘int32_t main()’:
Main.cpp:54:18: warning: unused variable ‘begin_time’ [-Wunused-variable]
54 | const clock_t begin_time = clock();
| ^~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3540 KiB |
| 00_sample_01.txt | AC | 1 ms | 3516 KiB |
| 00_sample_02.txt | AC | 1 ms | 3408 KiB |
| 01_random_00.txt | AC | 1 ms | 3532 KiB |
| 01_random_01.txt | AC | 1 ms | 3516 KiB |
| 01_random_02.txt | AC | 1 ms | 3500 KiB |
| 01_random_03.txt | AC | 1 ms | 3520 KiB |
| 01_random_04.txt | AC | 1 ms | 3524 KiB |
| 01_random_05.txt | AC | 1 ms | 3456 KiB |
| 01_random_06.txt | AC | 1 ms | 3532 KiB |
| 01_random_07.txt | AC | 1 ms | 3528 KiB |
| 01_random_08.txt | AC | 1 ms | 3532 KiB |