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>
using namespace std;
int main()
{
int t;
cin>>t;
while(t>0)
{
long long int s,a,b,c,fc=0;
unsigned long long int tc=0;
cin>>s>>a>>b>>c;
tc=tc+s/c;
fc=tc/a;
if(fc>=1)
{tc=tc+fc*b;
}
cout<<tc<<endl;
t--;
}
return 0;
} | C++ | ec8060260a6c7f4ff3e6afc9fd248afc | 0e49bf0eae63498c597d29a0a6312d79 | 800 | PASSED |
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <stack>
using namespace std;
// Driver program to test above functions
int main()
{
long long int testcase;
long long int s=0;
long long int a=0;
long long int b=0;
long long int c=0;
// for (int i=0 ; i<testcase ; i++)
// {
// cin>>data[i... | C++ | ec8060260a6c7f4ff3e6afc9fd248afc | 08eeb9d356047ba1c4e5663c9081bb58 | 800 | PASSED |
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <stack>
using namespace std;
// Driver program to test above functions
int main()
{
long long int testcase;
cin>>testcase;
long long int s=0;
long long int a=0;
long long int b=0;
long long int c=0;
// for (int i=0 ; i<testcase ; i++)
// {
... | C++ | ec8060260a6c7f4ff3e6afc9fd248afc | f8f4d8ce535ab5e065c8321468c59e1a | 800 | PASSED |
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <stack>
using namespace std;
/* A binary tree node has data, left child and right child */
struct node
{
int data;
struct node* left;
struct node* right;
};
/* Helper function that allocates a new node with the given data and
NULL left and right... | C++ | ec8060260a6c7f4ff3e6afc9fd248afc | 9666fd04ad9935df38602e6f114aaf8f | 800 | PASSED |
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <stack>
using namespace std;
// Driver program to test above functions
int main()
{
long long int testcase;
long long int s=0;
long long int a=0;
long long int b=0;
long long int c=0;
// for (int i=0 ; i<testcase ; i++)
// {
// cin>>data[i... | C++ | ec8060260a6c7f4ff3e6afc9fd248afc | 9a86a1ef0e8085d950b25dba2551deaf | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
unsigned long s,a,b,c;
unsigned long long int w,x,y,z;
while(t--)
{
cin>>s>>a>>b>>c;
x=s/c;
// cout<<"s="<<s<<" b="<<b<<endl;
y=x/a*b;
// cout<<"y="<<y<<endl;
w=x+y;
cout<<w<<endl;
}
}
| C++ | ec8060260a6c7f4ff3e6afc9fd248afc | db51b6ac6236c7205d24f7b147a9e32c | 800 | PASSED |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{ ll t;
cin>>t;
while(t--){
ll s,a,b,c;
cin>>s>>a>>b>>c;
cout<<((s/c)/a)*b+s/c<<"\n";
}
return 0;
}
| C++ | ec8060260a6c7f4ff3e6afc9fd248afc | 621282f8271effe6d6a53f8ff201259c | 800 | PASSED |
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <string.h>
#include <string>
#include <math.h>
using namespace std;
const int MAXN = 120000;
const int inf = 1000000000;
struct sVector
{
int c[2];
};
struct sEvent
{
int t, tp, bot, top;
};
int n, m, tl;
int dst[MAXN], order[MAXN];
int tx[MAXN],... | C++ | 90fd8635d89e248fa874245a45c1baaa | 3527781e1199b40b47fb7853f749ee21 | 3,000 | PASSED |
import static java.lang.Math.abs;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import static java.util.Arrays.sort;
import java.io.*;
import java.util.*;
public class Subway {
private static void solve() thro... | Java | 90fd8635d89e248fa874245a45c1baaa | 4e440082eb5c903643ff9a36aa31a73e | 3,000 | PASSED |
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define pb push_back
#define mp make_pair
#define sz(x) ((int)(x).size())
typedef long long ll;
t... | C++ | 90fd8635d89e248fa874245a45c1baaa | c5d7488c971551dc6916566ac5c6a5f0 | 3,000 | PASSED |
#include<cstdio>
#include<algorithm>
#include<set>
#define rep(i,x,y) for(int i=(x);i<=(y);i++)
#define dep(i,x,y) for(int i=(x);i>=(y);i--)
#define inf 200000002
#define mx 268435456
#define N 200000
#define M 2000000
using namespace std;
int n,m,k,ll,rr,mid,x1,y1,x2,y2,tot;bool u;
int a[M],L[M],R[M],l[M],r[M],L1[M],R... | C++ | 90fd8635d89e248fa874245a45c1baaa | 8b2de3a46017c4acbc9f5522843b0c04 | 3,000 | PASSED |
#include<cstdio>
#include<cstring>
#include<algorithm>
#define lb lower_bound
#define fo(i,a,b) for(i=a;i<=b;++i)
#define fd(i,a,b) for(i=a;i>=b;--i)
using namespace std;
const int mn=201000,inf=1<<30;
struct node{int x,y;}pt[mn],sub[mn];
struct point{int k,x,y,r;}e[mn*2];
int s1[mn*2],s2[mn*2];
int xs[mn*2],dis[mn],sa... | C++ | 90fd8635d89e248fa874245a45c1baaa | 89c786cc7f9ca69ca21ef5048076a574 | 3,000 | PASSED |
#include<cstdio>
#include<algorithm>
#include<set>
#define rep(i,x,y) for(int i=(x);i<=(y);i++)
#define dep(i,x,y) for(int i=(x);i>=(y);i--)
#define inf 200000002
#define mx 268435456
#define N 200000
#define M 2000000
using namespace std;
int n,m,k,ll,rr,mid,x1,y1,x2,y2,tot;bool u;
int a[M],L[M],R[M],l[M],r[M],L1[M],R... | C++ | 90fd8635d89e248fa874245a45c1baaa | b3d354ab32c8f68d8fd5a1c1de8f69e4 | 3,000 | PASSED |
#include<cstdio>
#include<cstring>
#include<algorithm>
#define lb lower_bound
#define fo(i,a,b) for(i=a;i<=b;++i)
#define fd(i,a,b) for(i=a;i>=b;--i)
using namespace std;
const int mn=201000,inf=1<<30;
struct node{int x,y;}pt[mn],sub[mn];
struct point{int k,x,y,r;}e[mn*2];
int s1[mn*2],s2[mn*2];
int xs[mn*2],dis[mn],sa... | C++ | 90fd8635d89e248fa874245a45c1baaa | 0d4871ee6b06f4a01778e42ea552d45f | 3,000 | PASSED |
#include<cstdio>
#include<algorithm>
#include<set>
#define rep(i,x,y) for(int i=(x);i<=(y);i++)
#define dep(i,x,y) for(int i=(x);i>=(y);i--)
#define inf 200000002
#define mx 268435456
#define N 200000
#define M 2000000
using namespace std;
int n,m,k,ll,rr,mid,x1,y1,x2,y2,tot;bool u;
int a[M],L[M],R[M],l[M],r[M],L1[M],R... | C++ | 90fd8635d89e248fa874245a45c1baaa | a432bd62cd4e14c9f35ba9af5e1b522f | 3,000 | PASSED |
#include<cstdio> //���Ե���վ��Զ�ܶ�����
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<cstdlib>
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
#define MP(a,b) make_pair(a,b)
#define clr(x,y) memset(x,y,sizeof x)
#define fi first
#define se second
using n... | C++ | 90fd8635d89e248fa874245a45c1baaa | cd8c873983546ea9833fd299185ff483 | 3,000 | PASSED |
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <sstream>
using namespace std;
#define MP make_pair
#define PB push_back
#define sqr(x) ((x)*(x))
#define lowbit... | C++ | 90fd8635d89e248fa874245a45c1baaa | 05a913d26ff097432cbd500b38a3775e | 3,000 | PASSED |
#define MYDEBUG
//#pragma comment(linker, "/STACK:102400000,102400000")
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <string>
#include <cstring>
#include <ctime>
#include <stack>
#include <vector>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <list>
... | C++ | 3dc5850220458dec9876560150b612c4 | 5a4da7ed52a03b0309579a820445c180 | 1,400 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define pb push_back
#define mp make_pair
#define For(i, n) for (int i=0;i<n;i++)
#define ForN(i, n) for (int i=1;i<=n;i++)
typedef long long ll;
typedef pair<ll, ll> pll;
void func() {
int n, k;
cin >> n >> k;
int last;
cin >> l... | C++ | 3dc5850220458dec9876560150b612c4 | c35ce6264a776d1aa0f50436b8e749b5 | 1,400 | PASSED |
//Bismillahir Rahmanir Rahim//
// Bismillahir rahmanir rahim
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define first ff
#define second ss
#define pb push_back
/* stuff you should look for
* int overflow, array bounds
* special cases (n=1?), set tle
* do smth instead of nothing and s... | C++ | 3dc5850220458dec9876560150b612c4 | b3e73f12df8777f072654770b99b7069 | 1,400 | PASSED |
//Bismillahir Rahmanir Rahim//
// Bismillahir rahmanir rahim
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define first ff
#define second ss
#define pb push_back
/* stuff you should look for
* int overflow, array bounds
* special cases (n=1?), set tle
* do smth instead of nothing and s... | C++ | 3dc5850220458dec9876560150b612c4 | 650e72a583b0585178b8841250d3a1c4 | 1,400 | PASSED |
/* Author : the_compiler */
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int siz =1e5+7;
const int siz2=2e5+7;
int t,n,k;
int a[111];
set<int>s,st;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
cin>>t;
A: while(t--)
{
cin>>n>>k; ... | C++ | 3dc5850220458dec9876560150b612c4 | e425201792310e7b7885d0da507edca3 | 1,400 | PASSED |
#include <iostream>
#include <vector>
#include <set>
using namespace std;
set<int> vec;
int main()
{
int tcase, n, k;
cin >> tcase;
for (int i = 0; i < tcase; i++)
{
cin >> n >> k;
vec.clear();
for (int j = 0; j < n; j++)
{
int tmp;
cin >> tmp;
... | C++ | 3dc5850220458dec9876560150b612c4 | 51280485540f1ee06493b02e930bbb40 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
void runcase(){
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0 ; i < n ; i++ )
cin >> a[i];
int changes = 0;
k--;
// since a is sorted, just check adjacent elements to get number of distinct elements
for ( int i = 1 ; i < n ; i++ )
if ( a[i] != ... | C++ | 3dc5850220458dec9876560150b612c4 | 91fb3df06dfd198427faa75fc4429cc9 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
void runcase(){
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0 ; i < n ; i++ )
cin >> a[i];
int changes = 1;
// since a is sorted, just check adjacent elements to get number of distinct elements
for ( int i = 1 ; i < n ; i++ )
if ( a[i] != a[i - ... | C++ | 3dc5850220458dec9876560150b612c4 | 4070b7aa81cbec17c33d2bb48ed96846 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std ;
map<int,int> m ;
vector<int> v ;
main (){
int t ;
cin >> t;
while (t--){
int n , k ;
cin >> n >> k;
int sum = 0 ;
int x ;
for (int i = 0 ; i< n ;i++){
cin >> x;
m[x]++;
if (m[x]==1)v.push_back(x);
}
int s = v.size()-1;
if (s==0)cout ... | C++ | 3dc5850220458dec9876560150b612c4 | b802c5d5574cc53457b9bc005e3dec36 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[110];
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
ll T;
cin>>T;
while(T--){
ll n,k;
cin>>n>>k;
for(ll i=1;i<=n;i++) cin>>a[i];
if(k==1){
ll flag=0;
... | C++ | 3dc5850220458dec9876560150b612c4 | 76c10f661f8a364a5a6bc38d6d6f760f | 1,400 | PASSED |
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <string>
#include <iostream>
#include <list>
#include <cstdlib>
#include <bitset>
//#define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 2... | C++ | a8c5b1377035f0a772510b5b80588d47 | fd74e4dcca5e13dea5d15fac3bd7dbf3 | 1,800 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pi pair<ll, ll>
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define vi vector<ll>
#define vvi vector<vi>
#define vp vector<pi>
#define vvp vector<vector<pi>>
#define f(i, n) for(int i = 0; i < n; i++)
#define fo(i, a, n) ... | C++ | a8c5b1377035f0a772510b5b80588d47 | 4287d582d9a4baf35e7ad47df51cacc1 | 1,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define SPEED ios_base::sync_with_stdio(false);cin.tie(NULL);
typedef long long ll;
ll a,ans,k,f,s1,s2,cnt;
ll t[100005];
int n;
ll quick(ll a,ll b){
ll res=1;
while(b){
if(b&1)res=res*a;
a*=a;
b>>=1;
}
if(res>1e5+5)return -1;
return res;
}
int main()
{
cin>... | C++ | a8c5b1377035f0a772510b5b80588d47 | 9bc303e0f65715f5c8363356a47cc217 | 1,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define SPEED ios_base::sync_with_stdio(false);cin.tie(NULL);
typedef long long ll;
ll t[100005],a,cnt,s1,s2;
ll quick(ll a,ll b){
ll res=1;
while(b){
if(b&1)res=res*a;
a*=a;
b>>=1;
}
if(res>1e5+5)return -1;
return res;
}
int main()
{
SPEED;
int n;
... | C++ | a8c5b1377035f0a772510b5b80588d47 | b850eb39c3584cd882bb82571c9f54a2 | 1,800 | PASSED |
#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <functional>
#include <map>
#include <queue>
#include <deque>
#include <set>
#include <bitset>
using namespace std;
#define fi first
#define se second
#define p_b push_back
#define all(n) n.begi... | C++ | a8c5b1377035f0a772510b5b80588d47 | 09c740d1b2085493d2bd6109a2b63a0f | 1,800 | PASSED |
#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <functional>
#include <map>
#include <queue>
#include <deque>
#include <set>
#include <bitset>
using namespace std;
#define fi first
#define se second
#define p_b push_back
#define all(n) n.begi... | C++ | a8c5b1377035f0a772510b5b80588d47 | 7f8e1a2a8cc6343c482ff3d148e36524 | 1,800 | PASSED |
/*input
2 2
40 90
*/
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
#pragma GCC optimize("unroll-... | C++ | a8c5b1377035f0a772510b5b80588d47 | c581bba2d0fda1de26d5e1506b1a383d | 1,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ff first
#define ss second
#define endl '\n'
vector<pair<int, int> > factors;
vector<pair<int, int> > complement;
map<vector<pair<int, int> >, int> mp;
void factorize(int n, int k) {
factors.clear();
complement.clear();
int f;
for (f = ... | C++ | a8c5b1377035f0a772510b5b80588d47 | 233187fcb6c62738c34ea7658e9ce999 | 1,800 | PASSED |
#include <cstdio>
typedef long long ll;
const int N = (int)1e5+2;
int n, k, a[N];
int p[320], pTot;
bool isnP[320];
int hashmap[N];
ll ans;
inline ll read()
{
ll x = 0; char ch = getchar();
for(; ch>'9'||ch<'0'; ch = getchar());
for(; ch>='0'&&ch<='9'; ch = getchar()) x = (x<<1)+(x<<3)+ch-48;
return x;
}
inline voi... | C++ | a8c5b1377035f0a772510b5b80588d47 | bca3ce7bded2a60f6b0fb3397baa078d | 1,800 | PASSED |
#include <cstdio>
typedef long long ll;
const int N = (int)1e5+2;
int n, k;
//bool isnP[320];
int p[66] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, ... | C++ | a8c5b1377035f0a772510b5b80588d47 | dc0a9e7ea1ab9dd5c551f55ab2c601c7 | 1,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
int n,a,b;
for(int i=0; i<t; i++){
cin >> n >> a >> b;
string s;
int add=-1;
for(int j=0; j<n; j++){
s.push_back(char(int('a')+j%b));
}
cout << s << endl;
}
} | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | 9a8a13f8b76c72a6829ebe57c7fb3cb4 | 900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef vector<str> vs;
typedef vector<pi>... | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | 6800e3a7c2564e1fd6e01619a5438421 | 900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main()
{ string s;
long t, i,n,a,b,j;
cin >> t;
for(j=1;j<=t;j++)
{
cin >> n >> a >> b;
for (i=0;i<n;++i)
{
cout << char('a'+i%b);
}
cout << endl;
}
return 0;
}
| C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | 1e4d3dc274759cff679e638683f508ea | 900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n, a, b;
cin >> n >> a >> b;
for (int i = 0; i < n; ++i) {
cout << char('a' + i % b);
}
cout << endl;
}
return 0;
}
| C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | bd0e9728a038bd3bfcfb129b963460c2 | 900 | PASSED |
#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL) ; std::cout.tie(NULL);
int t;
std::cin >> t;
char alphabet[27] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','... | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | 7e269017913e1d0836cf85dca326e4c2 | 900 | PASSED |
#include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--)
{
int a, b, n;
cin >> n >> a >> b;
int list[26];
int count = 0;
for (int i = 0; i < n; i++) {
printf("%c",count%26+'a');
count=(count+1)%b;
}
printf("\n");
}
return 0;
} | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | a02a63e0fe6eba83a35ca37318554a21 | 900 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int t,i,j,n,a,b,k;
cin>>t;
while(t--){
cin>>n>>a>>b;
string s;
char ch='a';int c=a;
map<string,int> mp;
for(i=0;i<a;i++){
s+=ch;c--;
if(c<b) ch++;
}
mp[s]=1;
for(i=1;i<n-a+1;i++){
map<int,int> mp1;int c1=0;
f... | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | 7858deb5f4ed3066bb80cacbf53d2d5c | 900 | PASSED |
#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;
#define light ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define ll long long
#define ld long double
#define endl "\n"
#define p0(a) cout << ... | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | 1751427148933628bb4a0f44cef5d26f | 900 | PASSED |
#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;
#define light ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define endl "\n"
#define pb push_back
#define F first
#define S second
#define lb l... | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | 8d46aaa6f052c3a6a75aeac9e9f8c41e | 900 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
string s="abcdefghijklmnopqrstuvwxyz";
//string s={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','x','y','z'};
int n,a,b;
cin>>n>>a>>b;
char arr[10000]={0};
int j=0;
for(int i=0... | C++ | a82f15c1b0ddcacc1de966be20cfc5a2 | be4d8d99e6434daa295c7d6711bb627d | 900 | PASSED |
#include<bits/stdc++.h>
#include <iostream>
#include <string.h>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#define ls l,m,rt<<1
#define rs m+1,r,rt<<1|1
#define ll long long
#define pb push_back
#define mem(a, b) memset(a, b, sizeof(a))
const ll inf=0x3f3f3f3f3f3f;
const int INF=INT_MAX;
using namespace ... | C++ | fbec761a428198f5e624c4895e395da3 | 43c5e629091e10e23316378777847915 | 2,100 | PASSED |
// #include<bits/stdc++.h>
// #define f first
// #define s second
// using namespace std;
// const int N=2e3+5;
// int loc_umbrella[N], umbrella[N];
// int n, m, en, rain[N];
// pair<int, int>segs[N];
// int solve(int i, int j)
// {
// if(i==a)
// return 0;
// if(rain[i] && !j)
// return 1e9;
// if(dp[i][j]!=-1)... | C++ | fbec761a428198f5e624c4895e395da3 | ec4321033b88dc26b93419018fc425d9 | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,lessl<int>, rb_tree_tag,tree_order_statistics_node_updat... | C++ | fbec761a428198f5e624c4895e395da3 | 077419bb069a2216eadcf714b1b73cfa | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,lessl<int>, rb_tree_tag,tree_order_statistics_node_updat... | C++ | fbec761a428198f5e624c4895e395da3 | 681af935ee465f59f401b9b5cb325189 | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,lessl<int>, rb_tree_tag,tree_order_statistics_node_updat... | C++ | fbec761a428198f5e624c4895e395da3 | 10a84405ef549a4f175b403821d956d6 | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,lessl<int>, rb_tree_tag,tree_order_statistics_node_updat... | C++ | fbec761a428198f5e624c4895e395da3 | 15741b39fa02089951bcbcc29fa22365 | 2,100 | PASSED |
#include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int dp[2005];
bool rain[2005];
int ub[2005];
int main()
{
int n,m,a;
cin >> a >> n >> m;
rain[0] = false;
ub[0] = 0x3f3f3f3f;
for(int i = 1;i <= 2004; i++)
rain[i] = false,dp[i] = 0x3f3f3f3f,ub[i] = 0x3f3f3f3f;
for(int i = 1;i <= n; i+... | C++ | fbec761a428198f5e624c4895e395da3 | ef481ff6eb64bd5348b91f6b4425d31a | 2,100 | PASSED |
#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
class Solution {
public:
int mininumFatigue(int a, vector<vector<int>>& segments, vector<vector<int>>& umbrellas) {
sort(segments.begin(), segments.end());
sort(umbrellas.begin(), umbrellas.end());
int n = segmen... | C++ | fbec761a428198f5e624c4895e395da3 | 36b7bf115ea1253fd4224e25fbed6860 | 2,100 | PASSED |
#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
class Solution {
public:
//buggy - can't pass test#19...
int mininumFatigue(int a, vector<vector<int>>& segments, vector<vector<int>>& umbrellas) {
sort(segments.begin(), segments.end());
sort(umbrellas.begin(), um... | C++ | fbec761a428198f5e624c4895e395da3 | d7163ce41f2ac2b9d4c7932f43936976 | 2,100 | PASSED |
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<iostream>
using namespace std;
int a,n,m;
int l[2005],r[2005];
int v[2005];
int dp[2005];
int p[2005],w[2005];
int main(){
cin>>a>>n>>m;
for(int i=1;i<=n;i++){
cin>>l[i]>>r[i];
}
for(int i=1;i<=m;i++){
cin>>p[i]>>w[i];
}
mem... | C++ | fbec761a428198f5e624c4895e395da3 | 5632745ca77d5ed84b95f9e905298481 | 2,100 | PASSED |
#include<bits/stdc++.h>
#define ll long long int
#define loop(i,start,end) for(ll i = start; i< end; i++)
#define rloop(i,start,end) for(ll i = start; i> end; i--)
#define pb push_back
#define f first
#define s second
#define all(v) v.begin(),v.end()
#define v(dtype) vector <dtype>
ll MOD = 1000000007;
using namespace ... | C++ | 3bd5a228ed5faf997956570f96becd73 | eb5bc45cd0f73134f20ad1924944e10d | 1,400 | PASSED |
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int a[500][500];
ll row[500];
ll col[500];
ll d[2];
int main ()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
int x , y;
for (int i=0; i<n; i++)
{
for (int j=0; j<n; j++)
{
... | C++ | 3bd5a228ed5faf997956570f96becd73 | ff91dc09ab659b44ccd97a3e445d12bb | 1,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define no cout<<"NO"<<endl
#define yes cout<<"YES"<<endl
/*
int bin(int ara[],int n, int k)
{
int l=0,h=n-1,mid,ans=0;
while(l<=h)
{
mid=(l+h)/2;
if(ara[mid]>=k)
{
... | C++ | 3bd5a228ed5faf997956570f96becd73 | ea67a18d15bae712117c930b691e8c4e | 1,400 | PASSED |
#include <iostream>
using namespace std;
typedef long long ll;
int main(){
ll n;
cin >> n;
ll a[n][n];
ll x, y, sum = 0, q = 0;
for(ll i = 0; i < n; i++){
ll sm = 0;
for(ll j = 0; j < n; j++){
cin >> a[i][j];
if(a[i][j] == 0){
x = i;
y = j;
q = 1;
}
sm += a[i][j];
}
if(q... | C++ | 3bd5a228ed5faf997956570f96becd73 | 14526c889f80f9b8444c6a0c658c1fd1 | 1,400 | PASSED |
#define nl "\n"
#define ll long long int
#define ull unsigned long long
#define pb push_back
#define SIZE(a) (int)a.size()
#define SORT(v) sort(v.begin(),v.end())
#define REV(v) reverse(v.begin(),v.end())
#define ff first
#define... | C++ | 3bd5a228ed5faf997956570f96becd73 | 1f52fd98521ba5245c31dc11d6192b7f | 1,400 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define itn int
#define ms(x,y) memset(x,y,sizeof(x))
#define f first
#define s second
#define pb push_back
#define pob pop_back
#define nl "\n" ;
#define loop(i,x,n) for ( int i = x ; i < n ; i++ )
#define revloop(n) for ( int i = n - 1 ; i >= 0 ; i-- )a
#define sp setprec... | C++ | 3bd5a228ed5faf997956570f96becd73 | fa16d29b5a6063199e4d31870671100e | 1,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ld long double
#define ll long long
#define MOD 1000000007
void solve(){
int n;
cin >> n;
if(n == 1){
cout << 1 << endl;
return;
}
ll arr[n][n];
int l, k;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> arr[i][j];
if(arr[i][j] ... | C++ | 3bd5a228ed5faf997956570f96becd73 | f528fe12e83e67103df59cd7caeff495 | 1,400 | PASSED |
// Devarshi
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define ll long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i,n) for(i=0;i<n;i++)
#define forn(i, n) for (ll i... | C++ | 3bd5a228ed5faf997956570f96becd73 | 810ffb1e9d304df9cbfd14a3121447da | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265358979323
#define ll long long int
#define vi vector <int>
#define vl vector <ll>
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define MOD 1000000007
ll power(ll a, ll b) { //a^b
ll res = 1;
a = a % MOD;
while (b > 0) {
if (b & 1) {res... | C++ | 3bd5a228ed5faf997956570f96becd73 | 558d7d87418d8a77fd07dcee6622a0e5 | 1,400 | PASSED |
#include<iostream>
using namespace std;
int main()
{
long long int n,sum=0,sum1=0,tempi,tempj;
cin>>n;
long long int arr[n][n];
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin>>arr[i][j];
if(arr[i][j]==0)
{
tempi=i;
tempj=j;
}
}
}
if(n==1)
{
cout<<1;
return 0;
}
for(int i=0... | C++ | 3bd5a228ed5faf997956570f96becd73 | fd6596975d418bb01d480ff17890e423 | 1,400 | PASSED |
#include<iostream>
#include<vector>
#include<cmath>
#include<string>
#include<stack>
#include<queue>
#include<deque>
/*
long long f(int a, int b)
{
if (a <= 0 || b <= 0)
return a + b;
if (a > b)
return f(a%b, b);
return f(a ,b%a);
}
*/
/*
std::vector<std::vector<int>> f(std::vector<std::vector<int>>& v, int... | C++ | e30085b163c820cff68fb24b94088ec1 | 1e041c91bc084c0998af055e7d0f72c3 | 1,200 | PASSED |
#include <iostream>
#include <string>
using namespace std;
int dp[200005];
int main() {
int n;
cin >> n;
string s;
cin >> s;
dp[0] = 0;
for (int i = 0; i < n; i++) {
if (s[i] == '(') {
dp[i + 1] = dp[i] + 1;
}
else {
dp[i + 1] = dp[i] - 1;
}
if (dp[i] <= -2) {
cout << "NO\n";
return 0;
... | C++ | e30085b163c820cff68fb24b94088ec1 | f1e31c8afeda4051950903a28357398e | 1,200 | PASSED |
#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <string>
#include <time.h>
#include <random>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <string... | C++ | e30085b163c820cff68fb24b94088ec1 | f35e8636061f93ac5730391f40c8d954 | 1,200 | PASSED |
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <string>
using namespace std;
void solve() {
int n;
string s;
cin >> n >> s;
if (n % 2) {
cout << "No";
return;
}
int b = 0, br = 0;
for (int i = 0; i < n; i++) {
if (... | C++ | e30085b163c820cff68fb24b94088ec1 | 49f28d5c7116e042a8e418d29322615b | 1,200 | PASSED |
#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <string>
#include <set>
#include <cmath>
#include <numeric>
typedef long int lint;
typedef long long int llint;
using namespace std;
int findGCD(int a, int b) {
if (a == 0) {
return b;
}
return findGCD(b % a, a);
}
int nok(in... | C++ | e30085b163c820cff68fb24b94088ec1 | 67d32a9d9546aaf2f0837543fdf23fe4 | 1,200 | PASSED |
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
using namespace std;
int main(){
long long int n;
char tmp;
bool swap=true,sw=false;
queue<char> a;
cin >> n;
if(n%2==0){
cin.get(tmp);
for(int i=0;i<n;i++){... | C++ | e30085b163c820cff68fb24b94088ec1 | 47b8532209f51ad6ff2841a613992b5a | 1,200 | PASSED |
#include<iostream>
using namespace std;
int main()
{
int n,top=0,count1=0;
cin>>n;
char a[200005],b[200005];
for(int i=1;i<=n;i++)
{
cin>>a[i];
if(a[i]=='(') {b[++top]=a[i];count1++;}
if(a[i]==')')
{
if(count1==0) b[++top]=a[i];
else
{
top--;
count1--;
}
}
// cout<<top;
}
// cout<<... | C++ | e30085b163c820cff68fb24b94088ec1 | fbb4abd9622ae3bf8f88bd4d9a132047 | 1,200 | PASSED |
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
int n;
int l=0,r=0;
char ch;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>ch;
if(ch=='(')
l++;
else if(l!=0)
l--;
else if(l==0)
r++;
}
if(l>1||r>1||abs(l-r)>0)
cout<<"No";
else
cout<<"Yes";
... | C++ | e30085b163c820cff68fb24b94088ec1 | e1778609ca17dbed3161089df03ccaed | 1,200 | PASSED |
//#include <bits/stdc++.h>
#include<iostream>
#include<stdio.h>
#include<cstring>
#include<cstdio>
#include<stdlib.h>
#include<sstream>
#include<list>
#include<math.h>
#include<map>
#include<set>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<fstream>
#include<vector>
#include<algorithm>
#include <queue>
#... | C++ | e30085b163c820cff68fb24b94088ec1 | e0a544c5476aac50cb3d49fbe5391997 | 1,200 | PASSED |
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<stack>
using namespace std;
#define INF 0x7f7f7f7f
#define ll long long
#define maxn 400005
int main()
{
int n;
char a[200005];
char b[200005];
cin>>n;
getchar();
cin>>a;
int counter=0;
i... | C++ | e30085b163c820cff68fb24b94088ec1 | f6a9f5410b98f9853b4ed6b7ec0fc808 | 1,200 | PASSED |
#include <iostream>
#include <vector>
using namespace std;
typedef long long int ll;
const ll modulo=998244353;
void anyade(int &a,ll b)
{
a=(a+b)%modulo;
}
int numdigitos(int x)
{
int num=0;
for (;x;x/=10) num++;
return num;
}
const int limite=2010;
int maneras[limite][limite][11];
int formas[limite][li... | C++ | 667e320912f115d0b598bb45129b5845 | e1f673a48a2951bf9b691b891d59784f | 2,400 | PASSED |
/*
⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷⠈⣿⡆⢹⢷⡌⠻⡾⢋⣱⣯⣿⣿⣿⣿⡆⢻⡿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡎... | C++ | 667e320912f115d0b598bb45129b5845 | 4ca8c395086aa5c440cb570c157a8704 | 2,400 | PASSED |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#define FINAL_OUT(x) {cout << (x) << '\n'; exit(0);}
int const mod = 998244353;
inline void safe_add(int& x, const int y)
{
x += y;
if (x >= mod)
x -= mod;
}
inline int ... | C++ | 667e320912f115d0b598bb45129b5845 | 36f58a57613adae0153ea3648a04507a | 2,400 | PASSED |
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using... | C++ | 667e320912f115d0b598bb45129b5845 | c095ee139eb0f8d20ec751092534e5f5 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define FOR(i,b,e) for(int i=(b); i <= (e); ++i)
#define FORD(i,b,e) for(int i=(b); i >= (e); --i)
#define REP(i,n) for(int i=0; i < (n); ++i)
#define SIZE(c) (int) (c).size()
#define ALL(c) (c).begin(), (c).end()
#define PB push_back
#define MP make_pair
#define ST first
#define ND second
#de... | C++ | 667e320912f115d0b598bb45129b5845 | 410784d4f1b53443f5e6bc16a33c955f | 2,400 | PASSED |
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
const int MAXN= 2000 + 10;
const int MAXC= 2 * MAXN + 10;
const int mod = 998244353;
int n;
int fact[MAXC];
int C[MAXC][MAXC];
vector <int> Q[2];
inline int add (int x, int y) { int ret = x + y; if (ret >= mod) ret-= mod... | C++ | 667e320912f115d0b598bb45129b5845 | fa1656457ae926641dd2e27ecdc3bb77 | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef long double llf;
const int mod = 998244353;
const int MAXN = 2005;
vector<int> a;
lint d1[MAXN][MAXN][11];
lint f(int x, int y, int m){
if(x == a.size()) return (y == 0 && m == 0);
if(~d1[x][y][m]) return d1[x][y][m];
lint ans1 = f(x + 1,... | C++ | 667e320912f115d0b598bb45129b5845 | 7df0a9aaea7c508fe9e1d564e7d91c2a | 2,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ldbl;
typedef pair<int, int> pii;
typedef pair<uint, uint> puu;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;
typedef vector<int> vi;
typedef vector<uint> vu;
typedef... | C++ | 667e320912f115d0b598bb45129b5845 | 06a73e6b22ed56cb90689e5a4b639563 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define sz(x) ((int)x.size())
using namespace std;
using ll = long long; using ull = unsigned ll; using ld = long double;
constexpr int inf = 1e9;
constexpr int mod = 998244353;
int main()
{
ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(15);... | C++ | 667e320912f115d0b598bb45129b5845 | 194bd3d46acde8746c4fd35a7caaa869 | 2,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
template<class T, class U>
void ckmin(T &a, U b)
{
if (a > b) a = b;
}
template<class T, class U>
void ckmax(T &a, U b)
{
if (a < b) a = b;
}
#define MP make_pair
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se seco... | C++ | 667e320912f115d0b598bb45129b5845 | 6c8d972659c9828fe4bcabfcc7f90807 | 2,400 | PASSED |
//In the name of God
//SMani24
#include<bits/stdc++.h>
#define endl '\n'
#define debug(x) cerr<<#x<<"="<<x<<endl
using namespace std;
const int mn=2e5+100;
int n,p[mn],seg[4*mn],lazy[4*mn],ja[mn],m;
vector<pair<int,int> > queries[mn];
vector<int> divisor[mn],mazareb[mn];
int ans[mn];
void shift(int id,int l,int r){
... | C++ | 213c24f8932d466b91f5c24142f56e5e | 6b241a9c56f39f2ef40431959d721525 | 2,200 | PASSED |
//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);
#define all(x) x.begin(),x.end()
#define F first
#define S second
#define fo(i,n) for(int i=0;... | C++ | 213c24f8932d466b91f5c24142f56e5e | 8ef6d6cc8aaa37111626be2623fa770f | 2,200 | PASSED |
//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);
#define all(x) x.begin(),x.end()
#define F first
#define S second
#define fo(i,n) for(int i=0;... | C++ | 213c24f8932d466b91f5c24142f56e5e | 775309d5271c51936392bd84648d6bf6 | 2,200 | PASSED |
#include <bits/stdc++.h>
#define pb push_back
#define ll int //***********************************************************************//
using namespace std;
ll n;
ll a[200005];
ll q;
vector<ll> p[200005];
vector<pair<ll,ll> > qu[200005];
ll tree[800005];
ll pos[200005];
ll ans[200005];
ll INVAL = -1e9;
void upd(ll id... | C++ | 213c24f8932d466b91f5c24142f56e5e | 8697f80ea73801338830a9ab58ccb242 | 2,200 | PASSED |
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define pb push_back
#define ll int //***********************************************************************/... | C++ | 213c24f8932d466b91f5c24142f56e5e | 52f658360a2aaea3bf485e412106f841 | 2,200 | PASSED |
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define pb push_back
#define ll int //***********************************************************************/... | C++ | 213c24f8932d466b91f5c24142f56e5e | cac7481ef606d1e5edabcafa1ce837ed | 2,200 | PASSED |
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iomanip>
#include <functional>
#pragma optimize GCC("O3")
typedef long long ll;
typedef long double ld;
using namespace... | C++ | 213c24f8932d466b91f5c24142f56e5e | 9ccd94d3156c191ce5df2a8da199b597 | 2,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define S second
#define F first
#define pb push_back
#define B(c) (c).begin()
#define E(c) (c).end()
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).ren... | C++ | 213c24f8932d466b91f5c24142f56e5e | eb7c88757514e361d51794f229eb3eac | 2,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define S second
#define F first
#define pb push_back
#define B(c) (c).begin()
#define E(c) (c).end()
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).r... | C++ | 213c24f8932d466b91f5c24142f56e5e | c4d53e5cde001f1b37448993db9a1c8d | 2,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define S second
#define F first
#define pb push_back
#define B(c) (c).begin()
#define E(c) (c).end()
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).ren... | C++ | 213c24f8932d466b91f5c24142f56e5e | 010da0aca68ea43c2ef5e0104865e57b | 2,200 | PASSED |
#include<cstdio>
#include<iostream>
using namespace std;
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0};
int dot_left = 0;
int n,m;
char c[2005][2005];
bool in_bound(int i, int j) {
return i >= 0 && i < n && j >= 0 && j < m;
}
bool valid(int i, int j) {
return in_bound(i, j) && c[i][j] == '.';
}
int cnt_o... | C++ | 9465c37b6f948da14e71cc96ac24bb2e | dfa7110321a933f39c4639b0026eacbf | 2,000 | PASSED |
#include<cstdio>
#include<iostream>
using namespace std;
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0};
int dot_left = 0;
int n,m;
char c[2005][2005];
bool in_bound(int i, int j) {
return i >= 0 && i < n && j >= 0 && j < m;
}
bool valid(int i, int j) {
return in_bound(i, j) && c[i][j] == '.';
}
int cnt_o... | C++ | 9465c37b6f948da14e71cc96ac24bb2e | 2d67dc1efcfa3785bc45102fbf1270e5 | 2,000 | PASSED |
#include<cstdio>
#include<iostream>
using namespace std;
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0};
int options[2005][2005];
int dot_left = 0;
int n,m;
char c[2005][2005];
bool in_bound(int i, int j) {
return i >= 0 && i < n && j >= 0 && j < m;
}
bool valid(int i, int j) {
return in_bound(i, j) && c[i... | C++ | 9465c37b6f948da14e71cc96ac24bb2e | 0d0809ed3c2dcea4da8cd2f0e1c5d50b | 2,000 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.