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 |
|---|---|---|---|---|---|
for _ in range(int(input())):
n = int(input())
print(*sorted(map(int, input().split()), reverse=True)) | Python | 1d89df4153d70087d212b711852eba5f | f8d29abc84c3181a5c396328f438ba6e | 1,000 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
const ld PI = M_PI;
ld angle(int x, int y)
{
ld ang = atan2(y, x);
//if (ang < PI)
// ang += 2*PI;
// printf("%lf\n", ang);
return ang;
}
int main()
{
int n, x, y;
vector<pair<ld, int> > angles;
ld ang;
scanf("%d"... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | 4b448f42d0142bd71b8c958e95277110 | 2,300 | PASSED |
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
const int MAXN = 100010;
const long double PI = acos(-1);
int n;
long double ang[MAXN];
int p[MAXN];
bool cmp (int a, int b) {
return ang[a] < ang[b];
}
long double getAng(long double x, long double y) {
long double l = sqrt(x*x+y*y);
... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | 1ca65c97419dfe35c9ffe2d7a1f3a054 | 2,300 | PASSED |
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>
#include <complex>
#include <iostream>
#include <sstream>
using namespace std;
typedef complex<long double> P;
typedef pair<P,int> PP;
#define EPS 1e-9
int n;
PP vec[100001];
bool comp(const ... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | cfe786c60114e2ffb41b7a833105a249 | 2,300 | PASSED |
#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef long double ld;
typedef map<int,int>::iterator mapit;
typedef set<int>::iterator setit;
const int maxn = 1e5 + 4;
const int maxk = 12;
const int maxlog = 20;
const ll inf =... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | 526426c1d6656fc50e5b7f5bb1458a61 | 2,300 | PASSED |
#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef long double ld;
typedef map<int,int>::iterator mapit;
typedef set<int>::iterator setit;
const int maxn = 1e5 + 4;
const int maxk = 12;
const int maxlog = 20;
const ll inf =... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | f03a4d3254e54af26a318625a31a25d1 | 2,300 | PASSED |
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
struct st
{
long double x,y;
int od;
st(long double _x=0,long double _y=0) : x(_x),y(_y){}
}a[100010];
typedef st vec;
/*int sgn(double p)
{
if(fabs(p)<1e-12) return 0;
return p>0 ? 1 : -1;
}*/
long double dot(vec p,vec q)
{
return p.x*q.x+... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | 71213cedc8a917257224944a9c555c6f | 2,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define X first
#define Y second
#define cl(a,b) memset(a,b,sizeof(a))
typedef pair<int,int> P;
const int maxn=100005;
const int inf=1<<27;
const LL mod=1e9+7;
struct point{
long double x,y;
int id;
bool operator<(const p... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | 650ec55d96bb31698c41165846247b81 | 2,300 | PASSED |
#include <iostream>
#include<cstdlib>
#include<string>
#include<fstream>
#include <cmath>
#include <vector>
#include<algorithm>
using namespace std;
struct wek{
int x;
int y;
int c, id;
bool operator<(const wek & inny){
if(c<inny.c) return true;
if(c>inny.c) return false;
... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | 9c7a216f0b5491734b0b60aea85ad1f1 | 2,300 | PASSED |
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
#include <cmath>
#include <stack>
#include <map>
#include <set>
#include <deque>
#include <cstring>
#include <functional>
#include <climits>
#include <list>
#include <ctime>
#include <complex>
#define F1(x,y,z) for(int x=y;x<... | C++ | e7ffe7a54e2403805bde98d98fa0be3a | 38bb8eaf00f2814557316a492ca7962f | 2,300 | PASSED |
//#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <vector>
#include <stack>
#include <queue>
#include <string>
#include <cstdlib>
#include <set>
#include <map>
#include <fstream>
#include <utility>
#include <sstream>
#defin... | C++ | 6422a70e686c34b4b9b6b5797712998e | e4cfb5e9e10c096dece222879ecc7e00 | 1,600 | PASSED |
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <list>
#include <algorithm>
#include <stack>
#include <functional>
#include <fstream>
#include <deque>
#include <queue>
#include <iostream>
#include <fstream>
using namespace std;
int a[1000][1000];
bool bCel[10000];
int b... | C++ | 6422a70e686c34b4b9b6b5797712998e | 2c1686bc44ac8e0952236e6bfa10746d | 1,600 | PASSED |
#include <iostream>
#include<vector>
#include <algorithm>
using namespace std;
void qsort(int *a, int l, int r){
if (l >= r) return;
int m = (l + (r - l) / 2);
int i = l;
int j = r;
while (i < j){
while (a[i] < a[m]) i++;
while (a[j] > a[m]) j--;
if (i <= j){
swap(a[i], a[j]);
i++;
j--;
}
}
... | C++ | 6422a70e686c34b4b9b6b5797712998e | c3e561ee7bc8639308fc36cc4e8d3630 | 1,600 | PASSED |
#include<iostream>
#include<string>
#include<cstring>
#include<vector>
using namespace std;
int main()
{
int n, m, k;
cin >> n >> m >> k;
vector <vector<int> >a (n, vector<int> (m));
vector<bool> lock_cash(k, false);
vector<int> lock_core(n,0), cur_cash(k,0);
for (int i = 0; i < n; i++)
for (int... | C++ | 6422a70e686c34b4b9b6b5797712998e | 73d4b7d659aa8a548cdaa88b515acb50 | 1,600 | PASSED |
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <regex>
#include <string>
#include <tuple>
#define mp(x, y) make_pair(x, y)
using namespace std;
int mas[100][100] = { 0 };
vector<bool> locked;
vector<bool> visited;
vector<int>... | C++ | 6422a70e686c34b4b9b6b5797712998e | 35fc3e028c55831a16ef5d0d656175cf | 1,600 | PASSED |
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <hash_map>
#include <hash_set>
#include <vector>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <iterator>
using namespace std;
#define mems... | C++ | 6422a70e686c34b4b9b6b5797712998e | 6a306794db5faa6955b8d5b8abf64016 | 1,600 | PASSED |
#include <string>
#include <iostream>
#include <vector>
using namespace std;
//int main()
//{
// string s;
// cin>>s;
// bool big=false;
// bool small=false;
// bool dig=false;
// for(int i=0;i<s.size();++i)
// {
// int kode=int(s[i]);
// if(kode>=65 && kode <=90)
// big=true;
// if(kode... | C++ | 6422a70e686c34b4b9b6b5797712998e | 2a47b1a9d96c3ffae6dd2bc62e3e952c | 1,600 | PASSED |
#include <stdio.h>
#include <string.h>
int main()
{
int tab[101][101];
int k[101], t[101];
int n, m, i, j, p, q;
memset(tab, 0, sizeof(tab));
memset(t, 0, sizeof(t));
memset(k, 0, sizeof(k));
scanf("%d %d %d", &n, &m, &k);
for (i = 1; i <= n; i++)
for (j = 1; j <= m; j++)
... | C++ | 6422a70e686c34b4b9b6b5797712998e | 33932deb0cdf329a74c7ebb7e17cf991 | 1,600 | PASSED |
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
//#ifdef _DEBUG
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
//#endif
int n, m, p;
cin >> n >> m >> p;
vector <vector<int>> a (n, vector <int> (m));
vector <int> ans (n, 0);
vector <int> vec;... | C++ | 6422a70e686c34b4b9b6b5797712998e | d329fe62714347841cedf8997971a0db | 1,600 | PASSED |
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n, m ,k, i, j, i1, j1;
cin >> n >> m >> k;
vector <vector<int> > a(n, vector<int>(m));
vector <pair<bool, pair<int,int> > > b(n); //is locked, tick number, slot number
vector <int> values(n);
fo... | C++ | 6422a70e686c34b4b9b6b5797712998e | d009d7b0736463882bb4f841a974f4e5 | 1,600 | PASSED |
n = int(input())
tests = [input() for _ in range(n)]
for test in tests:
a, b = [int(x) for x in test.split(' ')]
count = 0
while True:
if a == b:
print(count)
break
else:
diff = a - b
tens = abs(diff / 10)
if tens.is_integer():
... | Python | d67a97a3b69d599b03d3fce988980646 | 6b6b23dc5767f0e13b03c02b44160c2f | 800 | PASSED |
for i in range(int(input())):
a,b=map(int,input().split())
if b>a:
y=b-a
if y%10>0:
ty=(y//10+1)
print(ty)
else:
ty=(y//10)
print(ty)
elif a>b:
y=a-b
if y%10>0:
ty=(y//10+1)
print(ty)
else... | Python | d67a97a3b69d599b03d3fce988980646 | dddc0b5c94482bfc5c1d8256b5aba116 | 800 | PASSED |
t = int(input())
for _ in range(t):
a, b = map(int, input().split())
moves = 0
if a != b:
diff = abs(a-b)
moves = (diff+9) // 10
print(moves) | Python | d67a97a3b69d599b03d3fce988980646 | 931ff075655c3897d0a95249e8af546c | 800 | PASSED |
t = int(input())
for _ in range(t):
a,b = list(map(int,input().split(' ')))
c = abs(b-a)
print(c//10) if c%10==0 else print(c//10 + 1)
| Python | d67a97a3b69d599b03d3fce988980646 | 8a0dfc659c76b04970e123376e4d7713 | 800 | PASSED |
for i in range(int(input())):
a, b = input().split()
a = int(a)
b = int(b)
t = a - b if a > b else b - a
k = t // 10
if t % 10 != 0:
k +=1
print(k) | Python | d67a97a3b69d599b03d3fce988980646 | afa82c4135dd4df5b5fb302a7cb8cc5e | 800 | PASSED |
def fun(a,b):
if(b==a):
return(0)
if(a>b):
a,b=b,a
diff=b-a
if(diff%10==0):
return(diff//10)
else:
return((diff//10)+1)
t=int(input())
for i in range(t):
a,b=input().split()
a=int(a)
b=int(b)
print(fun(a,b)) | Python | d67a97a3b69d599b03d3fce988980646 | b038922e67122a50b59e1c0df502d298 | 800 | PASSED |
t=int(input())
for i in range(t):
ab=tuple(map(int,input().split()))
ans=abs(ab[0]-ab[1])/10
if ans.is_integer():
print(int(ans))
else:
print(int(ans+1))
| Python | d67a97a3b69d599b03d3fce988980646 | 57ed6d2293aee6c6319e1d8ecc2f2504 | 800 | PASSED |
T=int(input())
for case in range(T):
a,b=map(int,input().split())
print(int((abs(b-a)+9)/10)) | Python | d67a97a3b69d599b03d3fce988980646 | 6f0d394b4044b18e0c0da12ea62dd5ba | 800 | PASSED |
for t in range(int(input())):
n, m = list(map(int, input().split()))
diff = abs(n-m)
print(diff//10 + int(bool(diff%10)))
| Python | d67a97a3b69d599b03d3fce988980646 | d80aa5bc79aa544184ce1065910ffa30 | 800 | PASSED |
test = int(input())
for _ in range(test):
a, b = map(int, input().split())
print((abs(a - b) + 9) // 10)
| Python | d67a97a3b69d599b03d3fce988980646 | ba3b58c16afd917ebf40f6b9c66df6cf | 800 | PASSED |
import java.io.*;
import java.util.*;
public class Test {
int readInt() {
int ans = 0;
boolean neg = false;
try {
boolean start = false;
for (int c = 0; (c = System.in.read()) != -1; ) {
if (c == '-') {
start = true;
... | Java | c47d0c9a429030c4b5d6f5605be36c75 | c29963ebe6502bcc2e73b1f8df4a6b3d | 2,800 | PASSED |
import java.io.*;
import java.util.*;
public class Test {
int readInt() {
int ans = 0;
boolean neg = false;
try {
boolean start = false;
for (int c = 0; (c = System.in.read()) != -1; ) {
if (c == '-') {
start = true;
... | Java | c47d0c9a429030c4b5d6f5605be36c75 | 3babcbfe87a5fe404de33515bff9d6fa | 2,800 | PASSED |
import java.io.*;
import java.util.*;
public class Test {
int readInt() {
int ans = 0;
boolean neg = false;
try {
boolean start = false;
for (int c = 0; (c = System.in.read()) != -1; ) {
if (c == '-') {
start = true;
... | Java | c47d0c9a429030c4b5d6f5605be36c75 | aa2941fc2e35431b65e70db6eca8178b | 2,800 | PASSED |
import java.io.*;
import java.util.*;
public class Test {
int readInt() {
int ans = 0;
boolean neg = false;
try {
boolean start = false;
for (int c = 0; (c = System.in.read()) != -1; ) {
if (c == '-') {
start = true;
... | Java | c47d0c9a429030c4b5d6f5605be36c75 | c28cae450c8d2c6ca0a69c3d9791344e | 2,800 | PASSED |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.AbstractSet;
import java.util.InputMismatchException;
import java.util.Random;
import java.util.Map;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.O... | Java | c47d0c9a429030c4b5d6f5605be36c75 | 52a09fc8e2b5dd060ae78c1bbd810f24 | 2,800 | PASSED |
//package round391;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class F2 {
InputStream is;
PrintWriter out;
String INPUT = "";
public static class DJSet {
public... | Java | c47d0c9a429030c4b5d6f5605be36c75 | 8873e2538dacd9e3f45854b1118d055f | 2,800 | PASSED |
//package round391;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.List;
import java.util.Queue;
public c... | Java | c47d0c9a429030c4b5d6f5605be36c75 | 11d0797d025798b463b697fc876eb567 | 2,800 | PASSED |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.PriorityQueue;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
... | Java | c47d0c9a429030c4b5d6f5605be36c75 | 7a0f31871fb9927cef03b09e27d9ea5f | 2,800 | PASSED |
import java.io.*;
import java.util.*;
public class F {
BufferedReader br;
PrintWriter out;
StringTokenizer st;
boolean eof;
int n;
int root;
List<Edge>[] g;
static class Edge {
int to, cost;
public Edge(int to, int cost) {
this.to = to;
this.cost = cost;
}
@Override
public String toStrin... | Java | c47d0c9a429030c4b5d6f5605be36c75 | 75ff866beed3666b6d2cf4307a9e8ffc | 2,800 | PASSED |
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <queue>
using std::priority_queue;
using std::swap;
using std::max;
typedef long long ll;
const int N = 200010;
const int M = 300010;
const int LOGN = 20;
int _w;
int n, m, s;
namespace G {
int head[N], nxt[M*2], to[M*2], len[M*2], eid;
void init()... | C++ | c47d0c9a429030c4b5d6f5605be36c75 | ecbc66e37a7def24842013edc9f3d003 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <deque>
#include <list>
#include <fstream>
#include <map>
typedef long long lint;
using namespace std;
struct tri{
int a ,b , c;
};
int main() {
l... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | e0ee5793d54dae9502b35d84ccb01a30 | 2,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i)
#define... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | 1fab15a21ac39bb07a7bc6e990be23c1 | 2,400 | PASSED |
//DUEL
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define x first
#define y second
#define pii pair<int,int>
#define pb push_back
#define eb emplace_back
#pragma GCC optimize("unroll-loops")
#define shandom_ruffle(a, b) shuffle(a, b, rng)
#define vi vector<int>
#define vl vector<ll>
#define popcn... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | 7b97570ec64353057c59a0bca5dcf703 | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int T,n,a,b,c,s,i;
vector<int>N[1<<17];
void order(int p,int q)
{
for(auto child:N[p])
if(child!=q)
order(child,p);
cout<<p+1<<' ';
}
int main()
{
ios::sync_with_stdio(false),cin.tie(nullptr);
cin>>T;
while(T--)
{
cin>>n;
memset(N,0,sizeof N);
vector<int>C(n... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | af64c075e2a2f81ec2c702699009cca8 | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int T,n,a,b,c,s,i;
vector<int>N[1<<17];
void order(int p,int q)
{
for(auto child:N[p])
if(child!=q)
order(child,p);
cout<<(p+1)<<' ';
}
int main()
{
ios::sync_with_stdio(false),cin.tie(nullptr);
cin>>T;
while(T--)
{
cin>>n;
memset(N,0,sizeof N);
vector<int>C... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | af8055c7e0d178fcc7341dee4197901c | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int T,n,a,b,c,s,i;
vector<int>N[1<<17];
void order(int p,int q)
{
for(auto child:N[p])
if(child!=q)
order(child,p);
cout<<(p+1)<<' ';
}
int main()
{
ios::sync_with_stdio(false),cin.tie(nullptr);
cin>>T;
while(T--)
{
cin>>n;
memset(N,0,sizeof N);
vector<int>C... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | 1c4263243e5562e267c1cc8a8512f501 | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int T,n,a,b,c,s,i;
vector<vector<int>>N;
vector<int>C;
map<pair<int,int>,vector<int>>M;
void order(int p,int q)
{
for(auto child:N[p])
if(child!=q)
order(child,p);
cout<<(p+1)<<' ';
}
int main()
{
ios::sync_with_stdio(false),cin.tie(nullptr);
cin>>T;
while(T--)
{... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | 76eb5c1ec2d9c09c80aace29e7c433b4 | 2,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int T,n,a,b,c,s,i;
vector<int>N[1<<17];
void order(int p,int q)
{
for(auto child:N[p])
if(child!=q)
order(child,p);
cout<<(p+1)<<' ';
}
int main()
{
ios::sync_with_stdio(false),cin.tie(nullptr);
cin>>T;
while(T--)
{
cin>>n;
memset(N,0,sizeof N);
vector<int>C... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | 518f3af6fba845a0e507b57581d9e7da | 2,400 | PASSED |
/*#include <bits\stdc++.h>
using namespace std;
vector<unordered_set<int>> graphVertex;
vector<unordered_set<int>> connectVertex;
unordered_map<int, int> countEdges;
vector<int> p, q;
vector<bool> isCut, inAnswer, isUsed;
void addVertex(int a, int b) {
graphVertex[a].insert(b);
graphVertex[b].insert(a);
... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | 2d8820aff66dbfa165f97c7107532213 | 2,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, a[N][3];
int nxt[N];
set<pair<int,int>> S;
set<int> occ[N];
vector<int> PP, QQ;
void solve() {
if(S.size() == 2) {
int x = (*S.begin()).second, y = (*S.rbegin()).second;
nxt[x] = y;
nxt[y] = x;
return;
... | C++ | b6d8bb53da52c47a5c57b55e266ae952 | 525b5987c31a1e8e3184c73adfec9535 | 2,400 | PASSED |
/* -------------------------------- */
/* Name: MD. Khairul Basar */
/* Institute: HSTU */
/* Dept: CSE */
/* Email: khairul.basar93@gmail.com */
/* -------------------------------- */
#include <bits/stdc++.h>
/* all header files included */
#define fs first... | C++ | cf1c39e85eded68515aae9eceac73313 | 7124a36f6ced948126042c3106e06c15 | 1,700 | PASSED |
#include <bits/stdc++.h>
using namespace std ;
char ins [ 500010 ] ;
string b ;
int pos [ 500010 ] , lp [ 500010 ] , rp [ 500010 ];
stack < int > s ;
stack < pair < int , int > > s1 ;
int main () {
int n , m , p ,f ;
cin >> n >> m >> p ;
cin >> b ;
p -- ;
scanf ("%s", ins ) ;
for ( int i = 0 ; i < n ;... | C++ | cf1c39e85eded68515aae9eceac73313 | f084b81871ee78e4fd73da9eb279c304 | 1,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int maxn=500000+5;
int n, m, p, l[maxn], r[maxn], a[maxn];
char c[maxn];
stack<int> s;
void run()
{
char ch;
scanf(" %c",&ch);
if(ch=='L') p=l[p];
else if(ch=='R') p=r[p];
else
{
int L, R;
if(a[p]>p) L=l[p], R=r[a[p]], p=R;
else L=l[a[p]], R=r[p], p=r[p];
... | C++ | cf1c39e85eded68515aae9eceac73313 | 569fea3e79304429e4d416e4d70e6754 | 1,700 | PASSED |
#pragma comment(linker, "/STACK:102400000,102400000")
#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <queue>
#include <stack>
using namespace std;
typedef long long LL;
const LL MOD=9901;
const int N=2500;
... | C++ | cf1c39e85eded68515aae9eceac73313 | 73243d13c1af7a9bcc92dacc389040a5 | 1,700 | PASSED |
#pragma comment(linker, "/STACK:102400000,102400000")
#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <queue>
#include <stack>
using namespace std;
#define N 500005
char s[ N ] , t[ N ];
int n , m , p , nex[ N ... | C++ | cf1c39e85eded68515aae9eceac73313 | a3830e775da29f4d18ffb7c5df551393 | 1,700 | PASSED |
#pragma comment(linker, "/STACK:102400000,102400000")
#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <queue>
#include <stack>
using namespace std;
#define N 500005
char c[ N ] , op[ N ];
int n , m , p , nex[ N... | C++ | cf1c39e85eded68515aae9eceac73313 | 869d03e312da3bba7bad890802473b9d | 1,700 | PASSED |
#pragma comment(linker, "/STACK:102400000,102400000")
#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <queue>
#include <stack>
using namespace std;
typedef long long LL;
const LL MOD=9901;
const int N=2500;
... | C++ | cf1c39e85eded68515aae9eceac73313 | e59ddad8324c4f7d498486c5d864e2d3 | 1,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef double D;
typedef long double LD;
typedef long long ll;
typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
typedef pair<LD,LD> Pt;
#define mod9 1000000009ll
#define mod7 1000000007ll
#define INF 1023456789ll
#define INF16 10000000000000000l... | C++ | cf1c39e85eded68515aae9eceac73313 | 723539ee63bd38c86a6ddec6513449d5 | 1,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef double D;
typedef long double LD;
typedef long long ll;
typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
typedef pair<LD,LD> Pt;
#define mod9 1000000009ll
#define mod7 1000000007ll
#define INF 1023456789ll
#define INF16 10000000000000000l... | C++ | cf1c39e85eded68515aae9eceac73313 | c9a199f1d6a97abb1178b1e281171928 | 1,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef double D;
typedef long double LD;
typedef long long ll;
typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
typedef pair<LD,LD> Pt;
#define mod9 1000000009ll
#define mod7 1000000007ll
#define INF 1023456789ll
#define INF16 10000000000000000l... | C++ | cf1c39e85eded68515aae9eceac73313 | 04e1aac93991e6e770b28ecd0d78f29a | 1,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
while(cin>>n)
{
int arr[n];
int smalodd=110;
int smallev=0;
int tot=0;
for(int i=0;i<n;i++){
cin>>arr[i];
if(arr[i]%2!=0) {if(arr[i]<smalodd)smalodd=arr[i];}
tot+= arr... | C++ | a5d56056fd66713128616bc7c2de8b22 | 20e88f1c4816e4defb7c2d7d737c9649 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a[101],i,x,y=0;
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[i];
y=y+a[i];
}
// cout<<y;
if(y%2!=0)
{cout<<y;
return 0;
}
if(n==1)
{
if(a[0]%2==0)
{
cout<<"0";
retu... | C++ | a5d56056fd66713128616bc7c2de8b22 | ba7e606eb6dea413ce3b3aac017515d3 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t,total_sum=0,minm_odd=100;
cin>>t;
for(int i=0 ; i<t ; i++)
{
int n;
cin>>n;
if(n%2!=0)
{
minm_odd=min(minm_odd,n);
}
total_sum+=n;
}
if(total_sum%2!=0)
cout<<total_... | C++ | a5d56056fd66713128616bc7c2de8b22 | 547e92f3c701afb63db9d71a1518787e | 1,200 | PASSED |
#include <iostream>
using namespace std;
int n,k,r,m=100;
int main()
{
cin>>n;
while(n--)
{
cin>>k;
if(k&1)
m=min(m,k);
r+=k;
}
if(r&1)
cout<<r;
else if(m&1)
cout<<r-m;
else
cout<<0;
} | C++ | a5d56056fd66713128616bc7c2de8b22 | 396abbd6fdbe42baf06caf72fa61c078 | 1,200 | PASSED |
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n , a[100] , s = 0;
cin >> n;
for(int i = 0 ; i < n ; i++){
cin >> a[i];
s+=a[i];
}
sort(a,a+n);
for(int j = 0 ; !(s%2) && j < n; j++)
if(a[j] % 2) s-= a[j];
if(s % 2 == 0)cout << "0";
else ... | C++ | a5d56056fd66713128616bc7c2de8b22 | 23d09f0bf1166a303265f09af137556d | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,sum=0,l=0;
cin>>n;
int arr[n],odd[n];
for(int i=0; i<n; ++i)
{
cin>>arr[i];
sum+=arr[i];
if(arr[i]%2!=0) odd[l++]=arr[i];
}
if(sum%2!=0) cout<<sum;
else
{
if(l==0) cout<<"0";
el... | C++ | a5d56056fd66713128616bc7c2de8b22 | de5dcddaec5b041591f507e8784ea2ae | 1,200 | PASSED |
#include<iostream>
using namespace std;
int main()
{
int n,sum=0,odd=1000000;
cin>>n;
int arr[n];
for(int i=0;i<n;i++)
{
cin>>arr[i];
if(arr[i]%2)
odd=min(odd,arr[i]);
sum+=arr[i];
}
if(sum%2==0)
sum-=odd;
return cout<<max(sum,0),0;
}
| C++ | a5d56056fd66713128616bc7c2de8b22 | f0b693ae74908b57ea102a15ccee67a9 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define __b_p(n) __builtin_popcount(n);
#define modd 1000000007
#define pb push_back
#define ci(x) cin>>x;
#define co(x) cout<<x<<endl;
#define r0 return 0;
#define r1 return 1;
typedef long long ll;
vector<int>... | C++ | a5d56056fd66713128616bc7c2de8b22 | e3fa2cd82755d00a65c78e134ba48964 | 1,200 | PASSED |
#include <iostream>
using namespace std;
int main(){
int n,sum=0,x,maxi;
cin>>n;
int a[n+1],i=0;
for(int i=0;i<n;i++){
cin>>a[i];
sum=sum+a[i];
}
x=sum;
maxi=0;
if(x%2!=0){
cout<<x;
}
else{
for(int i=0;i<n;i++){
if(maxi<=sum-a[i] && (sum-a[i])%2!=0){
maxi=sum-a[i];
}
}
cout<<maxi... | C++ | a5d56056fd66713128616bc7c2de8b22 | e51a6d2afa63acf89f41155f3cee7249 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int n,sum=0,x,i,count=0,xm=INT_MAX,summ=0;
cin>>n;
for(i=count=0; i<n; i++){
cin>>x;
if(x&1){
sum+=x;
xm=min(x,xm);
count++;
} else {
... | C++ | a5d56056fd66713128616bc7c2de8b22 | 47e9aad88335f846e5173070f93500a5 | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int a[101010],s[101010];
int main(){
int n;scanf("%d",&n);
for(int i=0;i<n;i++)scanf("%d",a+i);
for(int i=0;i<n;i++)s[i+1]=s[i]+a[i];
int q;scanf("%d",&q);
while(q--){
int l,r;scanf("%d%d",&l,&r);
l--;
printf("%d\n",(s[r]-s[l])/10);
}
}
| C++ | 2cd91be317328fec207da6773ead4541 | cf6812968aa8ba022dc7b2c23cfabfc1 | 1,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N = 1e6+10;
struct node
{
ll lson , rson , val ;
}st[N<<1];
ll val[N];
ll build(ll l , ll r , ll h)
{
st[h].lson=l;
st[h].rson=r;
if(l==r)
{
return st[h].val=val[l];
}
ll mid=(l+r)>>1;
return st[h].val=bui... | C++ | 2cd91be317328fec207da6773ead4541 | 793b1d3b2cd3ed4cf44e892006a72d68 | 1,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,q,a;
ll d[100010];
ll l,r;
int main()
{
cin>>n;
for(ll i=1;i<=n;i++)
{
cin>>a;
d[i]=d[i-1]+a;
}
cin>>q;
for(ll i=1;i<=q;i++)
{
cin>>l>>r;
cout<<(d[r]-d[l-1])/10<<endl;
}
}
| C++ | 2cd91be317328fec207da6773ead4541 | 4741e54b4decadffb269e47831b80fa4 | 1,400 | PASSED |
#include<iostream>
using namespace std;
int a[100050];
int main()
{
int n,q,r,l,x;
cin>>n;
a[0] = 0;
for(int i = 1; i <= n; ++i){
cin>>x;
a[i] = a[i-1] + x;
}
cin>>q;
for(int i=0; i < q; ++i){
cin>>l>>r;
cout<<(a[r]-a[l-1])/10<<endl;
}
return 0;
} | C++ | 2cd91be317328fec207da6773ead4541 | 667d777eff4483815ee66a44897cab3b | 1,400 | PASSED |
#include<iostream>
#include<cmath>
using namespace std;
int pre[10010000];
int l,r,q,n;
int main(){
cin >> n;
int temp;
for(int i=1;i<=n;i++){
cin >> temp;
pre[i]=pre[i-1]+temp;
}
cin >> q;
for(int i=0;i<q;i++){
cin >>l >>r;
cout << (pre[r]-pre[l-1])/10 <<endl;
}
return 0;
} | C++ | 2cd91be317328fec207da6773ead4541 | d92101745a96dec527adbc0a4a33b208 | 1,400 | PASSED |
#include <iostream>
#include <cstdio>
using namespace std;
typedef long long ll;
ll n, a[100005], sum[100005], x, y, q;
int main()
{
cin >> n;
for (int i = 1; i <= n; i++)
{
scanf("%d", &a[i]);
sum[i] = sum[i - 1] + a[i];
}
cin >> q;
for (int i = 0; i < q; i++)
{
sc... | C++ | 2cd91be317328fec207da6773ead4541 | cb2b64baea1b34b9b32c2d08e6f2ab07 | 1,400 | PASSED |
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<map>
#include<cstring>
#include<string>
#include<cmath>
#include<stack>
#include<queue>
using namespace std;
#define ll long long
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define maxn 100008
ll a[maxn];
ll sum[maxn];
ll cnt[maxn];
int main(){
//... | C++ | 2cd91be317328fec207da6773ead4541 | 5236ed1efd02816a4f0a1e6107725425 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
vector<int> a(n);
for (int i = 0; i<n; i++) cin>>a[i];
vector<int> pref(n+1);
for (int i = 1; i<=n; i++) pref[i] = pref[i-1] + a[i-1];
int q;
cin>>q;
int l, r;
for (int i = 0; i<q; i++)
{
... | C++ | 2cd91be317328fec207da6773ead4541 | bd461e44b381719f246a0561310f3823 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fi first
#define se second
int gcd(int a, int b) {if(b==0) return a; return gcd(b, a % b);}
void printv(vector<int> arr, int... | C++ | 2cd91be317328fec207da6773ead4541 | e5488e299f81b3ed2e9f1caef13d26c6 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using si = short int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pss = pair<string, string>;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
struct fast_ios { fast_ios() { ios::sync_with_stdio(false);... | C++ | 2cd91be317328fec207da6773ead4541 | d2ef3141777473f9026f9fad88bf7f21 | 1,400 | PASSED |
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i= a; i<= b; i++)
#define FORD(i,a,b) for(int i= a; i>= b; i--)
#define For(i,a,b) for(int i= a; i< b; i++)
#define Ford(i,a,b) for(int i= a; i> b; i--)
#define FORE(i,v) for (__typeof((v).begin()) i=(v).begin();i!=(v).end();i++)
#define Fill(s,a) memset(s,a,sizeof(s... | C++ | 7749f37aa9bf88a00013557e14342952 | 4081a6cb50aed3dce4fd97cffaa38f99 | 800 | PASSED |
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int main()
{
int n, c = 0, a[10000] = { 0 }, t;
cin >> n;
string s;
for (int i = 0;i < n;i++)
{
cin >> s;
t = 0;
for (int i = 0;i < s.length();i++)
{
t += s[i] == 'C' ? 1 : 0;
a[i] += s[i] == 'C' ? 1 : 0;
}
c += t > 2 |... | C++ | 7749f37aa9bf88a00013557e14342952 | 34b80045bb9ad3fa7ac67b6bee6ceb7c | 800 | PASSED |
#include "iostream"
#include "string"
using namespace std;
main()
{
long int n,c=0,t,t1;
cin>>n;
char a[n][n];
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin>>a[i][j];
}
}
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
... | C++ | 7749f37aa9bf88a00013557e14342952 | c64f16e9fda24359aa23b0de452fa4f3 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define MAX 1000000
#define MOD 1000000007
#define INF 1 << 29
#define eps 1e-4
#define pi 3.14159265359
#define all( x ) x.begin() , x.end()
#define unique( c ) ( c ).resize( unique( all( c ) ) - ( c ).begin() )
#define debug( a ) cerr << #a << ": " << a << endl;
int mai... | C++ | 7749f37aa9bf88a00013557e14342952 | d9dbe10c457ea6a77b52d0c510bdaac6 | 800 | PASSED |
#include <bits/stdc++.h>
#define mp make_pair
using namespace std;
typedef long long int ll;
typedef pair <ll,ll> pp;
typedef vector <ll> vll;
typedef pair <string,bool> p;
vll v;
string m[1000][1000];
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
string L;
cin>>L;
for(int j=0;j<L.size();j++)
{
m[i]... | C++ | 7749f37aa9bf88a00013557e14342952 | 2d600571973b5c0d74f43402dcc40082 | 800 | PASSED |
#include <iostream>
using namespace std;
int main() {
long long int row[100]={0},col[100]={0};
int n,i,j;
cin>>n;
char ch[101];
for(i=0;i<n;i++)
{
cin>>ch;
for(j=0;j<n;j++)
{
if(ch[j]=='C')
{
row[i]++;
col[j]++;
}
}
}
long long int ans=0;... | C++ | 7749f37aa9bf88a00013557e14342952 | 94c19881d8f3a6168bfe18387ee16a1c | 800 | PASSED |
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
const int maxn = 110;
using namespace std;
int n;
char p[maxn][maxn];
int main(){
while (scanf("%d",&n) != EOF){
for (int i = 0; i < n; i++){
scanf("%s",p[i]);
}
int ans = 0;
for (int i = 0; i <... | C++ | 7749f37aa9bf88a00013557e14342952 | 2cd9a2fdf3c9f16afc8f5bc8fb534b8c | 800 | PASSED |
#include <iostream>
#include <fstream>
using namespace std;
int recurssive(int x)
{
int m,n,result;
result=x*(x-1)/2;
return result;
}
int main()
{
int i,j,n,m,count=0,x=0,y,q=0;
char a[111][111];
cin>>n;
for(i=0;i<n;i++)
for(j=0;j<n;j++)
cin>>a[i][j];
for(i=0;i<n;i++)
{
... | C++ | 7749f37aa9bf88a00013557e14342952 | 4209e02dfbed77f9a171f70a455e099a | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int cake(char **arr,int n){
int rsum=0,csum=0,rfact=0,cfact=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(arr[i][j]=='C')
rsum++;
}
if(rsum>=2)
rfact+= (rsum*(rsum-1))/2;
rsum = 0;
}
for(int j=0;j<n;j++){
for(int k=0;k<n;k++){
if(a... | C++ | 7749f37aa9bf88a00013557e14342952 | 669964689098406e06866cd77820a0c1 | 800 | PASSED |
#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0);
using namespace std;
int main()
{
IOS
int n;
cin>>n;
char c;
vector<pair<int,int> > pares;
for(int i=1;i<=n;++i)
{
for(int j=1;j<=n;++j)
{
cin>>c;
if(c=='C'){pares.push_back(ma... | C++ | 7749f37aa9bf88a00013557e14342952 | efecdaae6fecf1f9aed1aad3dafd3c69 | 800 | PASSED |
#include<cstdio>
#include<vector>
#include<algorithm>
#include<set>
#include<cstring>
#include<assert.h>
using namespace std;
#define FOR(i,a,b) for(int i = a; i <= b; ++i)
#define FORD(i,a,b) for(int i = a; i >= b; --i)
#define RI(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(n)-1)
#define mini(a,b) a=min(a,b)
#define max... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | 20caf1146a13bc371b5c860eb786b23c | 2,100 | PASSED |
#pragma warning( disable : 4996)
#define _USE_MATH_DEFINES
#pragma comment(linker, "/STACK:666000000")
#define bublic public
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits.h>
#... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | 62fffdc9b88690637cd49018f1e77c1a | 2,100 | PASSED |
#pragma warning( disable : 4996)
#define _USE_MATH_DEFINES
#pragma comment(linker, "/STACK:666000000")
#define bublic public
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits.h>
#... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | 263490d918d7ee5fd73420b134ce7739 | 2,100 | PASSED |
#include <cstdio>
#include <iostream>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>
#define Pb push_back
#define Mp make_pair
#define X first
#define Y second
#define sz size
using namespace std;
const int maxn = 1000 * 500 + 12;
vector <int> nei[maxn];
vector <int> ans[maxn];
set < pair <int... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | bb8fd984bcf1a7167852865086ee66d8 | 2,100 | PASSED |
//In the name of God
#include <iostream>
#include <cstdlib>
#include <unordered_map>
#include <algorithm>
#include <vector>
#include <cstdio>
using namespace std;
const int MAXN=5e5+10;
int c[MAXN];
vector <int> g[MAXN],com[MAXN],ans,r;
inline void mer(int v,int u)
{
if(c[v]==c[u])
return;
v=c[v];
u=c[u];
... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | f636f4d612b8e7a472ddf43de40736c5 | 2,100 | PASSED |
#include <cstdio>
#include <unordered_set>
#include <set>
#include <queue>
#include <vector>
#define pb push_back
const int MAX = 5 * 111111 ;
using namespace std;
vector < int > sol [ MAX ] ;
unordered_set < int > gr [ MAX ] ;
set < int > lista ;
queue < int > Q ;
int _scot [ MAX ] , comp ;
inline void bfs ( int... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | c3c7e423705f4a4350da268f1709affb | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int maxn = 5 * 1000 * 100 + 10;
vector <int> g[maxn], ans[maxn];
set <int> nei[2];
int mark[maxn], comb, cur;
int n, m;
void input()
{
cin>>n>>m;
for(int i=0; i<m; i++)
{
int u, v;
scanf("%d%d", &u, &v);
u--, v--;
g[u].pu... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | 2755385eb562721d6a6d77be82615f33 | 2,100 | PASSED |
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
using namespace std;
#define N 555555
#define M 2222222
int head[N],e;
int deg[N];
int block[N],bn;
int gcnt[N];
bool vis[N];
struct node1{
int u,v,next;
}edge[M];
struct node2{
int v,rep;
node2(int a... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | 678002f40cf215658cdf4da1c1ef7318 | 2,100 | PASSED |
//#pragma comment(linker, "/STACK:67108864")
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <list>
#include <functional>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#... | C++ | 72394a06a9d9dffb61c6c92c4bbd2f3a | 5306144b22f562d8860a97b87792adaa | 2,100 | PASSED |
#include <stdio.h>
#define MAXN 500000
#define MAXM 1000000
int b[MAXN], s[2 * MAXM][2], pos, n, m;
int interest[MAXN], n_rebr[MAXN], rank[MAXN], pres[MAXN];
int check[MAXN], n_check;
void
add(int x, int y)
{
s[pos][0] = y;
s[pos][1] = b[x];
b[x] = pos++;
++n_rebr[x];
}
void
read_n(void)
{
scanf(... | C | 72394a06a9d9dffb61c6c92c4bbd2f3a | f364637bbe71a589477154ba10da04b5 | 2,100 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.