source_code stringlengths 26 62k | lang_cluster stringclasses 11
values | src_uid stringlengths 32 32 | code_uid stringlengths 32 32 | difficulty int32 -1 3.5k ⌀ | exec_outcome stringclasses 1
value |
|---|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
// cin.tie(nullptr);
int t;
cin >> t;
int n, k, a[200000];
while (t--) {
cin >> n >> k;
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
if (k == 1) {
... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | d4bea6c26298bc258ef49bd8262e68da | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const ll N = 100000;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll tt;
cin >> tt;
while(tt--) {
ll n;
cin >> n;
ll k;
ci... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | d296794b8b1095e3ef3482a33b625b60 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
void answer( )
{
long long n,k;
cin>>n>>k;
vector<long long>v;
for( long long i = 0; i < n; i++)
{
long long x;
cin>>x;
v.push_back(x);
}
if( k == 1)
{
cout<<(n+1)/2-1<<endl;
retur... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | 8561b5ad0734c973c3c64d89878be924 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize ("Ofast")
typedef long long ll;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
int n,k;
cin>>n>>k;
vector<int>v(n);
for(auto &x:v)cin>>x;
... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | 182ce581ad61aec212b761f1a187b3e5 | 800 | PASSED |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
int n,k;
cin>>n>>k;
vector<int>v(n);
for(auto &x:v)cin>>x;
int ans=0;
if(k==1){... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | bd23bd7e75626ef1af1aac671338bab8 | 800 | PASSED |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
int n,k;
cin>>n>>k;
vector<int>v(n);
for(auto &x:v)cin>>x;
int ans=0;
if(k==1){... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | 0fc30a1acfe34e3edf9ec79664fed2e2 | 800 | PASSED |
#include <bits/stdc++.h>
//#pragma GCC optimize ("Ofast")
typedef long long ll;
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
int n,k;
cin>>n>>k;
vector<int>v(n);
for(auto &x:v)cin>>x;
... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | 3b11443bf319a5c3b6d6be9122798a6a | 800 | PASSED |
#include <bits/stdc++.h>
#pragma GCC optimize ("Ofast")
typedef long long ll;
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
int n,k;
cin>>n>>k;
vector<int>v(n);
for(auto &x:v)cin>>x;
... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | bf56bd3def62caa1d96409b15133817e | 800 | PASSED |
#include <bits/stdc++.h>
#pragma GCC optimize ("Ofast")
typedef long long ll;
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
int n,k;
cin>>n>>k;
vector<int>v(n);
for(auto &x:v)cin>>x;
... | C++ | 4d5d20fd586ddbea2adeab104a6c2aec | f31a6db5ce9d2e58d131c43ae2f6ef91 | 800 | PASSED |
#include<iostream>
#include<cstring>
#include<algorithm>
#include<unordered_set>
using namespace std;
const int N = 400010;
typedef long long LL;
const int mod = 998244353;
int a[N],b[N],c[N];
int d[N],db[N];
int answer;
int idx;
int n,k;
int st = 0;
int check(int l,int r,int x){
while(l < r)
{
... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | 551677f766990e66aedff9f457727754 | 2,300 | PASSED |
//题意:a置换经过n此交换变成b,给出b部分数字,求b的不同的个数,第i次交换可以选择(i,i+s)中的两个数x,y交换。
//思路:
//找到一个交换规律,判断a数组每个点在n次交换内可以完成要求的情况下有多少个选择。
//(1)首先,判断当用y>x时,
//只要每个需要交换的x点满足y-x<=s,则只要在第x次选择x,y进行交换,就可以在n次以内交换成功。
//所以可得,x值在a数组中的点可以选择范围为y-x<=s;
//再判断,y-x>s行不行?
//当y-x>s,既y>x+s,则在第(i,x)次交换时,不能选择到y,在(x+1,y)次选择时,不能选择到x;
//所以无法让x,y进行交换。但是y的点可以到x的... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | dab8e6bd143ae38a84475a8728e14bcd | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
const ll mod=998244353;
void sol() {
ll n,s;
cin >> n >> s;
ll a[n+1],b[n+1],i;
for (i=1; i<=n; i++) cin >> a[i];
for (i=1; i<=... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | f50298d938684f7697f54e5d01669b62 | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const ll mod=998244353;
void sol() {
ll n,s;
cin >> n >> s;
ll a[n+1],b[n+1],i;
for (i=1; i<=n; i++) cin >> a[i];
for (i=1; i<=n; i++) cin >> b[i];
for (i=1; i<=n; i++) {
if (a[i]>(s... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | 6f1f84445cce023b179c6ef0b97f7f54 | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const ll mod=998244353;
void sol() {
ll n,s;
cin >> n >> s;
ll a[n+1],b[n+1],i;
for (i=1; i<=n; i++) cin >> a[i];
for (i=1; i<=n; i++) cin >> b[i];
for (i=1; i<=n; i++) {
if (a[i]>(s... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | ffcf81151fb2791028e619819bdcb921 | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const ll mod=998244353;
void sol() {
ll n,s;
cin >> n >> s;
ll a[n+1],b[n+1],i;
for (i=1; i<=n; i++) cin >> a[i];
for (i=1; i<=n; i++) cin >> b[i];
for (i=1; i<=n; i++) {
if (a[i]>(s... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | e34f97162240f9e079fbf145b605944d | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const ll mod=998244353;
void sol() {
ll n,s;
cin >> n >> s;
ll a[n+1],b[n+1],i;
for (i=1; i<=n; i++) cin >> a[i];
for (i=1; i<=n; i++) cin >> b[i];
for (i=1; i<=n; i++) {
if (a[i]>(s... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | 8e1a8b5b6c9f78391cdde5aea7ad822a | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pf push_front
#define no cout << "NO\n";
#define yes cout << "YES\n";
#define pb push_back
ll i,n,m,count,l,r;
ll a[200009],d,S,j,maxx=-1,b[200009],c[200009];
vector <ll> v;
void ask (ll lx, ll rx) {
cout << "? " << lx << " ... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | 7823857e2b628909d8c253eb56e14042 | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pf push_front
#define no cout << "NO\n";
#define yes cout << "YES\n";
#define pb push_back
ll i,n,m,count,l,r;
ll a[200009],d,S,j,maxx=-1,b[200009],c[200009];
vector <ll> v;
void ask (ll lx, ll rx) {
cout << "? " << lx << " ... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | 5632b39251cc6b8418928a6b1592b71d | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define printd(expr) cout << #expr " = " << (expr) << endl
const long long modulo = 998'244'353;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t = {};
cin >> t;
while (t-- > 0) {
int n, s;
cin >> n >> s;
... | C++ | 0f58ac08a26ce735bfe13fd089b7f746 | a25344d9d4a7497e542fb2a534e18e27 | 2,300 | PASSED |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;int a[500],b[500],n,t=1;vector<pair<int,int>>ans;bool f(int i){for(int j=i+1;j<n-1;++j){if(a[j]==b[i]&&a[j+1]==a[i-1]){ans.emplace_back(i-1,j+1);reverse(a+i,a+j+1);return true;}}return false;}void solve(){ans.clear();cin>>n;for(int i=0;i<n;+... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 37f52bdacf0a30c2de3007473d0f2279 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int a[500], b[500], n, t = 1;
vector<pair<int, int>> ans;
bool f(int i) {
for (int j = i + 1; j < n - 1; ++j) {
if (a[j] == b[i] && a[j + 1] == a[i - 1]) {
ans.emplace_back(i - 1, j + 1);
revers... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 25db4b9b3f94e02140e4d159c4870a32 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int a[500], b[500], n;
vector<pair<int, int>> ans;
bool f(int i) {
for (int j = i + 1; j < n - 1; ++j) {
if (a[j] == b[i] && a[j + 1] == a[i - 1]) {
ans.emplace_back(i - 1, j + 1);
reverse(a + i... | C++ | 2bcc0c7796df59927dd0543f38319a95 | f9b8bd8d24c6c3635a5594495aeb8c3e | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <random>
#include <queue>
#include <bitset>
#include <cassert>
#include <time.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimizati... | C++ | 2bcc0c7796df59927dd0543f38319a95 | bb5c8b21609eae3752cf7fdb5aa317ec | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <random>
#include <queue>
#include <bitset>
#include <cassert>
#include <time.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimizati... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 877e449d3b013f0d171b7a83d1b674ff | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <random>
#include <queue>
#include <bitset>
#include <cassert>
#include <time.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimizati... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 4324f6cf23d8151da56c31dd692b4738 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <random>
#include <queue>
#include <bitset>
#include <cassert>
#include <time.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimizati... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 07cce486144e8f8362a763c771d0e23e | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <random>
#include <queue>
#include <bitset>
#include <cassert>
#include <time.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimizati... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 2ceb28d492d650c060909820d7f90646 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <random>
#include <queue>
#include <bitset>
#include <cassert>
#include <time.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimizati... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 8171e1ed1eaf9d8145eae5ee96b65f9c | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <random>
#include <queue>
#include <bitset>
#include <cassert>
#include <time.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimizati... | C++ | 2bcc0c7796df59927dd0543f38319a95 | 9b8a67d956b294287b37c9e0d79b4bad | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <string>
#include <tuple>
#include <map>
#include <algorithm>
#include <set>
#include <math.h>
#include <random>
#include <bitset>
#include <map>
#include <unordered_map>
#include <queue>
#include <time.h>
#define fi first
#define se second
#define ll long long
#define int... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | 438e46e1104275059a7c75c574ed2fb2 | 800 | PASSED |
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <random>
#include <iomanip>
#include <unordered_set>
#include <unordered_map>
#include <climits>
#include <stack>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | 61be47d15efb2b2e415190df41a4b45a | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
void solved(int x,int y){
for(int i=0;i<x;i++){
for(int j=0;j<y;j++){
if(x%2==0 && y%2!=0 || x%2==0 && y%2==0){
if(i==0 && j%2==0){
cout<<"1";
}else if(i==x-1 && j%2==0){
cout<<"1";
... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | 9932882075db24fb7f4d659eb78b367d | 800 | PASSED |
#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;
#define ll long long
#define for1(i,n,a,b) for(ll (i)=(n);(i)<=(a);(i)+=(b))
#define for2(i,n,a,b) for(ll (i)=(n);(i)>=(a);(i)-=(b))
void solve()
{
int ... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | 88be69e1f662e6d03bc07c848028409c | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
char mat[100][100];
char cr[100][100];
int ans = 0;
#define x first
#define y second
int n, m;
bool check(int x, int y) {
for (int i = x - 1; i <= x + 1; i++) {
for (int j = y - 1; j <= y + 1; j++) {
if (i >= 0 && j >= 0 && cr[i][j] == '1'... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | d65170a799378c988ebcd88dec82415b | 800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <stdio.h>
#include <unordered_set>
#include <deque>
#include <unordered_map>
#include <ctime>
#include <fstream>
#include <iomanip>
using namespace std;
#define int long lo... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | cf670476691b26aca201de71fe468932 | 800 | PASSED |
#include <bits/stdc++.h>
// #pragma GCC optimize("Ofast,fast-math,unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,avx,popcnt,tune=native")
// #pragma GCC optimize("no-stack-protector")
// #pragma GCC optimize "-O3"
#define times(I, X) for (int I=0; I<X; I++)
#define rtimes(I, X) for(i... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | 0ac5379ab31f8e7609ad83ffaa5115e7 | 800 | PASSED |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <set>
#include <map>
#include <vector>
#include <cstring>
#include <iomanip>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <fstream>
#include <cctype... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | d4ed41610d6886ed93fc9240e62ef6cf | 800 | PASSED |
#include <iostream>
using namespace std;
int a[50][50];
void mark(int x, int y) {
a[x][y] = 1;
a[x - 1][y - 1] = 0;
a[x][y - 1] = 0;
a[x + 1][y - 1] = 0;
a[x - 1][y] = 0;
a[x + 1][y] = 0;
a[x - 1][y + 1] = 0;
a[x][y + 1] = 0;
a[x + 1][y + 1] = 0;
}
int main() {
... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | 7f2b2a06de27cd4603ff534b32e6ac47 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t; cin >> t;
for (int a0=0; a0<t; a0++) {
int h,w; cin >> h >> w;
string s0 = string(w, '0');
string s1 = s0; s1[0]=s1[w-1]='1';
string s2 = s0; s2[0]=s2[w-1]='1';
for(int i=2; i<w-2;i+=2) s2[i]='... | C++ | 730cc4be2656c1dcdbda220b8778cdbf | 4bdf8963f763d81c64db9d40c07616e4 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main() {
int T;
ignore = scanf("%d", &T);
while (T--) {
int n;
ignore = scanf("%d", &n);
int x = 0;
while (n > 0) {
x = max(x, n % 10);
n /= 10;
}
printf("%d\n", x);
}
return 0;
}
| C++ | 1a6881aeb197b8ed429f46850eb27b9c | 4c165002ebb08f66a87172e0585cf38b | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
const double eps = 1e-9;
const ll INFll = 1e18;
const ll INFi = 1e9 + 63;
const ll mod = 1e6+3;//998244353;
const double pi = acos(-1);
const int maxn = 500005;
const int maxd = 20;
const int sqrtN = 300;
int ... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | 173c2c73bc6fd6d14d1b1e8e6ac25702 | 800 | PASSED |
#include <stdio.h>
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <set>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <complex>
#include <map>
#include <unordered_map>
#include <queue>
#include <array>
#include <bitset>
#incl... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | 354612ff4e57a34327c6a0255d14c88a | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
for(int i = 0; i < t; i++) {
int n;
cin >> n;
int ans = 0;
while(n > 0) {
ans = max(ans, n % 10);
n /= 10;
}
... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | 15ba1c9c42e2f0ff456562e49afcaf29 | 800 | PASSED |
#include <bits/stdc++.h>
#define int long long
#define all(x) x.begin(), x.end()
using namespace std;
void sol() {
string s;
cin >> s;
char mx = '0';
for (auto el : s) {
mx = max(mx, el);
}
cout << mx - '0' << '\n';
}
signed main() {
ios::sync_with_stdio(false);... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | 1475039cdbf9ed53a51461f390a577dc | 800 | PASSED |
/*
⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷⠈⣿⡆⢹⢷⡌⠻⡾⢋⣱⣯⣿⣿⣿⣿⡆⢻⡿⣿⣿⣿
⣿... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | d7506b0b3979f02403494cb44ca71fdb | 800 | PASSED |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <set>
#include <queue>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
int res = 0;
while(n)
{
res = max(res, n%10);
n/=10;
}
printf("%d\n", res);
}
retu... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | 7bb5ca7ea5620e7f43d7b815d81fb70e | 800 | PASSED |
#include <bits/stdc++.h>
#define X first
#define Y second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ll long long
#define ld long double
#define double ld
#define int ll
#define endl '\n'
using namespace std;
void solve(){
string s;
cin >> s;
... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | b9b8c55ad40d4ea868fce2bd7d255e6f | 800 | PASSED |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <set>
#include <map>
#include <vector>
#include <cstring>
#include <iomanip>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <fstream>
#include <cctype... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | 72e9c69b5d83cb2f6b0dbbd27070ca77 | 800 | PASSED |
#include <bits/stdc++.h>
#define ios ios::sync_with_stdio(0)
#define all(v) v.begin(),v.end()
#define p_b push_back
#define endl '\n'
#define S second
#define F first
typedef long long ll;
typedef long double ld;
const ll mod = 998244353;
using namespace std;
void solve()
{
string s; cin >> ... | C++ | 1a6881aeb197b8ed429f46850eb27b9c | c0099df9cefbfc501ea49a3939eb8cbc | 800 | PASSED |
#pragma GCC Optimize("Ofast")
#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
using namespace std;
using ll = long long;
const bool TEST = true;
string BAD;
string solveEq(char first, map<char, int> mp, int n) {
mp[first] -= 2;
vector<pair<char, int>> tmp(all(mp));
string ans = "";
... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | c1a0c80cb881e873d0aee74cffbe7b5c | 2,100 | PASSED |
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <random>
#include <chrono>
using namespace std;
typedef long double C;
typedef complex<C> P;
#define X real()
#define Y imag()
#define endl '\n'
#define int long long
#define all(X) (X).begin(), (X).end()
#define rall(X) (X).rbegin(), (X)... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | 1f73b4703477e427ed46873d3c111b9c | 2,100 | PASSED |
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <random>
#include <chrono>
using namespace std;
typedef long double C;
typedef complex<C> P;
#define X real()
#define Y imag()
#define endl '\n'
#define int long long
#define all(X) (X).begin(), (X).end()
#define rall(X) (X).rbegin(), (X)... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | 638faed7094af7848f706a042e7442b4 | 2,100 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <utility>
#include <unordered_set>
#include <unordered_map>
#include <cstdlib>
#include <iomanip>
#include <cassert>
#include <deque>
using namespace std;
//#define FAST_ALLOCATOR_MEMORY 10000000000
#ifdef ... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | d2bb82dfdb8c6ff00963d7f6716a3be2 | 2,100 | PASSED |
#include <bits/stdc++.h>
#define X first
#define Y second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ll long long
#define ld long double
#define double ld
#define int ll
#define endl '\n'
using namespace std;
void solve(){
string s;
cin >> s;
... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | 21b4b84774a5aa31e66d4af0418344a6 | 2,100 | PASSED |
#include <bits/stdc++.h>
#define X first
#define Y second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ll long long
#define ld long double
#define double ld
#define int ll
#define endl '\n'
using namespace std;
void solve(){
string s;
cin >> s;
... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | 198bce47a101cb823d01b081d6b5e77b | 2,100 | PASSED |
#pragma GCC optimize ("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
#define double long double
#define ft first
#define sc second
#define pb push_back
#define booost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cerr.tie(0);
#define all(x) (x).beg... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | ffeec0b27e1604eeab964fb68e075dc7 | 2,100 | PASSED |
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("sse4.2")
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <bitset>
#include <sstream>
#include <deque>
... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | e0363eb3e216ca73f671371bd7cfa1ed | 2,100 | PASSED |
#include <bits/stdc++.h>
#define endl '\n'
#define ll long long
#define double long double
using namespace std;
const ll inf = 1000000000000000000;
ll t, n, mun, tmp, l, r;
string s, s1;
bool flag;
char p1, p2, ggg, p;
multiset<char> myset;
map<char, ll> m1;
int main() {
ios_base::sync_with_stdio(0... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | f65623cce63f90dc67954508d782e267 | 2,100 | PASSED |
//#pragma comment(linker, "/STACK:1000000000")
#pragma GCC optimize("Ofast,no-stack-protector")
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <memory.h>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <ctime>
#include <random>
#... | C++ | 80fd03a1cbdef86a5f00ada85e026890 | e844c4d0a608e7960bccb2e84ec7afb3 | 2,100 | PASSED |
// C. Pursuit
#include <iostream>
#include <vector>
#include <numeric>
#include <algorithm>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> a(n), b(n);
int tmp;
for (int i = 0; i < n; ++i) {
... | C++ | 61b88627fc843ef6e5226e1003822793 | 46d755b385a55f59dca4da399ad5d0e4 | 1,200 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <numeric>
#include <list>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> a(n), b(n);
int sa = 0, sb = 0;
for (int i = 0; i < n; ++i) {
cin >... | C++ | 61b88627fc843ef6e5226e1003822793 | bfd82dde3e6692b7e71d5d60f3e1594d | 1,200 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <numeric>
#include <list>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> a(n), b(n);
a.reserve(2 * n);
b.reserve(2 * n);
int sa = 0, sb = 0;
... | C++ | 61b88627fc843ef6e5226e1003822793 | 55670b9acb7eed7b0def0d725aa242ce | 1,200 | PASSED |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <set>
#include <map>
#include <vector>
#include <cstring>
#include <iomanip>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <fstream>
#include <cctype... | C++ | 61b88627fc843ef6e5226e1003822793 | 99d452b3ff0bc095c1cab2b222083121 | 1,200 | PASSED |
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <random>
#include <iomanip>
#include <unordered_set>
#include <unordered_map>
#include <climits>
#include <stack>
using namespace std;
int bp(int n, vector<int> &a, vector<int> &b, vector<int> &pA, vecto... | C++ | 61b88627fc843ef6e5226e1003822793 | 9ea11b25d7073d09e519282df5ba8702 | 1,200 | PASSED |
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <set>
#include <cmath>
#include <iomanip>
#include <fstream>
#include <list>
... | C++ | 61b88627fc843ef6e5226e1003822793 | b0302a39ed17aef163ccfb8742a93d3e | 1,200 | PASSED |
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("avx")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define fi first
#define se second
#define pb push_back
#define sz(x) ((i... | C++ | 61b88627fc843ef6e5226e1003822793 | dd07ac83c511703ed9136f1d1692cb6d | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define fast_io {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);}
#define all(v) v.begin(),v.end()
#define pb push_back
#define bs binary_search
#define popb pop_back
#define F first
#define S ... | C++ | 61b88627fc843ef6e5226e1003822793 | a9561711b762f15b06a8daf8c74c4a5a | 1,200 | PASSED |
#include <iostream>
#include <string>
#include <stack>
#include <map>
#include <fstream>
#include <vector>
#include <list>
#include <deque>
#include <queue>
#include <cmath>
#include <set>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#incl... | C++ | 61b88627fc843ef6e5226e1003822793 | 95b2a3b82a325ee2e8aec54a9ab5c718 | 1,200 | PASSED |
#include<bits/stdc++.h>
#define int long long
#define p pair<int, int>
#define endl '\n'
const int INF = 1000000001;
using namespace std;
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t1;
cin >> t1;
for (int q11 = 0; q11 < t1; q11++){
... | C++ | 61b88627fc843ef6e5226e1003822793 | 143bf4f7435cd833a53fbfbf5c67956a | 1,200 | PASSED |
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <set>
#include <cmath>
#include <iomanip>
#include <fstream>
#include <list>
... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | cd9250a0316ffee15dc90c8ffb8262e2 | 1,600 | PASSED |
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
// 293206GT
#include <array>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <climits>
#include <limits>
#include <set>
#include <map>
#include <queue>
//#include <unorder... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 592a3d6d2dd410051c466b94123340a9 | 1,600 | PASSED |
/*
KAMUI!
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓███▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓███▓▒▒░▒▒▒▒▒░░░▒▒▒▓▓███▓▓▓▓▓▓▓
▓▓▓▓▓▓█▓▒▒▒▓▓████████▓▒▒░▒▒▒▓██▓▓▓▓▓▓
▓▓▓▓██▒▓████████████████▓░▒▒▒▒▓██▓▓▓▓
▓▓▓██▓███████▓▒░░░░░░░▒███▒░░▒▒▒██▓▓▓
▓▓█████████▓░░░░░░░░░░░░░██▓▓██████▓▓
... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | e6a0b7035c6ac271564d0e75df0d1ba0 | 1,600 | PASSED |
// Igorjan94, template version from 13 October 2017. C++17 version, modified 18 march 2020 (writeln<tuple>, whole->all) {{{
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int i = m; i < (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n) for (int i ... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 3b6f45e64517778ee8e9da8badbbaa7d | 1,600 | PASSED |
// Igorjan94, template version from 13 October 2017. C++17 version, modified 18 march 2020 (writeln<tuple>, whole->all) {{{
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int i = m; i < (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n) for (int i ... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 0a2a37fb7d9a7bf254cfdb1350fab3cd | 1,600 | PASSED |
// Igorjan94, template version from 13 October 2017. C++17 version, modified 18 march 2020 (writeln<tuple>, whole->all) {{{
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int i = m; i < (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n) for (int i ... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 3bba52172d8bd076b6870256063808f6 | 1,600 | PASSED |
// Igorjan94, template version from 13 October 2017. C++17 version, modified 18 march 2020 (writeln<tuple>, whole->all) {{{
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int i = m; i < (int) (n); ++i)
#define ROF(i, m, n) for (int i = m; i >= (int) (n); --i)
#define forn(i, n) for (int i ... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 47d0980eadf4059b2d76ec8e6b9eba4f | 1,600 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <numeric>
#include <list>
#include <random>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> a(n, -1), b(n, -1), c(n);
for (int i = 0; i < n; ++i) {
... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 2f90419fbf1dbf74709d9a05bee7864f | 1,600 | PASSED |
#include <bits/stdc++.h>
#define all(a) (a).begin(), (a).end()
using namespace std;
using ll = long long int;
using pii = pair<ll, ll>;
#ifndef ONLINE_JUDGE
#define trace(...) _f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 0
#endif
template <typename T> void _f(const char* name, T&& arg1){
cerr << name << ... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 9c6f84b90a3c70ec9fa57927306b53f8 | 1,600 | PASSED |
/*
DavitMarg
In a honky-tonk,
Down in Mexico
*/
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <random>
#include <bitset>
#include... | C++ | 89687dcbf37fc776b508252ddac8e8d4 | 45c2a3d87e8cb93818481c61929ab774 | 1,600 | PASSED |
//Solution by Tima
//#pragma comment(linker, "/stack:1000000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")
#include <bits/stdc++.h>
#define f first
#define s second
#define ll long long
#define ull unsigned long long
#define mp make_pair
#define pb push_back
#d... | C++ | 88607047027bab73ea56352969b02242 | 1e7b7c72d2a6cc420d7e73834ac94d21 | 2,600 | PASSED |
//Solution by Tima
//#pragma comment(linker, "/stack:1000000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")
#include <bits/stdc++.h>
#define f first
#define s second
#define ll long long
#define ull unsigned long long
#define mp make_pair
#define pb push_back
#d... | C++ | 88607047027bab73ea56352969b02242 | 87378489fbe3b964c00a937295e5d183 | 2,600 | PASSED |
#include <stdio.h>
#include <cstdlib>
#include <cassert>
#include <iostream>
#include <set>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <complex>
#include <map>
#include <unordered_map>
#include <queue>
#include <array>
#include <bitset>
#incl... | C++ | 88607047027bab73ea56352969b02242 | 60a79efe84378841b54d2353b82393b2 | 2,600 | PASSED |
//Solution by Tima
#include <bits/stdc++.h>
#define f first
#define s second
#define ll long long
#define ull unsigned long long
#define mp make_pair
#define pb push_back
#define vi vector <int>
#define ld long double
#define pii pair<int, int>
#define y1 sda
#define all(x) x.begin(), x.end()
using n... | C++ | 88607047027bab73ea56352969b02242 | 770c685128e44e338e293e262008e14f | 2,600 | PASSED |
/*
⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷⠈⣿⡆⢹⢷⡌⠻⡾⢋⣱⣯⣿⣿⣿⣿⡆⢻⡿⣿⣿⣿
⣿... | C++ | 88607047027bab73ea56352969b02242 | 9366d303bf9b01340af01bac8ee3b806 | 2,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int MX = 21, md = 31607;
int p[MX][MX], q[MX][MX], col[MX], cc[MX][MX], n, ans = 1;
void brute(int k, int prob, int cnt) {
if (k == n) {
int sum = 1;
for (int i = 0; i < n; i++) {
sum = sum * (1 - col[i] + md) % md;
}
if (cnt % 2 == 0) {
prob = m... | C++ | 88607047027bab73ea56352969b02242 | e090575e965b7101fc5859ce58c7ab4e | 2,600 | PASSED |
/*
KAMUI!
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓███▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓███▓▒▒░▒▒▒▒▒░░░▒▒▒▓▓███▓▓▓▓▓▓▓
▓▓▓▓▓▓█▓▒▒▒▓▓████████▓▒▒░▒▒▒▓██▓▓▓▓▓▓
▓▓▓▓██▒▓████████████████▓░▒▒▒▒▓██▓▓▓▓
▓▓▓██▓███████▓▒░░░░░░░▒███▒░░▒▒▒██▓▓▓
▓▓█████████▓░░░░░░░░░░░░░██▓▓██████▓▓
... | C++ | 88607047027bab73ea56352969b02242 | ce4be434cfe219b14189172192f7bc12 | 2,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
const int inf = 1e9;
const ll inf64 = 1e18;
const int mod = 31607;
const int TEN4 = ... | C++ | 88607047027bab73ea56352969b02242 | 50714f03a8e15b5bb6f02b63da9d6b39 | 2,600 | PASSED |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <bitset>
#include <queue>
#include <stack>
#include <sstream>
#include <cstring>
#include <numeric>
#include <ctime>
#include <cassert>
#include <random... | C++ | 88607047027bab73ea56352969b02242 | 913eb3f164ab6d46032e8acfdf8f4cbd | 2,600 | PASSED |
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2", "popcnt")
//#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define X first
#define Y second
//const ll mod = 1000000007;
//const ll mod = 998244353;
c... | C++ | 88607047027bab73ea56352969b02242 | 7f2066a24dd6c1d9e259a58070ea8603 | 2,600 | PASSED |
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
using namespace __gnu_pbds;
using namespace std;
using ll = long long;
using ld = long double;
type... | C++ | eca2d937a2333a9899d2d582c8434773 | 707d1e681e900724f384804c251a0346 | 3,300 | PASSED |
// Copyright 2021 Nikita Golikov
#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using ui64 = uint64_t;
template <class A, class B>
bool smin(A &x, B &&y) {
if (y < x) {
x = y;
return true;
}
return false;
}
template <class A, class B>
bool smax(A &x, B &&y) {
... | C++ | eca2d937a2333a9899d2d582c8434773 | e37650f19717ea5336a137318e3b1862 | 3,300 | PASSED |
// Copyright 2021 Nikita Golikov
#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using ui64 = uint64_t;
template <class A, class B>
bool smin(A &x, B &&y) {
if (y < x) {
x = y;
return true;
}
return false;
}
template <class A, class B>
bool smax(A &x, B &&y) {
if (x < y) {
x... | C++ | eca2d937a2333a9899d2d582c8434773 | 93f556c431d4111ed8eb625a13afe347 | 3,300 | PASSED |
#include <stdio.h>
#include <bits/stdc++.h>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <string_view>
#include <type_traits>
#include <utility>
#ifdef ROOM_311
#define OLYMP_DEBUG
#else
#define OLYMP_NDEBUG
#endif
//#include <olymp/numeric/epsilonized.h>
//... | C++ | eca2d937a2333a9899d2d582c8434773 | 0c87811a2352c3088eeaeb99464aa7e5 | 3,300 | PASSED |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
int n, k;
pair<vector<pair<int,int>>, string> to_canon(string a, int k) {
int ones = 0;
for (char& c : a) {
if (c == '1') ones++... | C++ | eca2d937a2333a9899d2d582c8434773 | 7bc6ed33c401c0a98081de30d6dc6962 | 3,300 | PASSED |
/*
author: Maksim1744
created: 22.07.2021 23:30:49
*/
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ld = long double;
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define sum(a) ( accumulate ((a).begin(), (a).end(), 0ll))
#define ... | C++ | eca2d937a2333a9899d2d582c8434773 | 4803ff24529784ff2ecac5b74c7d8dd8 | 3,300 | PASSED |
/*
author: Maksim1744
created: 22.07.2021 23:30:49
*/
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ld = long double;
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define sum(a) ( accumulate ((a).begin(), (a).end(), 0ll))
#define ... | C++ | eca2d937a2333a9899d2d582c8434773 | 52f0c65b82a3bb609aa8c0e11a4dcce6 | 3,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
vector<pair<int, int>> solve1(int k, string& s) {
if (k == 0) {
return {};
}
vector<int> a;
int block = 0;
for (int i = 0; i < (int) s.size(); ++i) {
if (s[i] == '0') {
++block;
} else {
a.pus... | C++ | eca2d937a2333a9899d2d582c8434773 | 0fa833b82d154b51ec02ce05b44bfdb2 | 3,300 | PASSED |
#pragma GCC optimize("Ofast")
/*
#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
*/
#include <bits/stdc++.h>
using namespace std;
//defines
typedef long long ll;
typedef long double ld;
#define TIME clock() * 1.0 / CLOC... | C++ | eca2d937a2333a9899d2d582c8434773 | 414770abe5b0e14bb6f0092624c8224a | 3,300 | PASSED |
#include <bits/stdc++.h>
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++... | C++ | eca2d937a2333a9899d2d582c8434773 | 2096b003649057483897c50515b6d142 | 3,300 | PASSED |
/**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author
*/
// Actual solution is at the bottom
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cstdint>
#include <cmath>
#include <complex>
#include <cst... | C++ | b3b8121400ef9f4811d4461c81f141d6 | 556f44b48ead5d2d5fb55ba63b0066fd | 3,400 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.