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 <iostream>
int T;
bool ok;
char mat[8][8];
int main() {
std::cin>>T;
while (T) {
std::cin.get();
for (int i = 0; i < 8; i++)
for (int j = 0; j < 8; j++)
std::cin>>mat[i][j];
for (int i = 0; i < 8; i++) {
ok = 0;
if (mat[i][0] == 'R'){
ok = 1;
for (in... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | ba9ccfa99bf4d110c346985c4cf24028 | 900 | PASSED |
#include <iostream>
#include <cmath>
#include <set>
#include <vector>
using namespace std;
void solve()
{
vector<char> a[8];
char b;
for(int i = 0; i < 8 ; i++)
{
for(int j = 0 ; j < 8; j++)
{
cin >> b;
a[i].push_back(b);
}
}
for(int i = 0; ... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | c058552d339be894a69a746f684df6dd | 900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--){
string a[8];
int x=0;
int y=0;
for(int i=0;i<8;i++)
cin>>a[i];
int flag=0;
for(int j=0;j<8;j++){
x=0;
for(int k=0;k<8;k++){
i... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | cb7540f92d15f027c47d5d4550a69d4e | 900 | PASSED |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
char s[10][10];
while (n--) {
int r = 1, b = 1;
for (int i = 0; i < 8; i++) {
scanf("%s", s[i]);
}
for (int i = 0; i < 8; i++) {
r = 1;
for (int j = 0; j < 8; j++) {
... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | d517bcc28c4b0050704be8c3d5906608 | 900 | PASSED |
/*#include<bits/stdc++.h>
using namespace std;
int su(int x,int y)
{
if(y>x)
{
int p=x;
x=y;
y=p;
}
int l=1;
while(l)
{
l=x%y;
x=y;
y=l;
}
return x;
}
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
int a[200005];
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
int x=-1,y=0;
for(... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | 4196eca44ea1c18072730139459767f3 | 900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
char c[8][8];
int cnt=0;
for(int i=0;i<8;i++)
for(int j=0;j<8;j++)
cin>>c[i][j];
for(int i=0;i<8;i++)
{
for(int j=0;... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | be93f4ddcf85eec3b2807fc5355693a9 | 900 | PASSED |
#include <iostream>
using namespace std;
bool isTopLayer(const char* const a)
{
char b = *a;
for (int i = 1; i < 8; i++) if (*(a + i) != b) return false;
return true;
}
void solve()
{
char **a = new char* [8];
for (int i = 0; i < 8; i++) *(a + i) = new char [8];
for (int i = 0; i... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | 0141cafa14d3bf16b4234d8f9884e78f | 900 | PASSED |
#include <iostream>
using namespace std;
bool isTopLayer(const char* const a)
{
char b = *a;
for (int i = 1; i < 8; i++) if (*(a + i) != b) return false;
return true;
}
void solve()
{
char **a = new char* [8];
for (int i = 0; i < 8; i++) *(a + i) = new char [8];
for (int i = 0; i... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | 4205b2cf5e2d7e9714160b66cffa7d08 | 900 | PASSED |
#include <iostream>
using namespace std;
bool isTopLayer(const char* const a)
{
char b = *a;
for (int i = 1; i < 8; i++) if (*(a + i) != b) return false;
return true;
}
void solve()
{
char **a = new char* [8];
for (int i = 0; i < 8; i++) *(a + i) = new char [8];
for (int i = 0; i... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | a8dd41bd98594c045956a791e5065cfd | 900 | PASSED |
#include<bits/stdc++.h >
using namespace std;
#define ll long long
#define pb push_back
#define TT ll time; cin >> time; while(time--)
#define FastIo ios_base::sync_with_stdio(false);cin.tie(NULL) ;
const ll int INF = 5e18 , nmax = 2501 , block = 350 , mod = 998244353;
#ifndef ONLINE_JUDGE
#in... | C++ | 64458fc3c2bf40ca911b566092f544e8 | 9de234b8ff347264c300da26720ea816 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
const ll MOD = 1e9 + 7, MAX = 1e9 + 5, INF = 1e10;
vector <int> dx = { 1, 0, 0, -1, 1, 1, -1, -1 };
vector <int> dy = { 0, 1, -1, 0, -1, 1, 1, -1 };
ll gcd(ll a, ll b) { return b ? gcd(b, ... | C++ | 64458fc3c2bf40ca911b566092f544e8 | 43d54e4dc709e8fb906b8487d0708127 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
const ll MOD = 1e9 + 7, MAX = 1e9 + 5, INF = 1e10;
vector <int> dx = { 1, 0, 0, -1, 1, 1, -1, -1 };
vector <int> dy = { 0, 1, -1, 0, -1, 1, 1, -1 };
ll gcd(ll a, ll b) { return b ? gcd(b, ... | C++ | 64458fc3c2bf40ca911b566092f544e8 | 2722f7dc142afa4a769c1cfbdba4b6d1 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
const ll MOD = 1e9 + 7, MAX = 1e9 + 5, INF = 1e10;
vector <int> dx = { 1, 0, 0, -1, 1, 1, -1, -1 };
vector <int> dy = { 0, 1, -1, 0, -1, 1, 1, -1 };
ll gcd(ll a, ll b) { return b ? gcd(b, a ... | C++ | 64458fc3c2bf40ca911b566092f544e8 | 6553044b9d89fa38cb6cf536209582f4 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
const ll MOD = 1e9 + 7, MAX = 1e9 + 5, INF = 1e10;
vector <int> dx = { 1, 0, 0, -1, 1, 1, -1, -1 };
vector <int> dy = { 0, 1, -1, 0, -1, 1, 1, -1 };
ll gcd(ll a, ll b) { return b ? gcd(b, ... | C++ | 64458fc3c2bf40ca911b566092f544e8 | b8c1a0da5b867059ccb4a5c952b8dc5e | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define dbg(a,b,c,d) cerr<<a<<" "<<b<<" "<<c<<" "<<d<<endl;
#define kill(a) {cout<<a<<endl;continue;}
#define KILL(a) {cout<<a<<endl;return 0;}
#define debug cerr<<"Error Found"<<endl;
#define me... | C++ | 64458fc3c2bf40ca911b566092f544e8 | f6a312366f87a127fa803c4dc7155038 | 1,500 | PASSED |
/*----------------------------------
Author: Arnab Ghosh
Created: 23.10.2022 10:22:05
-----------------------------------*/
#pragma GCC optimize("O3,unroll-loops")
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#ifndef ONLINE_JUDGE
#include ... | C++ | 64458fc3c2bf40ca911b566092f544e8 | 67b28993e348925fd2ee202d75b72fd9 | 1,500 | PASSED |
/*โโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโะะะะฃะกะะะะโโโโโโโโโ
โโโโโโโโโโะะฏะะฎโโโโโโโโโโโโ
โโโโโโโโโะะะะะะAโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโ... | C++ | 64458fc3c2bf40ca911b566092f544e8 | 45d6aa0af13761dccaa7c7736e8f9075 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define endl "\n"
const int dumb=50000;
void binatodesi(int n,vector<int>&al){
if(n==0)return;
al.push_back(n%2);
binatodesi(n/2,al);
}
ll binaryexp(ll n,ll b){
ll result=1;
while(b>0){
if(b&1)result... | C++ | 64458fc3c2bf40ca911b566092f544e8 | 583221a705de936ea3d1643b4ba0f489 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void sloth(){
int n;cin >> n;
vector<ll> v(n);
for(int i = 0; i < n; i++){
cin >> v[i];
}
vector<bool> vis(n,false);
ll c = 0;
for(int i = 0; i < 31; i++){
ll mx = 0, id = -1;
for(int j = 0; j < n; j++){
... | C++ | 64458fc3c2bf40ca911b566092f544e8 | af327fbce47db161b241cc2f917dec0c | 1,500 | PASSED |
# include <bits/stdc++.h>
# define int long long
using namespace std;
main(){
int t;
cin >> t;
while(t--){
int q;
cin >> q;
int a[2][27];
for(int i = 0;i <= 1;i ++)
for(int j = 0;j <= 26;j ++)
a[i][j] = 0;
a[0][0] = a[1][0] = 1;
... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | 1bc423e928ee95a587ffb9b03e6f9816 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
int n;
cin>>n;
map<char,int>s,t;
s['a']++;
t['a']++;
while(n--)
{
int a,k;
cin>>a>>k;
string x;
cin>>x;
if(a==1)
{
for(auto itr:x)
... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | 8347e3f79d91d2d9efe9d7fac4ef140b | 1,500 | PASSED |
/*
เฆซเงเฆฐเฆพ เฆนเฆฒเง เฆจเฆพ เฆเฆฐเง, เฆจเฆพเฆนเฆฟ เฆซเฆฟเฆฐเฆฒเง เฆเฆฐ เฆฆเฆฟเฆเง เฆเฆฎเฆพเฆฐ
เฆเฆธเง เฆชเฆฅเงเฆฐเฆ เฆฎเฆพเฆเง,
เฆชเงเฆเฆจเง เฆคเฆพเฆเฆฟเงเง เฆซเฆฟเฆฐเง เฆเฆฌเฆพเฆฐ
เฆนเงเฆเฆเง เฆฏเฆพเฆ เฆเฆฎเฆฟ เฆเงเฆเฆเฆคเง เฆเฆฟเฆเง, เฆเฆฎเฆฟ เฆเฆเฆ เฆเฆพเฆจเฆฟเฆจเฆพ เฆเฆฟเฆธเงเฆฐเฆฟ เฆชเฆฟเฆเง!
*/
#include <bits/stdc++.h>
using namespace std;
#ifdef ONLINE_JUDGE
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | d6c6102cdef4667006cf7319f354d85e | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define sorti1 sort(v.begin(),v.end())
#define sorti2 sort(v.rbegin(),v.rend())
#define rever reverse(v.begin(),v.end())
#define ll long long
#define refi for(i=0;i<n;i++)
#define ff first
#define ss second
#define pii pair<long long,long long>... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | b73063fbe14bb08ee78c587a6e4a5df3 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main()
{
// ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int t;
cin>>t;
int demt[27],dems[27];
while(t--)
{
memset(dems,0,sizeof(dems));
memset(demt,0,sizeof(demt));
int q;
cin>>q;
dems[0]=1;demt[0]=1;
long long dt=0,ds=0;
while(... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | e360d5254fe992d5c655c03856a43a92 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef long double ldb;
typedef __int128_t int128;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double pi = ... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | b3f5f74a6f2b831f1d045ce9b27cabac | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define loop(i,a,b) for(int i=a;i<b;i++)
#define mod 1000000007
#define nL "\n"
#define pb push_back
#define mk make_pair
#define pii pair<int, int>
#define vi vector<int>
#define all(x) (x).begin(), (x).end()
#define umap unordered_map
#defi... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | 496ca54a48a663a6fcb55ed1660e4f46 | 1,500 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define pll pair<long long, long long>
#define pii pair<int,int>
#define pb push_back
#define fi first
#define se second
using namespace std;
const int inf = 1e9 + 7;
const int mod = 1e9 + 7;
const int N = 1e6 + 1;
bool sosanh(vector<ll> a, vector<ll> b){
... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | 1ca40f61da88fc4a76ccf163fe72fa5c | 1,500 | PASSED |
#include<bits/stdc++.h>
#define ii pair <int,int>
#define fi first
#define se second
#define int long long
#define double long double
#define endl '\n'
using namespace std;
signed main(){
//freopen("input.INP", "r", stdin);
//freopen("output.OUT", "w", stdout);
ios_base::sync_with_stdio(false)... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | 19ade90acd69e39eeb93e268a4e2fcc3 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
long long int mod = 1000000007;
void yes(){
cout<<"YES"<<endl;
}
void no(){
cout<<"NO"<<endl;
}
ll p(ll n){
if (n==0)
return 1;
ll temp = p(n/2);
temp *= temp;
temp %= mod;
if (n%2 != 0)
... | C++ | d40f0f3b577a1a5cfad2a657d6a1b90a | 738fe8522cd225b16bee4cc249a25c75 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
inline ll readint(){
ll x=0;
bool f=0;
char c=getchar();
while(!isdigit(c)&&c!='-') c=getchar();
if(c=='-'){
f=1;
c=getchar();
}
while(isdigit(c)){
x=x*10+c-'0';
c=getchar();
}
return f?-x:x;
}
const int maxn=5e4+5;
i... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | 4ee8ceb6d21d70e210536d4116044b64 | 3,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
inline int readint(){
int x=0;
bool f=0;
char c=getchar();
while(!isdigit(c)&&c!='-') c=getchar();
if(c=='-'){
f=1;
c=getchar();
}
while(isdigit(c)){
x=x*10+c-'0';
c=getchar();
}
return f?-x:x;
}
const int maxn=5e4+5;
const int mod=99824435... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | 12b90a8ef3f03b0c4a5047e8752060b1 | 3,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
inline int readint(){
int x=0;
bool f=0;
char c=getchar();
while(!isdigit(c)&&c!='-') c=getchar();
if(c=='-'){
f=1;
c=getchar();
}
while(isdigit(c)){
x=x*10+c-'0';
c=getchar();
}
return f?-x:x;
}
const int maxn=5e4+5;
const int mod=99824435... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | 3face6161fe391930c3ee5a5e832d63f | 3,300 | PASSED |
// LUOGU_RID: 95064074
#include<bits/stdc++.h>
using namespace std;
#define F(i,a,b) for(int i=a;i<=b;i++)
#define Fd(i,a,b) for(int i=a;i>=b;i--)
#define N 600010
#define mo 998244353
#define LL long long
#define ULL unsigned long long
int rev[N],G1[N],G2[N],fac[N],ifac[N],inv[N];
int mod(int x){return x>... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | ca04cbc66c9bc8da5b42e282bd036bf5 | 3,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define F(i,a,b) for(int i=a;i<=b;i++)
#define Fd(i,a,b) for(int i=a;i>=b;i--)
#define N 600010
#define mo 998244353
#define LL long long
#define ULL unsigned long long
int rev[N],G1[N],G2[N],fac[N],ifac[N],inv[N];
int mod(int x){return x>=mo?x-mo:x;}
int mi(... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | 4af8ca35e986e22548ebf0901442083d | 3,300 | PASSED |
#include <stdio.h>
#include <vector>
#define int long long
#define min(a,b) (a<b ? a:b)
using namespace std;
const int mod = 998244353, max_size = 262144; // 2^18
vector<int> reverse_resp[20];
int unity[max_size], n, m;
int pow(int base, int exp)
{
if(exp == 0) return 1;
int tmp = pow(base, exp/2);
... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | f4616360ceb60d31f272238715e84fda | 3,300 | PASSED |
#include <stdio.h>
#include <vector>
#include <utility>
#define int long long
#define min(a,b) a<b ? a:b
using namespace std;
const int mod = 998244353, max_size = 262144; // 2^18
int unity[max_size], n, m;
int pow(int base, int exp)
{
if(exp == 0) return 1;
int tmp = pow(base, exp/2);
tmp = (tmp*tmp) ... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | 0e166ad1157809e0230953b3d213faf8 | 3,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int maxn=5e5+10;
const int mod=998244353;
const int G=3;
const int iG=(mod+1)/3;
#define inf 1e9
inline int read(){
int x=0,f=1;char c=getchar();
while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+c-'0';c=getchar();}
r... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | 9746222f44fe0b02a1c30069103cd022 | 3,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int maxn=5e5+10;
const int mod=998244353;
const int G=3;
const int iG=(mod+1)/3;
#define inf 1e9
inline int read(){
int x=0,f=1;char c=getchar();
while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+c-'0';c=getchar();}
r... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | b190ddc70ef542c419fd98ac8b8181ac | 3,300 | PASSED |
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
typedef long long ll;
#include<iostream>
#include<cstdio>
typedef long long ll;
const int mod=998244353,G=3,G1=332748118,N=800005;
int rev[N];
int pw(int a,int b){
int ans=1;
while(b){
if(b&1) ans=(ll)ans*a%mod;... | C++ | ffa9ea53897ac059d7bdd32f916c4f08 | 9898e8020c25dbce75a2edd1001aa83c | 3,300 | PASSED |
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <chrono>
#include <random>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cs... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | 9be44a5a301874ebd2c8a24e2f08178f | 3,400 | PASSED |
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <chrono>
#include <random>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cs... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | 2309af6f5a4fa925c9b11ccf00467441 | 3,400 | PASSED |
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <chrono>
#include <random>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cs... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | 2b609589f431040ecd5a442d5c1fedbe | 3,400 | PASSED |
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <chrono>
#include <random>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cs... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | 5f2fa38a999726b451d29f9de1666aa0 | 3,400 | PASSED |
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <chrono>
#include <random>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cs... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | c9fff1e0d82720b48181313dd85139c9 | 3,400 | PASSED |
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#include<bits/stdc++.h>
#define L(i, j, k) for(int i = (j); i <= (k); ++i)
#define R(i, j, k) for(int i = (j); i >= (k); --i)
#define ll long long
#define vi vector <int>
#define sz(a) ((int) (a).size())
#define i128 __int128
using namespace ... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | ef55aa33ed40142f1c4f94f08d2f7524 | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = long double; // or double, if TL is tight
using str = string; // yay python!
// pairs
using pi = pair<int,int>;
using pl = pair<ll,ll>;
using pd = pair<db,db>;
#define mp make_pair
#define f first
#define s second
#define... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | bb920bbb9058e5796d38b002264a5d5d | 3,400 | PASSED |
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
#define int unsigned long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=g... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | e760493c3f7708e0b299bc8e4890c638 | 3,400 | PASSED |
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
#define int unsigned long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=g... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | 2c04372563a584c4583c919ff915fee8 | 3,400 | PASSED |
#include <bits/stdc++.h>
#ifdef LOCAL
#include "code/formatting.hpp"
#else
#define debug(...) (void)0
#endif
using namespace std;
template <typename Container>
struct less_container {
const Container* cont = nullptr;
less_container() = default;
less_container(const Container& cont) : cont(&co... | C++ | 39f497b5e8101dfea415da3d634f6fe1 | e03f4fda184bc2570a540eeb979038c2 | 3,400 | PASSED |
import java.io.*;
import java.util.*;
public class Main {
static PrintWriter out;
static Kioken sc;
public static void main(String[] args) throws FileNotFoundException {
boolean t = true;
boolean f = false;
if (f) {
out = new PrintWriter("output.txt");
... | Java | 84c0f17a45826a6e43d1f4717e62c194 | 6721bc9a473ccd7ac987ff2b6984473a | 1,600 | PASSED |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
/**
* @author Mubtasim Shahriar
*/
public class Cgr18A {
public static void main(String[] args) {
InputStream inputStream =... | Java | 84c0f17a45826a6e43d1f4717e62c194 | c0588f02165a2c2a5de15f8c948edb51 | 1,600 | PASSED |
import java.io.*;
import java.util.*;
public class C_debugging {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
String s1 = sc.next();
... | Java | 84c0f17a45826a6e43d1f4717e62c194 | 5f4b9d9da0ff81cd91c923d26fcaec1d | 1,600 | PASSED |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class c {
public static void main(String[] args) {
FastScanner scan=new FastScanner();
PrintWriter out=new PrintWriter(System.out);
int ... | Java | 84c0f17a45826a6e43d1f4717e62c194 | 32714991c690f34d073af31aa194b5b0 | 1,600 | PASSED |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
public class C {
public static void main(String[] args) {
FastScanner scanner = new FastScanner();
int t = scanner.nextInt();
for (int i=0;... | Java | 84c0f17a45826a6e43d1f4717e62c194 | a84da9755976c8cb86bcedc7b58ca83e | 1,600 | PASSED |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class _1615C16 {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(in.readLine());
int... | Java | 84c0f17a45826a6e43d1f4717e62c194 | de70a32b09ccb68a4775a4b1abbc6dc3 | 1,600 | PASSED |
import java.io.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Random;
import java.util.StringTokenizer;
public class codeforces_G18_C {
private static void solve(FastIOAdapter in, PrintWriter out) {
int n = in.nextInt();
char[] a = in.next().toCharArray();
... | Java | 84c0f17a45826a6e43d1f4717e62c194 | 12536e7eda403d9e2350a1c4a314f2d6 | 1,600 | PASSED |
import java.io.*;
import java.util.*;
public class q3 {
public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// public static long mod = 1000000007;
public static void solve() throws Exception {
String[] parts = br.readLine().split(" ");
int n =... | Java | 84c0f17a45826a6e43d1f4717e62c194 | da35150182d741e5a39b5110418a9250 | 1,600 | PASSED |
import java.util.*;
import java.io.*;
import java.math.*;
import java.sql.Array;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLIntegrityConstraintViolationException;
public class Main {
private static class MyScanner {
private static final int BUF_SIZE = 204... | Java | 84c0f17a45826a6e43d1f4717e62c194 | 93344b51df4e8f335a07e2d81caa7395 | 1,600 | PASSED |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author wilso
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
... | Java | 84c0f17a45826a6e43d1f4717e62c194 | 8ba6cc0d366878e09f274a72d7dc2d47 | 1,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int a[20][200005];
int main(){
int t;
cin>>t;
for(int i=1;i<200005;i++){
for(int j=0;j<20;j++){
a[j][i]=a[j][i-1]+((i>>j)&1);
}
}
while(t--){
int l,r,maxi=0;
cin>>l>>r;
... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | f79e036d28465acb9b722bb5b0b7ebad | 1,300 | PASSED |
#include "bits/stdc++.h"
#define ll long long
#define pb push_back
#define yes cout<<"YES";
#define no cout<<"NO";
#define vec vector<ll>
#define f_a(arr,it) for(auto it:arr)
#define vec_pair vector<pair<ll,ll>>
#define us unordered_set<ll>
#define us_pair unordered_set<pair<ll,ll>>
#define mapi map<ll,ll>
... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | 6f45df41b31cbf3c7168b728f012de2a | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int arr[200005][32];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t;cin>>t;
for(int i=1;i<=200000;i++){
bitset<32>bt(i);
for(int bit=0;bit<32;bit++){
if(bt[... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | a2d14e5ad613ff6b84985c1bad8135d3 | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int arr[200005][32];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t;cin>>t;
for(int i=1;i<=200000;i++){
bitset<32>bt(i);
for(int bit=0;bit<32;bit++){
if(bt[... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | 11793fd70a8836f7fb61359df5106b09 | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll arr[200005][32];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t;cin>>t;
for(int i=1;i<=200000;i++){
bitset<32>bt(i);
for(int bit=0;bit<32;bit++){
if(bt[b... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | 21cd0ca5171cf50ac1f87920b34e23ce | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll arr[200005][32];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t;cin>>t;
for(int i=1;i<=200000;i++){
bitset<32>bt(i);
for(int bit=0;bit<32;bit++){
if(bt[b... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | ed8771de148b361546888d34836e6283 | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll arr[200005][32];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t;cin>>t;
for(int i=1;i<=200000;i++){
bitset<32>bt(i);
for(int bit=0;bit<32;bit++){
if(bt[b... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | 8f1db2d179f5b184af5d5df2ff1d241e | 1,300 | PASSED |
#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define rep(i,n) for (int i = 0; i<n; i++)
#define rep2(i,n) for (int i = 1; i<n; i++)
using namespace std;
int N = 2e5+5;
int pre[20][(int) 2e5+5];
int main()
{
ll tc;
rep(i,20){
rep2(j,N){
pre[i][j] = pre... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | ac8820b8e60c8a88d115133f40077a29 | 1,300 | PASSED |
// LUOGU_RID: 91981016
#include<bits/stdc++.h>
using namespace std;
const int lim=2e5+1;
int T,l,r,s[lim][19],lg[lim];
template<class T=unsigned> inline T readu(){
T x=0;char c=getchar();
while(!isdigit(c)) c=getchar();
while(isdigit(c)) x=x*10+c-'0',c=getchar();
return x;
}
void bits(int x){
int t=... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | 22f09b23f3749579fa293932159dd7b3 | 1,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int lim=2e5+1;
int T,l,r,s[lim][19],lg[lim];
template<class T=unsigned> inline T readu(){
T x=0;char c=getchar();
while(!isdigit(c)) c=getchar();
while(isdigit(c)) x=x*10+c-'0',c=getchar();
return x;
}
void bits(int x){
int t=x;
while(x){
s[t][... | C++ | 0601e3636b5d5b6ad0c8c1abb7f83d82 | 4dc6e55501e0b0cd4ae9768f26703707 | 1,300 | PASSED |
/*Arpit Blagan*/
#include<bits/stdc++.h>
using namespace std;
#define all(arr) arr.begin(),arr.end()
#define lli long long int
#define ll long long
const ll INF=1e18;
const ll mod=1e9+7;
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int t;cin>>t;
while(t--){
int n;cin>>n;int sum=0;... | C++ | 644ef17fe304b090e0cf33a84ddc546a | d6d0753c72eae5f7c5ce63d28c7df456 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t; cin >> t;
while(t --) {
int n; cin >> n;
ll s = 0;
for(int i = 0; i < n; i ++) {
int x; cin >> x;
s += x;
}
cout << (s % n ? 1 : ... | C++ | 644ef17fe304b090e0cf33a84ddc546a | afef5480a786091511b361210e045537 | 800 | PASSED |
#pragma GCC optimize("O2")
#include <bits/stdc++.h>
#define ll long long
#define For(i,a,b) for(ll i = a; i <= b; i++)
#define Fd(i,a,b) for(ll i = a; i >= b; i--)
#define task "A"
#define ii pair<ll,ll>
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(),x.... | C++ | 644ef17fe304b090e0cf33a84ddc546a | 7b7a9667c29f93c208a4c24367447eeb | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define um unordered_map
#define pb push_back
#define pob pop_back()
#define pof pop_front()
#define ps pr.second
#define pf pr.first
#define mp make_pair
#define pq priority_queue
ll ga[1000000];
bool isPrime(ll n){
if (n == 1) {
... | C++ | 644ef17fe304b090e0cf33a84ddc546a | 9aaf235a3d1e56ee80bf0d163852cf5d | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{int t;cin>>t;
while(t--)
{ll n;cin>>n;
vector<ll> a;ll s=0;
for(ll i=0;i<n;i++)
{ll u;cin>>u;a.push_back(u);s=s+u;}
if(s%n==0)
{cout<<"0";}
else
{cout<<"1";}
... | C++ | 644ef17fe304b090e0cf33a84ddc546a | 8f5e3a43afe437f724b0b79693b051f9 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
template<typename T> void output_vector(vector<T>& v) { for (int i = 0; i < int(v.size()); i++) cout << v[i] << "\n "[i != int(v.size()) - 1]; }
#define all(x) (x).begin(), (x).end()
using ull = unsigned long long;
const ull U_INF64 = (ull)3e18;
void solve() {... | C++ | 644ef17fe304b090e0cf33a84ddc546a | 0e5464265f83a9ac09e5131ac5638d8a | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
template<typename T> void output_vector(vector<T>& v) { for (int i = 0; i < int(v.size()); i++) cout << v[i] << "\n "[i != int(v.size()) - 1]; }
#define all(x) (x).begin(), (x).end()
using ull = unsigned long long;
const ull U_INF64 = (ull)3e18;
void solve() {... | C++ | 644ef17fe304b090e0cf33a84ddc546a | 01442844328c4cc46f5c17bf4ec4be77 | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
int n,sum=0;
cin>>n;
vector<int>v;
for(int i=0;i<n;i++){
int a;
cin >> a;
v.push_back(a);
}
for(int i=0;i<n;i++){
sum+=v[i];
}
if(sum%n!=0){
cout<< "1" << endl;
}
else{
cou... | C++ | 644ef17fe304b090e0cf33a84ddc546a | 527f0193c264fdd66ab336aa4598dc74 | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main(){
int t,sum,a,n;
cin>>t;
while(t--)
{
cin>>n;
sum=a=0;
for(int i=0;i<n;i++)
{
cin>>a;
sum+=a;
}
cout << ("%d\n",(sum%n)!=0) << endl;
}
} | C++ | 644ef17fe304b090e0cf33a84ddc546a | 2a7d86911d5759d86f293b3116989f75 | 800 | PASSED |
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>
using namespace std;
#define vi vector<int>
#define rep(i, a, b) for(int i=a; i<b; i++)
int main(){
int t;
cin>>t;
while(t--){
int n, i, ans, sum=0;
cin>>n;
vi a(... | C++ | 644ef17fe304b090e0cf33a84ddc546a | d7d9e6a23db30db2aed03042c5aba6aa | 800 | PASSED |
#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PB push_back
#define MP make_pair
#define LPI(i, a, b, d) for (int i = a; i < b; i += d)
using VI = vector<int>;
using VVI = vector<VI>;
using VS = vector<string>;
using VVS = vector<VS>;
using PI... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | ee7d3c33068a4e2f2202639b2148827e | 2,400 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define pii pair<int,int>
#define piii pair<int,pii>
#define sp " "
#define nl "\n"
#define all(x) x.begin(),x.end()
#define fastio() ios_base::sync_with_stdio(0)... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | a5aa8269f344a7f4ee35a86605751626 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define pii pair<int,int>
#define piii pair<int,pii>
#define sp " "
#define nl "\n"
#define all(x) x.begin(),x.end()
#define fastio() ios_base::sync_with_stdio(0)... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | cb827eec703340d7ce449143ca1e46fa | 2,400 | PASSED |
#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 pb push_back
#define ff first
#define ss second
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int inf = 1... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | 91e508ac3b831f42477ef2729bc668b1 | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int nax = 3e5 + 10;
int n, k;
vector <int> g[nax];
int parent[nax];
int dep[nax];
pair <int ,int> dfs(int node, int par) {
vector <pair <int, int>> s;
s.emplace_back(0, node);
parent[node] = par;
for (int to : g[node]) {
if (to != pa... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | 9f64eaf868632fbfa7752eee931ad105 | 2,400 | PASSED |
#define O2 0
#include<bits/stdc++.h>
#if O2
#pragma GCC optimize(2,3)
#endif
#define ll long long
#define lll _int128
#define For(i,j,k) for(int i=(j);i<=(k);i++)
#define Rof(i,j,k) for(int i=(j);i>=(k);i--)
#define ckmx(i,j) if((i)<(j)){(i)=(j);}
#define ckmn(i,j) if((i)>(j)){(i)=(j);}
#define vi vector<int... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | 0e80d53f9b82c90f2baf43ff193be479 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define int long long
#define pb emplace_back
#define pii pair<int,int>
#define ff first
#define ss second
using namespace std;
#define debug(args...) kout("[ " + string(#args) + " ]", args)
void kout() { cerr << endl; }
template <class T, class ...U> void kout(T a, U ...b) { cerr << a... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | 8c9ceeb6f971c25db2476b8f803677ea | 2,400 | PASSED |
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll mod=1000000007;
vector<ll> A[200001];
vector<ll> ans;
template <class T>
T chmin(T x,T y)
{
return x<y?x:y;
}
template <class T>
T chmax(T x,T y)
{
return x>y?x:y;
}
ll dfs(ll v,ll fa)
{
vector<ll> temp;
for(auto i:A[v]... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | a0ecd9a710ebe98532c5c66550c47821 | 2,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int maxn = 2e5;
int sz[maxn];
int id[maxn];
vector<int> g[maxn];
int pred[maxn];
int n;
void dfs(int v, int p) {
pred[v] = p;
sz[v] = 0;
id[v] = -1;
for (int i = 0; i < g[v].size(); ++i) {
int to = g[v][i... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | 3dd9070762abfa3b32a2bd8167f21bfb | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
const ll mod=(ll)1e9+7;
const int N=(int)2e5+5;
int _=1,CNT=-1;
vector<int> app;
int n,k,lef,dep[N],r,b;
ll ans;
int u[N<<1],v[N<<1],nex[N<<1],first[N];
void add(int x,int y){
CNT++;
u[CNT]=x;
v[CNT]=y;
nex[CNT]=first... | C++ | 6c5cf702d85ff25cf9e7bfd16534197d | f15fd90e9a23283c8059c81d2adce9c6 | 2,400 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <sstream>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <numeric>
#include <bitset>
#include <ext/algorithm>
#include <ext/numeric>
#define... | C++ | 90e94d3e0cfa770127f715469db03bbd | cf3f36e3687a8e9a3d522af688c0a971 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <sstream>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <numeric>
#include <bitset>
#include <ext/algorithm>
#include <ext/numeric>
#define... | C++ | 90e94d3e0cfa770127f715469db03bbd | 658e7562dd52b5d38069a2d21ca8699f | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <sstream>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <numeric>
#include <bitset>
#include <ext/algorithm>
#include <ext/numeric>
#define... | C++ | 90e94d3e0cfa770127f715469db03bbd | 185be4c73b07699dac30739985604dac | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <sstream>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <numeric>
#include <bitset>
#include <ext/algorithm>
#include <ext/numeric>
#define... | C++ | 90e94d3e0cfa770127f715469db03bbd | 3f5220601027299a3c45e0a137932eef | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <sstream>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <numeric>
#include <bitset>
#include <ext/algorithm>
#include <ext/numeric>
#define... | C++ | 90e94d3e0cfa770127f715469db03bbd | 578e3e46c18e421269eb7dbea9668c2a | 2,800 | PASSED |
//coding by starch
//qwq
//qwq
//qwq
//qwq
#include<bits/stdc++.h>
using namespace std;
const int N=2e3+5,mod=1e9+7;
int t,n,f[N][N<<1],g[N][N<<1],o=N;
char a[N],b[N];
bool is(char a,int b){return a=='?'||a-'0'==b;}
signed main(){
scanf("%d",&t);
while(t--){
scanf("%d%s%s",&n,a+1,b+1),g[0][o]=1;
f... | C++ | 90e94d3e0cfa770127f715469db03bbd | 407814baadcdd8612c996708829cfdda | 2,800 | PASSED |
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#define int long long
using namespace std;
inline int read(){int x=0,f=1,ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-') f=-1; ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f;}
inline void write(int x){if (x<0) ... | C++ | 90e94d3e0cfa770127f715469db03bbd | f6cc61661b96492a4f205d446c45d16b | 2,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a),i##end=(b);i<=i##end;++i)
#define per(i,a,b) for(int i=(a),i##end=(b);i>=i##end;--i)
//mt19937 Rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
template<typename T>void chkmax(T&x,T y){if(x<y)x=y;}
template<typen... | C++ | 90e94d3e0cfa770127f715469db03bbd | 5a8e34461fc1304ff827f8073a8663e9 | 2,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int N=2e3+10;
const int inf=1e9+10;
const int mod=1e9+7;
int T;
int n;
string s,t;
int f[N][N],g[N][N],cnt[N][N],S[N][N];
bool oks[N],okt[N],valid[N][N];
inline void upd(int&x,int y){x=(x+y)%mod;}
void solve(){
cin>>n>>s>>t;
for(int i=0;i<n;i+=2){
if(... | C++ | 90e94d3e0cfa770127f715469db03bbd | 1c80d2aab64c1a656930ea0b3d8f4f80 | 2,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int N=2e3+5,mod=1e9+7;
int t,n,f[N][N<<1],g[N][N<<1],o=N;
char a[N],b[N];
bool is(char a,int b){return a=='?'||a-'0'==b;}
signed main(){
scanf("%d",&t);
while(t--){
scanf("%d%s%s",&n,a+1,b+1),g[0][o]=1;
for(int i=1;i<=n;i++)
for(int j=-i;j<=i;j++) ... | C++ | 90e94d3e0cfa770127f715469db03bbd | 5bf3ef96eec6058dc667cbb7fcd45711 | 2,800 | PASSED |
/**
* author: andif
**/
#include<bits/stdc++.h>
using namespace std;
#define de(x) cout << #x << " = " << x << endl
#define dd(x) cout << #x << " = " << x << " "
#define rep(i, a, b) for(int i = a; i < b; ++i)
#define per(i, a, b) for(int i = a; i > b; --i)
#define mt(a, b) memset(a, b, sizeof(a))
#defi... | C++ | 884e547e8ccb05e618ec80904b2ea107 | 18ead4fee5761c8d114968656ad397a0 | 2,200 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.