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 <stdio.h> int main(void) { int n; int hh,mm; scanf("%d",&n); scanf("%d:%d", &hh, &mm); if( n == 12) { while(hh<1) hh+=10; while(hh>12) hh-=10; while(mm>=60) mm-=60; } else if( n == 24) { while(hh<...
C
88d56c1e3a7ffa94354ce0c70d8e958f
3daf5000b5ebb47e754421ae8c987988
1,300
PASSED
/* Problem: 722A - Broken Clock */ /* Solver: Gusztav Szmolik */ #include <stdio.h> #include <string.h> #include <ctype.h> int main () { unsigned short tf; unsigned char tm[7]; unsigned short h; unsigned short m; if (scanf("%hu",&tf) != 1) return -1; if (tf != 12 && tf != 24) ...
C
88d56c1e3a7ffa94354ce0c70d8e958f
6491916d048e8aa381d1a1faa1f7b616
1,300
PASSED
#include<stdio.h> int main() { char h1, h2, m1, m2; int form; scanf("%d\n", &form); scanf("%c%c:%c%c", &h1,&h2,&m1,&m2); if (form == 12) { if (h1 > '1') { if (h2 != '0') { h1 = '0'; } else { h1 = '1'; } } if (h1 == '0'&&h2 == '0') { h2 = '1'; } if(h1 == '1'&&h2 > '2'){ h2 = '0...
C
88d56c1e3a7ffa94354ce0c70d8e958f
180a29068d293b57af3ed0144797026c
1,300
PASSED
#include <stdio.h> #include <stdlib.h> int main(void) { int format; char hh[3], mm[3]; scanf("%d\n", &format); hh[0]=getchar(); hh[1]=getchar(); getchar(); mm[0]=getchar(); mm[1]=getchar(); hh[2]='\0'; mm[2]='\0'; int m=atoi(mm), h=atoi(hh); if(m>59) mm[0]='0'; ...
C
88d56c1e3a7ffa94354ce0c70d8e958f
cb08db9b7a25fc2f6bf5655c903f1add
1,300
PASSED
#include <stdio.h> #include <string.h> int main() { //freopen ("lel.in","r",stdin); int format; int h,m; scanf("%d",&format); scanf("%2d:%2d",&h,&m); if(format==24) { if(h>23) h=h%10; if(m>59) m=m%10; } else if(format==12) { if(h==0) h=1; if(h>12 && h%10!=0) h=h%10; else if(h>12) h=10; if(m...
C
88d56c1e3a7ffa94354ce0c70d8e958f
2b338822baa846554fc9c1be6f51d941
1,300
PASSED
#include<stdio.h> int main() { int a,h,m; scanf ("%d\n", &a); a = a / 12; scanf ("%d:%d", &h, &m); if ( a == 1) { if (h > 12) h = h % 10; if (h == 0) h = 10; if (m > 59) m = m % 10; } else { if (h > 24) h = h % 10; if (h == 24) h = 14; if (m > 59) m = m % 10; } printf ("%02d:%02d", h, m ); ret...
C
88d56c1e3a7ffa94354ce0c70d8e958f
a6f3ada5415f077f7ffd35801b6f049a
1,300
PASSED
#include <stdio.h> int main (){ int format,h1,h2,m1,m2,hh,mm; scanf ("%d",&format); scanf ("%1d%1d:%1d%1d",&h1,&h2,&m1,&m2); hh=h1*10+h2; mm=m1*10+m2; if (format==24){ if (hh>=24) h1=0; if (mm>=60) m1=0; }else { if (hh> 12) h1=0; if (mm>=60) m1=0; if (h1==0 && h2==0) ...
C
88d56c1e3a7ffa94354ce0c70d8e958f
e6368f3076e5ac06a287a48281756e1c
1,300
PASSED
#include <stdio.h> int main(){ int n; char h1, h2, m1, m2; scanf("%d\n", &n); scanf("%c%c:%c%c", &h1, &h2, &m1, &m2); if(n == 24){ if(h1 == '2' && h2 > '3'){ h2 = '0'; } else if(h1 > '2'){ h1 = '0'; } } else{ if(h1 == '0' && h2 == '0'){ h1 = '1'; } else if(h1...
C
88d56c1e3a7ffa94354ce0c70d8e958f
9b3fbfa2c4be558959c5d364aaa9700f
1,300
PASSED
#include<stdio.h> int main() { int n; int a,b; scanf("%d",&n); scanf("%d:%d",&a,&b); if(n==24) { if(0<=a&&a<=23) { if(a<=9) printf("0"); printf("%d",a); } else { if(a/10==2) printf("20"); else { a%=10; printf("%d",10+a); } } } else if(n==12) { if(1<=a&&a<=12) ...
C
88d56c1e3a7ffa94354ce0c70d8e958f
ecd5079a190e9ebe11d31abe9e9f79eb
1,300
PASSED
#include <stdio.h> #include <stdlib.h> int main() { int stat; scanf("%d", &stat); char s[10]; scanf("%s", &s); if (s[3] > '5') s[3] = '5'; if (stat == 12){ if ((s[0] > '1') && (s[1] != '0')) s[0] = '0'; else if (s[1] == '0') s[0] = '1'; else if ((s[0] == '1') && (s[1] > ...
C
88d56c1e3a7ffa94354ce0c70d8e958f
4a4917ba77eeaf7307328b5ae5ea656c
1,300
PASSED
#include<iostream> #include<cstdio> #include<cstring> using namespace std; typedef long long LL; const int maxn=1e5+10; LL a[maxn],b[maxn],f[maxn]; int q[maxn]; bool better(int j,int k,LL x) { return (f[j]+b[j]*x)<(f[k]+b[k]*x); } double getx(int i,int j) { return (f[i]-f[j])/(b[i]-b[j]); } int main() { int n,i,j,...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
ea75d113b88d00baa615d7defb8a9ebf
2,100
PASSED
#include <bits/stdc++.h> #define LL long long using namespace std; LL A[100010], B[100010]; int n, top; LL dp[100010]; pair<LL,LL> S[100010]; bool left_to(pair<LL,LL> l1, pair<LL,LL> l2, pair<LL,LL> l3){ LL x = (l3.second - l1.second)/(l1.first - l3.first); LL y = (l2.second - l1.second)/(l1.first - l2.first);; retu...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
f0e643e989481e5de7089fc79b1458f4
2,100
PASSED
#include <bits/stdc++.h> #define LL long long using namespace std; LL A[100010], B[100010]; int n, top; LL dp[100010]; long double I[100010]; pair<LL,LL> S[100010]; long double intersection(pair<LL,LL> l1, pair<LL,LL> l2){ return (long double)(l2.second - l1.second)/(long double)(l1.first - l2.first); } LL query(LL x)...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
cc16c8be073ac04a947708f8ceadc1dd
2,100
PASSED
#include <bits/stdc++.h> #define LL long long using namespace std; LL A[100010], B[100010]; int n, top; LL dp[100010]; long double I[100010]; pair<LL,LL> S[100010]; long double intersection(pair<LL,LL> l1, pair<LL,LL> l2){ return (long double)(l2.second - l1.second)/(long double)(l1.first - l2.first); } int P = 0; LL ...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
bf6d76bc04181054c172eb1f03c53d65
2,100
PASSED
#include <bits/stdc++.h> #define LL long long using namespace std; LL A[100010], B[100010]; int n, top; LL dp[100010]; pair<LL,LL> S[100010]; bool left_to(pair<LL,LL> l1, pair<LL,LL> l2, pair<LL,LL> l3){ LL x = (l3.second - l1.second)/(l1.first - l3.first); LL y = (l2.second - l1.second)/(l1.first - l2.first);; retu...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
e8de1a71bd54bad8ce6e811a6982cb68
2,100
PASSED
#include <bits/stdc++.h> #define LL long long using namespace std; LL A[100010], B[100010]; int n, top; LL dp[100010]; long double I[100010]; pair<LL,LL> S[100010]; long double intersection(pair<LL,LL> l1, pair<LL,LL> l2){ return (long double)(l2.second - l1.second)/(long double)(l1.first - l2.first); } int P = 0; LL ...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
199b1c1eeb05aceb460ddfc51479d11f
2,100
PASSED
#include <bits/stdc++.h> #define LL long long using namespace std; LL A[100010], B[100010]; int n, top; LL dp[100010]; long double I[100010]; pair<LL,LL> S[100010]; long double intersection(pair<LL,LL> l1, pair<LL,LL> l2){ return (long double)(l2.second - l1.second)/(long double)(l1.first - l2.first); } int P = 0; LL ...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
7936c92f8b2570ad3c49fe2d691116e0
2,100
PASSED
#include <iostream> #include <vector> using namespace std; const int maxn = 1e5; int n, lo, hi, mid; long long a[maxn], b[maxn]; pair <long long, long long> c; vector < pair <long long, long long> > v; long long f(pair <long long, long long> p, long long t) { return p.first * t + p.second; } double x(pair <long lon...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
650a1b869e6335878c73e15417744b8c
2,100
PASSED
#include <iostream> #include <vector> using namespace std; const int maxn = 1e5; int n, lo, hi, mid; long long a[maxn], b[maxn]; pair <long long, long long> c; vector < pair <long long, long long> > v; long long f(pair <long long, long long> p, long long t) { return p.first * t + p.second; } double x(pair <long lon...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
e7ad5604b6fd83bfe96254ac24ca6709
2,100
PASSED
#include <iostream> #include <vector> using namespace std; const int maxn = 1e5 + 10; int n; vector <int> ch; int lo, hi, mid; long long a[maxn], b[maxn], sol[maxn]; long long f(int x, int y) { return sol[x] + b[x] * a[y]; } long double ccw(int x, int y, int z) { return (long double) sol[x] * (b[y] - b[z]) + (long...
C++
3bf7c6e2491367b2afcb73fd14f62dd2
af7018ec2e4db2d171c50af170171615
2,100
PASSED
#pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #pragma GCC optimize("Ofast") #pragma GCC optimize("inline") #pragma GCC optimize("-fgcse") #pragma GCC optimize("-fgcse-lm") #pragma GCC optimize("-fipa-sra") #pragma GCC optimize("-ftree-pre") #pragma GCC optimize("-ftree-vrp") #pragma GCC optimize("-fp...
C++
524324f410216b0373cba3f877bfbe87
dad049c51505528eef4aa0eb9c52e8b6
2,400
PASSED
#pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #pragma GCC optimize("Ofast") #pragma GCC optimize("inline") #pragma GCC optimize("-fgcse") #pragma GCC optimize("-fgcse-lm") #pragma GCC optimize("-fipa-sra") #pragma GCC optimize("-ftree-pre") #pragma GCC optimize("-ftree-vrp") #pragma GCC optimize("-fp...
C++
524324f410216b0373cba3f877bfbe87
ac87b18425e1fdcb84b96d32999d5370
2,400
PASSED
# include <bits/stdc++.h> # define fi cin # define ll long long # define fo cout # define x first # define y second # define IOS ios_base :: sync_with_stdio(0) # define db long double using namespace std; int dp[1 << 20]; int a[20][1 << 20]; int b[20][1 << 20]; int lg[1 << 20]; bool ch(int l,int r) { int k = lg[r -...
C++
524324f410216b0373cba3f877bfbe87
791d9444364bc6737284a89ec92fd7f3
2,400
PASSED
#include <bits/stdc++.h> using namespace std; int v[1000010]; int c[1000010]; double fat[1000010]; int show[1000010]; int main() { int n,k; fat[0] =1.0; for(int i = 1;i<=1000009;i++) fat[i] = fat[i-1] + (log(i)); scanf("%d %d",&n,&k); for(int i = 0;i<n;i++){ scanf("%d",&v[i]); v[i]*=100LL; } for(int j = 0...
C++
524324f410216b0373cba3f877bfbe87
0b4a83a656c0eef359644796b9edfd28
2,400
PASSED
#include <bits/stdc++.h> using namespace std; int v[1000010]; int c[1000010]; #define MAX_N 1000010 // adjust this value as needed #define LOG_TWO_N 20 // 2^10 > 1000, adjust this value as needed #define EPS 1e-20 struct RMQ { ...
C++
524324f410216b0373cba3f877bfbe87
ff05d194142aeaa38860224fc358c3f7
2,400
PASSED
#include <bits/stdc++.h> using namespace std; int v[1000010]; int c[1000010]; double fat[1000010]; int show[1000010]; int main() { int n,k; fat[0] =1.0; for(int i = 1;i<=1000009;i++) fat[i] = fat[i-1] + (logf(i)); scanf("%d %d",&n,&k); for(int i = 0;i<n;i++){ scanf("%d",&v[i]); v[i]*=100LL; } for(int j = ...
C++
524324f410216b0373cba3f877bfbe87
8b70c6e89f361d6461221035f9d6359c
2,400
PASSED
#include <bits/stdc++.h> using namespace std; int v[1000010]; int c[1000010]; #define MAX_N 1000010 // adjust this value as needed #define LOG_TWO_N 20 // 2^10 > 1000, adjust this value as needed #define EPS 1e-20 struct RMQ { ...
C++
524324f410216b0373cba3f877bfbe87
4550cc5c272beb00b05bb837f84a8df1
2,400
PASSED
#include <bits/stdc++.h> using namespace std; int v[1000010]; int c[1000010]; double fat[1000010]; int show[1000010]; int main() { int n,k; fat[0] =1.0; for(int i = 1;i<=1000009;i++) fat[i] = fat[i-1] + (log(i)); scanf("%d %d",&n,&k); for(int i = 0;i<n;i++){ scanf("%d",&v[i]); v[i]*=100LL; } for(int j = 0...
C++
524324f410216b0373cba3f877bfbe87
2e2d67b1ab5513ad01e1f0203fb62e7b
2,400
PASSED
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 50; int n , k , v[maxn] , c[maxn] , val[maxn] , nxt[maxn] , rmq[maxn][25] , rmq2[maxn][25] , to[maxn]; stack < int > S; void build_rmq(){ for(int i = 0 ; i <= n ; ++ i) rmq[i][0] = v[i] , rmq2[i][0] = c[i]; for(int j = 1 ; j <= 24 ; ++ j) for(in...
C++
524324f410216b0373cba3f877bfbe87
629815fbd345cd976d89bdcac4148c13
2,400
PASSED
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 500; int n , k , v[maxn] , c[maxn] , to[maxn] , dp[maxn] , rmq[maxn][21]; stack < int > S; void build(){ for(int i = 1 ; i <= n ; ++ i) rmq[i][0] = v[i]; for(int j = 1 ; j <= 20 ; ++ j) for(int i = 1 ; i + ( 1 << j ) - 1 <= n ; ++ i) rmq[i][j...
C++
524324f410216b0373cba3f877bfbe87
ef1c0e8956d98029218a2891b67305eb
2,400
PASSED
from decimal import * getcontext().prec = 28 def solve(): if h == c: return 1 if (h + c) // 2 >= t: print(2) return ans = bs(1, 10 ** 6) a1 = getdif(ans) a2 = getdif(ans - 1) if abs(t - a1) < abs(t - a2): print(2 * ans - 1) else: ans -= 1 pri...
Python
ca157773d06c7d192589218e2aad6431
6b3c8bae79f91499819460ee98300140
1,700
PASSED
test=int(input()) while test: h,c,t=map(int,input().split()) choto=abs((h+c)-t) if (h+c-2*t)*(t-c)>=0: print(2) else: x=int((c-t)/(h+c-2*t)) m=abs((x*(h+c-2*t)+t-c)/(2*x-1)) n=abs(((x+1)*(h+c-2*t)+t-c)/(2*(x+1)-1)) if m<=n: print(2*x-1) ...
Python
ca157773d06c7d192589218e2aad6431
77375650c9d038429c4e9efa71745c93
1,700
PASSED
def temp(h, c, n): return h * (n + 1) + c * n, 2 * n + 1 for _ in range(int(input())): h, c, t = map(int, input().split()) if t * 2 <= (h + c): print(2) continue n = (h - t) // (2 * t - h - c) n1 = n + 1 a, b = temp(h, c, n) a1, b1 = temp(h, c, n1) d, dn = abs(a - b * t...
Python
ca157773d06c7d192589218e2aad6431
843c79770e4a22ab71e564ff6baae7e5
1,700
PASSED
import sys # sys.stdin = open('input.txt', 'r') # sys.stdout = open('output.txt', 'w') import math import collections from sys import stdin,stdout,setrecursionlimit import bisect as bs setrecursionlimit(2**20) M = 10**9+7 T = int(stdin.readline()) # T = 1 def ceil(x,y): return x//y + (1 if x%y != 0 else 0) ...
Python
ca157773d06c7d192589218e2aad6431
47fe88e5623f7392fbfef9265b5b9b0f
1,700
PASSED
t = int(input()) ans=[0]*t for i in range(t): h,c,obj=map(int, input().split()) ave=(h+c)/2 if obj<=ave: ans[i]=2 else: x=obj-ave y=(h-c)/2 z=y//x if z%2==0: z-=1 #print(x,y,z,ave) temp0=abs(obj-ave-y/z) temp1=abs(obj-ave-y/(2+z)) #print(temp0,temp1,y/z) if temp0<...
Python
ca157773d06c7d192589218e2aad6431
24e156d08377dee41580571b21294118
1,700
PASSED
from math import floor from sys import stdin input = stdin.readline def compare_answer(hot, cold, target, moves, ans): min_temperature = (ans // 2) * (hot + cold) + (ans % 2) * hot min_error = abs(min_temperature - ans * target) * moves temperature = (moves // 2) * (hot + cold) + (moves % 2) * hot err...
Python
ca157773d06c7d192589218e2aad6431
4c46ee384d37dc5ecacf147797aebb0b
1,700
PASSED
for _ in range(int(input())): h,c,t=map(int,input().split()) if(h==t): print(1) else: xx=(h+c)/2 if(xx>=t): print(2) else: dif=(t-xx) j=int(abs((c-h)//(2*dif))) if(j%2==0): j+=1 if(dif-(h-c)/(2*j)>=ab...
Python
ca157773d06c7d192589218e2aad6431
33b9cfb833d6d5263b539dcadccba314
1,700
PASSED
tests=int(input()) for _ in range(tests): h,c,t=map(int,input().split()); if(t==h): print(1) continue if(t<=(h+c)/2): print(2) continue target=t-(h+c)/2 dif=h-c tmp=int(dif//(2*target)); if(tmp<=0): tmp=1; if(tmp%2==0): tmp=tmp-1 v...
Python
ca157773d06c7d192589218e2aad6431
70a05091d80f92740d41026288795de9
1,700
PASSED
import math for i in range(int(input())): h,c,t=map(int,input().split()) if (h+c)/2>=t: print(2) else: a = (h-t)//(2*t-h- c) b = a+1 print(2*a + 1 if 2*t*(2*a+1)*(2*b+1) >= (2*b+1)*((a+1)*h+a*c)+(2*a+1)*((b+1)*h+b*c) else 2 * b + 1)
Python
ca157773d06c7d192589218e2aad6431
f11e710669eb84e17399f85ab7747ed6
1,700
PASSED
from decimal import Decimal def solve(): h,c,t=[int(x) for x in input().split()] if h==t: print(1) return a=2*t-h-c b=h-t if a<=0: print(2) return else: c1=b//a c2=c1+1 tc1=Decimal((h*(c1+1)+c*c1))/Decimal((2*c1+1)) tc2=Decimal((h*(...
Python
ca157773d06c7d192589218e2aad6431
76fbdca1bfdd3d12e1197f356ea43072
1,700
PASSED
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll x=0,y=0,z=0,r=0,n; string s,t; cin >> n; cin >> s >> t; for(ll i=0;i<n;i++) { if(s[i]=='1') x++; } for(ll i=0;i<n;i++) { if(t[i]=='0') { if(s[i]=='0') { r+=(x-z); y++; //cout << r << " "; } ...
C++
621c82478be3dadcf60c383ba078a49e
7f2d127dad56c3c9daf8e7fd2584ab1e
1,200
PASSED
#include<bits/stdc++.h> #define sc(a) scanf("%lld",&a) #define pr(a) printf("%lld",a) #define loop(i,n) loop(int i=1;i<=n;i++) using namespace std; typedef long long ll; int main() { ll n,c=0,z=0,flag=0,flag2=0,c2=0,c3=0,one=0,zero=0,wo=0,wz=0; cin>>n; string s1,s2; cin>>s1>>s2; for(int i=0;i<n;i+...
C++
621c82478be3dadcf60c383ba078a49e
93b55bd07a539c9284c1fca4ac635e20
1,200
PASSED
#include<cstdio> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> using namespace std; using namespace std; const int maxn=1000005; typedef long long ll; ll a[maxn], b[maxn]; ll ans[10]={0}; int main() { ll n; cin>>n; for(int i=0;i<n;i++) scanf("%1lld",&a[i]); for(int i=0;i<n;i++) scanf(...
C++
621c82478be3dadcf60c383ba078a49e
e84d1628bc108bab8460b05c7bca3221
1,200
PASSED
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); long long int n,i,j,ans=0; cin>>n; string a,b; cin>>a; cin>>b; long long int ct[4]; memset(ct,0,sizeof(ct)); for(i=0;i<n;i++) { if(a[i]=='0' && b[i]=='0') { ct[0]++; ...
C++
621c82478be3dadcf60c383ba078a49e
9d49d4d2bb5bdc2a58b96e556e69430a
1,200
PASSED
#include <bits/stdc++.h> using namespace std; string s,temp; set<string> se; long long cnt1,cnt0,xx,yy,xy,cntyy,cntyx,cntxy; int main() { int n; cin>>n; string a,b; cin>>a>>b; temp=a; char hold; s=""; for(int i=0;i<n;i++){ if(a[i]=='1') if(b[i]=='1') ...
C++
621c82478be3dadcf60c383ba078a49e
5cf5654b5450f23cc13bad99c998dc8d
1,200
PASSED
#include <bits/stdc++.h> using namespace std; int main() { long long int t=0,one=0,zero=0,mix=0,i,mix2=0; cin>>t; char a[100000],b[100000]; cin>>a>>b; //cout<<(sizeof(a)/sizeof(char)); for(i=0;i<t;i++) { if(a[i]=='1'&&b[i]=='1') {one=one+1;} else if(a[i]=='0'&&b[i]=='0') {zero=zero+1;} e...
C++
621c82478be3dadcf60c383ba078a49e
456f892a8de40f5bd20a360d148ff877
1,200
PASSED
#include<bits/stdc++.h> using namespace std; int main() { int n,i; cin >>n; char a[2*n],b[2*n]; cin >> a >> b; int c1=0,c2=0,c3=0,c4=0; for(i=0;i<n;i++){ if(a[i]=='0' && b[i]=='1') c1++; else if(a[i]=='1' && b[i]=='1') c2++; else if( a[i] =='0' && b[i]=='0' ) c3++; else c4++; } long long int y = (lo...
C++
621c82478be3dadcf60c383ba078a49e
e8c8bb215f0017f1055c49928fa78eab
1,200
PASSED
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string a,b; cin>>a>>b; long long int t[2][2]={0}; // string aa="0"; for(int i=0;i<n;i++) { t[a[i]-'0'][b[i]-'0']++; } long long int ans=t[0][0]*t[1][0]+t[0][0]*t[1][1]+t[1][0]*t[0][1]; ...
C++
621c82478be3dadcf60c383ba078a49e
f2d92297c5284121d2a7b6adf5cb48fa
1,200
PASSED
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string s1,s2; cin>>s1; cin>>s2; int a1=0,a2=0; int b1=0,b2=0; for(int i=0;i<n;i++) { if(s2[i]=='0') { if(s1[i]=='0') { a1++; } el...
C++
621c82478be3dadcf60c383ba078a49e
96d05a447aef300cec110a4a89d16752
1,200
PASSED
#include<bits/stdc++.h> using namespace std; #define MOD 1000000007 #define pb push_back #define mp make_pair #define so(a) sizeof(a) #define ms(a,b) memset(a,b,sizeof(a)) #define sf(c) scanf("%d",&c) #define sfll(c) scanf("%lld",&c) #define sfc(c) scanf("%c",&c) #define pf(c) printf("%d\n",c) #define pfsp(c) print...
C++
621c82478be3dadcf60c383ba078a49e
f2f742a18767b45deefca1d459a689c7
1,200
PASSED
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef vector<string>vst; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<pii> vii; typedef vector<pll> vll; typedef map<int,int> dc...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
8fee369076ff7b1835ac078ee52dec3a
1,400
PASSED
#include<bits/stdc++.h> using namespace std; #define ll long long int int main() { ll t; cin>>t; while(t--) { ll n; cin>>n; ll i; ll a[n]; ll sum=0; ll xorr=0; for(i=0;i<n;i++) { cin>>a[i]; sum+=a[i]; xorr^=a[i]; } if((2*xorr)==sum) { cout<<0<<end...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
e68d730d3ac14858a02b6ccefd0e8394
1,400
PASSED
#include<bits/stdc++.h> using namespace std; using ll = unsigned long long; using ii = pair<int, int>; using vi = vector<int>; using vll = vector<ll>; using vii = vector<ii>; const ll MOD = 998244353; const int INF = 1e9+9; const int MAXN = 1000006; ll t, n, m, k, arr[MAXN]; int main () { ios_base::sync_with_stdio...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
b8c066e401cd9b946ff9377bdcdcb78f
1,400
PASSED
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e5 + 100; const ll inf = 4e16 + 100; ll a[maxn]; int main() { ios::sync_with_stdio(0); ll t; cin >> t; while (t--) { ll n; cin >> n; ll sum1 = 0, sum2 = 0; for (int i = 1; i <= n; i++) cin >> a[i], sum1 += a[i], sum2 ^= ...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
f83e59a84eed97ce0a6815939c60c7b4
1,400
PASSED
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e5 + 100; const ll inf = 4e6 + 100; ll a[maxn]; int main() { ios::sync_with_stdio(0); ll t; cin >> t; while (t--) { ll n, m; cin >> n; ll sum1 = 0, sum2 = 0; for (int i = 1; i <= n; i++) cin >> a[i], sum1 += a[i], sum2 ^...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
2a7b6dace5131e5467d6405326efde61
1,400
PASSED
#include <bits/stdc++.h> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <stack> #include <set> #include <map> #include <unordered_map> using namespace std; #define Fio ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr) #define f(i, n) for (long l...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
cafd41f3948926a6c187a2174190f8ea
1,400
PASSED
#include <bits/stdc++.h> #define Speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); using namespace std; #define st first #define nd second #define pb push_back #define pf push_front #define all(a) (a).begin(), (a).end() #define lwb low...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
f344a627ba2a6902def89c6ca092cc87
1,400
PASSED
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define fi first #define se second #define ll long long using namespace std; const int N = 1e6 + 7; const int mod = 1e9 + 7; int n; ll a[N]; int b[N]; int c[N]; void solve() { cin >> n; for( int i = 0; i <= 100; i++ ){ b[i] = 0; c[i] =...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
21da7d56396e7ad8cc09bf6f78104e8c
1,400
PASSED
/* c */ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define PI acos(-1) #define endl "\n" #define pb push_back #define mp make_pair #define mod 1000000007 #define read(v, n) \ for (ll i = 0, a; i < n; i++) ...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
46bc661cc94e8437d0794e78975ece25
1,400
PASSED
/* c */ #include <bits/stdc++.h> /****/ using namespace std; typedef long long ll; #define PI acos(-1) #define endl "\n" #define pb push_back #define mp make_pair #define mod 1000000007 #define read(v, n) \ for (ll i = 0, a; i < n; i++) ...
C++
cced3c3d3f1a63e81e36c94fc2ce9379
f1181708ee537bf5320539426e8620fe
1,400
PASSED
#include <bits/stdc++.h> #define MAXN 200005 #define LL long long #define pii pair<int, int> #define fi first #define se second #define fastio ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); using namespace std; int t; string s; LL cur; LL past; LL mod = 1e9+7; signed main() { cin >> t; wh...
C++
592e219abe72054c3de1b6823a1d049d
4cd069e7e2a6f00361f9ce0a75e16ae3
1,700
PASSED
#include<bits/stdc++.h> using namespace std; #define mod 1000000007 #define cin1(x) cin>>x #define cin2(x,y) cin>>x>>y #define cin3(x,y,z) cin>>x>>y>>z #define ll long long #define mp make_pair #define pb push_back #define nl printf("\n") #define ff first #define ss second #define set0(a) memset ((a), 0 , sizeof(a)) #d...
C++
592e219abe72054c3de1b6823a1d049d
69af35d25091d0ea5f5fa03f1767d65d
1,700
PASSED
#include<bits/stdc++.h> using namespace std; typedef long long ll; const ll mod=1e9+7; int main(){ int t; scanf("%d",&t); while(t--){ int x; scanf("%d",&x); string s; cin>>s; ll L=0,ans=s.size(); while(L<x){ L++; if(s.size()<x){ string c=s.substr(L); for(int i=0;i<s[L-1]-'0'-1;i++) s+=...
C++
592e219abe72054c3de1b6823a1d049d
cddff93705365e9883dda5b0ec0020ec
1,700
PASSED
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<vector> #include<map> #include<queue> #include<cmath> #include<stack> #include<set> #define ll long long #define maxn 1000005 #define re register #define inf 1e9 #define eps 1e-10 using namespace std; inline ll read() { ll x=0,w=1; cha...
C++
592e219abe72054c3de1b6823a1d049d
a2cef850bf805458db0468a35d8abf9d
1,700
PASSED
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<vector> #include<map> #include<queue> #include<cmath> #include<stack> #include<set> #define ll long long #define maxn 1000005 #define re register #define inf 1e9 #define eps 1e-10 using namespace std; inline ll read() { ll x=0,w=1; cha...
C++
592e219abe72054c3de1b6823a1d049d
125fbedfcc0ed20b4aded626da185a36
1,700
PASSED
#include<iostream> #include<bits/stdc++.h> #define int long long using namespace std; int dp[1000010]; typedef pair<int, int> pi; int32_t main() { int t; cin >> t; memset(dp, 0, sizeof(dp)); while(t--) { int x; cin >> x; string s; cin >> s; std::vector<int> v; for(auto i: s){ v.push_back(i - '...
C++
592e219abe72054c3de1b6823a1d049d
5f210b7a8695462c42091f57c20d2fc8
1,700
PASSED
/* ꧁༒☬महाकाल☬༒꧂ ꧁༒ঔमहाकालঔ༒꧂ ঔৣ۝महाकालᴳᵒᵈ۝ঔৣ */ #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; //template <typename T, typename cmp=less<T>> using oset =...
C++
592e219abe72054c3de1b6823a1d049d
4c6d4a4d87eb67364375b65d18ad0652
1,700
PASSED
#include <bits/stdc++.h> #include<numeric> #include<cstdlib> #include <iostream> #define ll long long int #define all(x) x.begin(),x.end() #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define v vector<long long int> #define vv vector< int> #define gcd(m,n) __gcd(m,n) #define vp vecto...
C++
592e219abe72054c3de1b6823a1d049d
889aa3ba2de7f86f4bbc88267bd55d27
1,700
PASSED
#include <bits/stdc++.h> #include <bitset> #include <chrono> #include <iomanip> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> using namespace std; //using namespace __gnu_pbds; //#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> typed...
C++
592e219abe72054c3de1b6823a1d049d
85a367dd98b5248644f8c8ce0ac4adf4
1,700
PASSED
#include <bits/stdc++.h> using namespace std; int x; int mod=1000000007; int Len; int guangbiao; int T; int main() { scanf("%d",&T); while(T--) { string shu; scanf("%d",&x); cin>>shu; long long int ans=shu.length(); guangbiao=0; while(shu.length()<x) {...
C++
592e219abe72054c3de1b6823a1d049d
dc8d3aedfc1680751f064896631612b8
1,700
PASSED
#include <cstdlib> #include <iostream> #include <algorithm> #include <string> #include <set> #include <vector> #include <deque> #include <math.h> #include <map> #include <fstream> #include <iomanip> #include <queue> using namespace std; int main() { deque<int>path; int n, p; cin >> n >> p; for (int i = 0, x; i < ...
C++
7807c484035e0327870b6cac23c8d60a
001b5c78e02c411399a4f1187068cc45
1,500
PASSED
#include<stdio.h> #include<string.h> #include<algorithm> #include<iostream> using namespace std; int mapp[100004]; int main() { int n,a; while(scanf("%d%d",&n,&a)!=EOF) { for(int i=0;i<n;i++) { scanf("%d",&mapp[i]); } if(n==1) { printf("0\n"); continue; } sort(mapp,mapp+n); int ans=INT_...
C++
7807c484035e0327870b6cac23c8d60a
0e95416bccdb795b81c2a75439cd601a
1,500
PASSED
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <string> #include <set> #include <queue> #include <map> #include <math.h> #include <stack> #include <Windows.h> using namespace std; #define ll long long #define pii pair<ll, ll> #define endl "\n" #define mp make_pair #define pll pai...
C++
7807c484035e0327870b6cac23c8d60a
9a8bf192dff46561032d0e8f0999602b
1,500
PASSED
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <utility> #include <vector> #include <cmath> #include <map> using namespace std; #define VT vector typedef VT<int> VI; typedef VT<VI> VVI; typedef VT<string> VS; typedef VT<double> VD; typedef pair<int, int> PII; #define REP(i,n) f...
C++
7807c484035e0327870b6cac23c8d60a
59aa3fadc088c960e27c27a05c61d103
1,500
PASSED
#include <iostream> #include <iomanip> #include <cmath> #include <string> #include<vector> #include<algorithm> #include<utility> using namespace std; int main() { long long mx=-100000000,mx2=-100000000,mn2=100000000,mn=100000000,x,y,z,a1,a2,a3,a4,ans,o=0,a5=100000000,a6=100000000; cin>>z>>y; if(z>3){ for(int i=0;i<...
C++
7807c484035e0327870b6cac23c8d60a
634738ee2d8a16e36aaedf672164a9a1
1,500
PASSED
#include <iostream> #include <iomanip> #include <cmath> #include <string> #include<vector> #include<algorithm> #include<utility> using namespace std; int main() { long long mx=-100000000,mx2=-100000000,mn2=100000000,mn=100000000,x,y,z,a1,a2,a3,a4,ans,o=0,a5=100000000,a6=100000000; cin>>z>>y; if(z>3){ for(int i=0;i<...
C++
7807c484035e0327870b6cac23c8d60a
477387d44c94dd26cac38ae9769ca8bf
1,500
PASSED
#include <iostream> #include <algorithm> using namespace std; typedef long long ll; int n,d[100005],k; int main() { // your code goes here cin >> n >> k; for(int i = 0; i < n; i++) cin >> d[i]; d[n] = k; std::sort(d, d + n + 1); int idx = lower_bound(d,d + n + 1, k) - d; ll rightS = 0; for(int i = idx + 1;...
C++
7807c484035e0327870b6cac23c8d60a
335079261625d86a2ed1240249d40e8e
1,500
PASSED
#include <queue> #include <iostream> #include <string> #include <vector> #include <fstream> #include <functional> #include <algorithm> #include <cstdlib> #include <cstring> #include <map> #include <iomanip> #include <limits> #include <unordered_map> #include <set> #include <cmath>...
C++
7807c484035e0327870b6cac23c8d60a
8a9388d0968a7e3813f6908861520fb4
1,500
PASSED
#include <iostream> void qsort(int* x, int min_1, int max_1) { int mid = x[(min_1 + max_1) / 2]; int min_2 = min_1, max_2 = max_1; while (min_2 <= max_2) { while (x[min_2] < mid) ++min_2; while (x[max_2] > mid) --max_2; if (min_2 <= max_2) { int tmp = x[min_2]; ...
C++
7807c484035e0327870b6cac23c8d60a
5cc08983155eb2251fcca06116579520
1,500
PASSED
#include<iostream> #include<algorithm> using namespace std; int main() { int a,n; int x[100001]; cin>>n>>a; if(n==1) { cout<<0; return 0; } for(int i=0;i<n;i++) { cin>>x[i]; } sort(x,x+n); cout<<min(min(abs(x[0]-a),abs(x[n-2]-a))+x[n-2]-x[0],min(abs(x[1]-...
C++
7807c484035e0327870b6cac23c8d60a
415ac77de6a75db3924cc9c10f876007
1,500
PASSED
#include<bits/stdc++.h> using namespace std; int n,maxn; char s[100003]; int a[100003],flag; bool b[100003]; int main(){ cin>>n; cin>>s+1; for(int i=1;i<=n;i++){ if(s[i]=='G')a[i]=a[i-1]+1,flag=1; maxn=max(maxn,a[i]); } if(flag==0){cout<<"0";return 0;} for(int i=n-1;i>=1;i--){ ...
C++
5d9d847103544fa07480fb85c75d0b97
b11691bc221709cb89bb4ed98c8e3a02
1,600
PASSED
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; string a; int m,n,l,k,j[210000],p,gs,lk[210000]; int main() { scanf("%d",&m); cin>>a; int ll=a.size(); for(int x=0;x<ll;x++) { if(a[x]=='G') {if(x==0||a[x-1]!='G') { j[++p]=1; } else { j[p]++; } gs++; } else ...
C++
5d9d847103544fa07480fb85c75d0b97
f2b53c7f088f8059e017b48cbc5d5fc0
1,600
PASSED
//#include"pch.h" #include<stdio.h> #include<iostream> #include<string> using namespace std; int main() { int n; scanf("%d", &n); int totalGCount = 0, totalSCount = 0; int currentGCount = 0, currentSCount = 0, lastGC = 0; int maxGC = 0; char ch; while (n--) { scanf(" %c", &ch); if (ch == 'G') { tot...
C++
5d9d847103544fa07480fb85c75d0b97
a65bf278ab460387d4a7d01820198a15
1,600
PASSED
//#include"pch.h" #include<stdio.h> #include<iostream> #include<string> using namespace std; int main() { int n; cin >> n; int totalGCount = 0, totalSCount = 0; int currentGCount = 0, currentSCount = 0, lastGC = 0; int maxGC = 0; while (n--) { char ch; cin >> ch; if (ch == 'G') { totalGCount++; c...
C++
5d9d847103544fa07480fb85c75d0b97
46c610b64cd823b3a9e6f2e9a66b4a5f
1,600
PASSED
//#include"pch.h" #include<stdio.h> #include<iostream> #include<string> using namespace std; int main() { int n; scanf("%d", &n); int totalGCount = 0, totalSCount = 0; int currentGCount = 0, currentSCount = 0, lastGC = 0; int maxGC = 0; char ch; while (n--) { scanf(" %c", &ch); if (ch == 'G') { tot...
C++
5d9d847103544fa07480fb85c75d0b97
db59ea8ddd54f130584e02502752007e
1,600
PASSED
#include<bits/stdc++.h> using namespace std; int main(){ int i,n,j=1,gold=0,k=0; cin>>n; string s; cin>>s; vector<int> count; for(int i=0;i<n;i++){ if(s[i]=='G'){ gold++; k++; } else{ if(k!=0) count.push_back(k); k=0; count.push_back(0); } } if(s[n-1]=='G') c...
C++
5d9d847103544fa07480fb85c75d0b97
5f0999ed9168b810ce390c804687929e
1,600
PASSED
#include<bits/stdc++.h> using namespace std; #define mp make_pair #define F first #define S second int const lim = 1e5+7; vector<pair<int,int> > a; int main() { int n;cin >> n; string s ;cin>> s; int mx = 0; int l = 0 , x = 0; bool shit = false; int mxx = 0; for(int i = 0 ;i<s.size();i++) ...
C++
5d9d847103544fa07480fb85c75d0b97
bce27d44fca30a50764a02877831a80d
1,600
PASSED
#include<iostream> #include<string> using namespace std; int n,m,cnt; string s; int main() { ios::sync_with_stdio(false); cin>>n>>s; int f=0,l=0,index=0; for(int i=0;i<n;i++) if(s[i]=='G') cnt++; for(int i=0;i<n;i++) { if(s[i]=='G') l++; else if(f==0&&s[i]=='S'&&s[i+1]!='S'){ f=1; index=i;} else if(f==0&&s[...
C++
5d9d847103544fa07480fb85c75d0b97
4cf59add3fce2a090f018f41c0214f8b
1,600
PASSED
#include <iostream> #include <vector> using namespace std; int main() { int c,MAX=0,n,t=0,b,m=0,f=0; string s; cin>>n; vector <int> v; cin>>s; for (int i=0;i<n;i++) if (s[i]=='G') t+=1; b=n-t; if (b==0) cout<<t; if (t==0) cout<<0; else if((b!=0) && (t!=0)) { for ...
C++
5d9d847103544fa07480fb85c75d0b97
e0e96d52020eb9469202afa25da71fca
1,600
PASSED
#include<cstdio> #include<algorithm> using namespace std; const int MAX=1e6; int n; int d[MAX+10]; int fid[MAX+10]; int cot[MAX+10]; int find(int x){ return fid[x]==x?x:fid[x]=find(fid[x]); } void merge(int x,int y){ //x <- y cot[find(x)]+=cot[find(y)]; fid[find(y)]=find(x); } int ismerge(int x,int y){ ...
C++
5d9d847103544fa07480fb85c75d0b97
8179ab363f1f89a92eaabe30927c78ce
1,600
PASSED
#include <bits/stdc++.h> using namespace std; #define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define mp make_pair typedef long long ll; const ll maxinput=200005; ll n,m,p; ll a[maxinput]; unordered_map <ll,ll> b; ll nummatches=0; void add(ll pos,unordered_map <ll,ll> &currentmap) { if(b.find(a[...
C++
84cce147e8aadb140afaaa95917fdf0d
46976349132fa5fec5534b498a6ba1db
1,900
PASSED
#include <ext/rope> #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_cxx; using namespace __gnu_pbds; template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>; #defi...
C++
84cce147e8aadb140afaaa95917fdf0d
7d751d48d398b870577428a5a7d4e70e
1,900
PASSED
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; //data structure (fenwick substitute) template <typename T> using ordered_set = tree<T, null_type, less<...
C++
84cce147e8aadb140afaaa95917fdf0d
f5d49b0be07b148a0828f28f8bc9dd10
1,900
PASSED
#include <bits/stdc++.h> using namespace std; typedef int int__; #define int long long #define pb push_back #define pi pair<int,int> #define vpi vector<pi> #define vi vector<int> #define vvi vector<vi> #define fi first #define se second #define forn(i, n)for(int i=0;i<int__(n);i++) #define sz(a)int__(a.size()) templat...
C++
84cce147e8aadb140afaaa95917fdf0d
8d2366c56b3fef20b20d295e6fe16e2d
1,900
PASSED
/* ID: temurxo1 PROG: fence LANG: C++11 */ #define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <iostream> #include <math.h> #include <iterator> #include <unordered_map> #include <unordered_set> #include <functional> #include <string.h> #include <cstring> #include <queue> #include <iomanip> #include <istream> ...
C++
84cce147e8aadb140afaaa95917fdf0d
384dac56dcab6d572f471d7ab950bdc4
1,900
PASSED
#include <bits/stdc++.h> #define ll long long #define MOD 1000000007 using namespace std; const double pi = acos(-1); const int N = 5e5 + 5, OO = 1e9; int n, m, p, a[N], b[N], d, f[N]; map<int, int> M; vector<int> ans; int main() { scanf("%d %d %d", &n, &m, &p); for(int i=0; i<n; i++){ scanf("%d", a...
C++
84cce147e8aadb140afaaa95917fdf0d
969181c3d2fb8e3adc85121a88a00ee4
1,900
PASSED
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define mp make_pair #define pb push_back #define CLEAR(a) memset(a,0,sizeof a) #define REP(i,n) for(int i=0;i<n;i++) #define FOR(i,a,b) for(int i=a;i<=b;i++) #define fr freopen("input.txt", "r", stdin); #define fw freopen("output.txt", "w",...
C++
84cce147e8aadb140afaaa95917fdf0d
1b0155098927f3ee5353914bee52421e
1,900
PASSED
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define mp make_pair #define pb push_back #define CLEAR(a) memset(a,0,sizeof a) #define REP(i,n) for(int i=0;i<n;i++) #define FOR(i,a,b) for(int i=a;i<=b;i++) #define fr freopen("input.txt", "r", stdin); #define fw freopen("output.txt", "w",...
C++
84cce147e8aadb140afaaa95917fdf0d
c5051f0bc7396cff82052ac2423ca17a
1,900
PASSED
#include<bits/stdc++.h> using namespace std; int n,p,m,k,oks,sz,ans,h; long long a[400007]; long long b[400007]; bool li; map<long long,int> mm; vector<int> v[400007]; int br[800007]; set<int> s; set<int> id; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>n>>m>>p; k=1; f...
C++
84cce147e8aadb140afaaa95917fdf0d
2bf6c010abe4662da52602e00af7b061
1,900
PASSED
#include<bits/stdc++.h> using namespace std; int n,p,m,k,oks,sz,ans,h; long long a[400007]; long long b[400007]; bool li; unordered_map<long long,int> mm; vector<int> v[400007]; int br[800007]; unordered_set<int> s; vector<int> id; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>...
C++
84cce147e8aadb140afaaa95917fdf0d
10cad5f4edc673a017d8461ce827b66f
1,900
PASSED