Submission #68737212
Source Code Expand
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
// Typedef
typedef unsigned int uint;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef map<int, int> mii;
typedef map<char, int> mci;
typedef map<ll, ll> mll;
typedef set<int> si;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> ordered_set;
/*
greater<int> for large to small
less_equal for not unique
finding k-th element --> os.find_by_order(k); // O(log n)
finding the number of elements smaller than x --> os.order_by_key(x); // O(log n)
os.erase(x);
*/
// Macros
#define PB push_back
#define IN insert
#define all(x) x.begin(), x.end()
#define trav(i, a) for (auto &i : a)
#define GCD __gcd
#define MP make_pair
#define F first
#define S second
#define endl '\n'
#define sz(x) (ll)x.size()
#define LB lower_bound
#define UB upper_bound
#define DEBUG(i) cout << "DEBUG " << i << "\n";
#define CASE(i) cout << "Case " << i << ": ";
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define REP(i, a, b) for (int i = a; i <= b; i++)
#define REV(i, a, b) for (int i = a; i >= b; i--)
#define GT(x) greater<x>()
#define setpre(n) fixed << setprecision(n)
#define print(x) for(auto &i : x) cout << i << " " ; cout '\n'
#define SZ(x) x.size()
#define LEN(s) s.length()
#define MEM(arr, val) memset(arr, val, sizeof(arr));
// Functions
template <typename T>
void pv(vector<T> &a){
for (T u : a) cout << u << ' ';
cout << '\n';
}
template <typename T>
void pv2(vector<vector<T>> &a){
for (auto &aa : a) {
pv(aa);
}
}
// Constants
const ll MOD7 = 1e9 + 7;
const ll MOD9 = 998244353;
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
// Custom Functions
void fast() {
ios::sync_with_stdio(false);
cin.tie(0);
}
ll binpow(ll a, ll b, ll m){
ll res = 1;
while (b){
if (b & 1) res = (res * a) % m;
a = (a * a) % m;
b >>= 1;
}
return res;
}
ull LCM(ull a, ull b){
return (a * b) / GCD(a, b);
}
// Custom Comparator
bool cmp(const pair<ll, ll>& x, const pair<ll, ll>& y){
if (x.F == y.F) return x.S > y.S;
else return x.F < y.F;
}
// Extra Info
// INT_MAX for max value... min_diff = INT_MAX
// INT_MIN for min value... max_sum = INT_MIN --> for Kadane's Algorithm
// Global Variables
bool isOk(int l, int r, ll k, vvi &v){
ll sum = 0;
FOR(i, 0, 30){
if (v[i][r + 1] - v[i][l] == 0) sum += (1 << i);
}
if (sum >= k) return 1;
else return 0;
}
void solve(ll tc){
int x,y;
cin >> x >> y;
int ans = (x + y) % 12;
if (ans == 0) ans = 12;
cout << ans << '\n';
}
int main(void){
fast();
// precal();
// freopen("fenceplan.in", "r", stdin);
// freopen("fenceplan.out", "w", stdout);
ll t = 1;
int i = 1;
// cin >> t;
// for (ll i = 1; i <= t; i++)
solve(i);
}
Submission Info
| Submission Time |
|
| Task |
A - What month is it? |
| User |
priashisg |
| Language |
C++ 17 (gcc 12.2) |
| Score |
100 |
| Code Size |
3451 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3520 KiB |
Compile Error
Main.cpp: In function ‘void solve(ll)’:
Main.cpp:131:15: warning: unused parameter ‘tc’ [-Wunused-parameter]
131 | void solve(ll tc){
| ~~~^~
Main.cpp: In function ‘int main()’:
Main.cpp:156:8: warning: unused variable ‘t’ [-Wunused-variable]
156 | ll t = 1;
| ^
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, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt |
| Case Name |
Status |
Exec Time |
Memory |
| 00_sample_00.txt |
AC |
1 ms |
3460 KiB |
| 00_sample_01.txt |
AC |
1 ms |
3324 KiB |
| 00_sample_02.txt |
AC |
1 ms |
3452 KiB |
| 01_random_00.txt |
AC |
1 ms |
3456 KiB |
| 01_random_01.txt |
AC |
1 ms |
3460 KiB |
| 01_random_02.txt |
AC |
1 ms |
3396 KiB |
| 01_random_03.txt |
AC |
1 ms |
3520 KiB |
| 01_random_04.txt |
AC |
1 ms |
3468 KiB |
| 01_random_05.txt |
AC |
1 ms |
3384 KiB |
| 01_random_06.txt |
AC |
1 ms |
3516 KiB |
| 01_random_07.txt |
AC |
1 ms |
3464 KiB |
| 01_random_08.txt |
AC |
1 ms |
3416 KiB |
| 01_random_09.txt |
AC |
1 ms |
3324 KiB |
| 01_random_10.txt |
AC |
1 ms |
3452 KiB |
| 01_random_11.txt |
AC |
1 ms |
3516 KiB |