Submission #70408659
Source Code Expand
// PriashisG
#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 long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> ordered_set;
typedef tree<pair<int,int>, null_type, less<pair<int,int>>, rb_tree_tag,
tree_order_statistics_node_update> ordered_multiset;
/*
greater<int> for large to small
less_equal for not unique
finding sz-th element --> os.find_by_order(sz); // O(log n)
finding the number of elements smaller than x --> os.order_by_szey(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 F first
#define S second
#define endl '\n'
#define LB lower_bound
#define UB upper_bound
#define DEBUG(i) cout << "DEBUG " << i << "\n";
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define GT(x) greater<x>()
#define setpre(n) fixed << setprecision(n)
#define SZ(x) x.size()
#define on_bit(x) __builtin_popcount(x)
// 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){
trav(aa, a) pv(aa);
}
template <typename T, typename U> void pvp( vector<pair<T, U>> &a){
trav(p, a) cout << "(" << p.F << ", " << p.S << ") ";
cout << '\n';
}
// Constants
const ll MOD7 = 1e9 + 7;
const ll MOD9 = 998244353;
const ll INF = LLONG_MAX;
// Custom Functions
void fast(){
ios::sync_with_stdio(false); cin.tie(0);
}
ll LCM(ll a, ll 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;
}
// Global Variables
void solve(ll tc){
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++){
if (i <= m) cout << "OK\n";
else cout << "Too Many Requests\n";
}
}
int main(void){
fast();
// precal();
// freopen("final_product_chapter_1_validation_input.txt", "r", stdin);
// freopen("output.txt", "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 - Too Many Requests |
| User |
priashisg |
| Language |
C++ 17 (gcc 12.2) |
| Score |
100 |
| Code Size |
2607 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3608 KiB |
Compile Error
Main.cpp: In function ‘void solve(ll)’:
Main.cpp:83:15: warning: unused parameter ‘tc’ [-Wunused-parameter]
83 | void solve(ll tc){
| ~~~^~
Main.cpp: In function ‘int main()’:
Main.cpp:107:8: warning: unused variable ‘t’ [-Wunused-variable]
107 | ll t = 1;
| ^
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
example_00.txt, example_01.txt |
| All |
example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt |
| Case Name |
Status |
Exec Time |
Memory |
| example_00.txt |
AC |
1 ms |
3392 KiB |
| example_01.txt |
AC |
1 ms |
3408 KiB |
| hand_00.txt |
AC |
1 ms |
3524 KiB |
| hand_01.txt |
AC |
1 ms |
3388 KiB |
| hand_02.txt |
AC |
1 ms |
3460 KiB |
| hand_03.txt |
AC |
1 ms |
3604 KiB |
| hand_04.txt |
AC |
1 ms |
3456 KiB |
| hand_05.txt |
AC |
1 ms |
3404 KiB |
| random_00.txt |
AC |
1 ms |
3472 KiB |
| random_01.txt |
AC |
1 ms |
3424 KiB |
| random_02.txt |
AC |
1 ms |
3384 KiB |
| random_03.txt |
AC |
1 ms |
3388 KiB |
| random_04.txt |
AC |
1 ms |
3400 KiB |
| random_05.txt |
AC |
1 ms |
3608 KiB |
| random_06.txt |
AC |
1 ms |
3460 KiB |