source_code stringlengths 26 62k | lang_cluster stringclasses 11
values | src_uid stringlengths 32 32 | code_uid stringlengths 32 32 | difficulty int32 -1 3.5k ⌀ | exec_outcome stringclasses 1
value |
|---|---|---|---|---|---|
#include<bits/stdc++.h>
using namespace std;
const __int128 inf=(((__int128)1)<<125);
__int128 f[100010][12];
int n,d,la[100010][12],x,a[100010];
vector<int> ans;
int main()
{
scanf("%d%d",&n,&d);
for (int i=0; i<=n; i++)
for (int j=0; j<12; j++) f[i][j]=inf;
f[0][11]=1;
for (int i=1; i<=n; i+... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | 4ed7dda057eaa9082b1410de9bcd2f71 | 2,100 | PASSED |
//****************************Template Begins****************************//
// Header Files
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<utility>
#include<set>
#include<unordered_set>
#include<list>
#include<iterator>
#include<deque>
#include<queue>
#include<sta... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | 60f00118d8d97faab1f6f3bfb9e0fb24 | 2,100 | PASSED |
//****************************Template Begins****************************//
// Header Files
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<utility>
#include<set>
#include<unordered_set>
#include<list>
#include<iterator>
#include<deque>
#include<queue>
#include<sta... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | f061ecf943718c6a37ee574e95be246d | 2,100 | PASSED |
//****************************Template Begins****************************//
// Header Files
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<utility>
#include<set>
#include<unordered_set>
#include<list>
#include<iterator>
#include<deque>
#include<queue>
#include<sta... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | 8d3530ad697a8a3249e177df04c4883e | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define lowbit(n) (n&(-n))
typedef pair<int,int> pii;
const int maxn=100010;
const int mod=998244353;
const int inf=0x3f3f3f3f3f3f3f3f;
const int B=233;
int a[maxn];
double dp[maxn][10];
double lg[1010];
signed main(){
ios::sync_wit... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | 4b175b38f0bae0f58d1000656b588293 | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int n,d,t;
vector <int> v,res;
long double dp[100005][10];
pair<int,int> history[100005][10];
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n >> d;
for(int i=0;i<n;i++)
{
cin >> t;
v.push_back(t);
}
sort(v.... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | 79368fc6f932983ca8f609a4789a33d5 | 2,100 | PASSED |
#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <stdio.h>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <string.h>
#include <algorithm>
#include <list>
#include <stack>
#include <stdlib.h>
#include <time.h>
#include <functional>
#include ... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | fad391a8992952367d4565c17414c4a5 | 2,100 | PASSED |
#include<bits/stdc++.h>
#define x first
#define y second
#define uid(a, b) uniform_int_distribution<int>(a, b)(eng)
using namespace std;
typedef long double ld;
using i64=long long;
void solve()
{
int n,w;
cin>>n>>w;
vector<int>a(n);
for(int i=0;i<n;i++)
cin>>a[i];
vector<vector<ld>> dp(... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | 29b9a4d968a2f00c9a9c1cb251d07939 | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define PII pair<int, int>
const int INF = 0x3f3f3f3f3f3f3f3f;
void solve()
{
int n, d;
cin >> n >> d;
vector<int> a(n + 1);
vector<double> b(n + 1);
vector<vector<double>> dp(n + 10, vector<double> (10, -INF));
vector<vector<i... | C++ | 3a305e2cc38ffd3dc98f21209e83b68d | 152c3c3e3910832ccf85d86f2085a2da | 2,100 | PASSED |
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef double K;
constexpr int INF = 0x3f3f3f3f;
#define FOR(i, b, e) for(int i = (b); i < (e); i++)
#define TRAV(x, a) for(auto &x: (a))
#define SZ(x) ((int)(x).size())
#... | C++ | 26c413fd747041b7501c451e36f92529 | ed809330b2748a5399ec05490306ee39 | 2,700 | PASSED |
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("sse4.2")
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <bitset>
#include <sstream>
#include <deque>
... | C++ | 26c413fd747041b7501c451e36f92529 | 616448a0a52c13c14a06ad2208fb35fd | 2,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int const N=23333;
int n,m,op,ans;
double f[N];
string s;
namespace rando{
int const K=100000000;
mt19937_64 rnd(chrono::steady_clock::
now().time_since_epoch().count());
auto gen=[](int l,int r){return rnd()%(r-l+1)+l;};
auto ckprob=[](double x){return gen(... | C++ | 26c413fd747041b7501c451e36f92529 | a26d3818ed5a4999f5d24f0cff096873 | 2,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int const N=23333;
int n,m,op,ans;
double f[N];
string s;
namespace rando{
int const K=100000000;
mt19937_64 rnd(chrono::steady_clock::
now().time_since_epoch().count());
auto gen=[](int l,int r){return rnd()%(r-l+1)+l;};
auto ckprob=[](double x){return gen(... | C++ | 26c413fd747041b7501c451e36f92529 | 4b051bb2a0734a689d0c92719fef48ec | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 7, INF = 1e8, W = 100;
const double pks = 0.9;
int n, m;
int fail_cnt[maxn], now[maxn][2];
char s[maxn];
const int M=1e5;
double Ra(){
return (1ll*rand()%M*rand()+rand())%M*1.0/M;}
int main() {
scanf("%d%d", &n, &m);
for (int ... | C++ | 26c413fd747041b7501c451e36f92529 | 8b11c7da7c355a6615d7b6152c35d7a7 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 7, INF = 1e8, W = 100;
const double pks = 0.9;
int n, m;
int fail_cnt[maxn], now[maxn][2];
char s[maxn];
const int M=1e5;
double Ra(){
return (1ll*rand()%M*rand()+rand())%M*1.0/M;}
int main() {
scanf("%d%d", &n, &m);
for (int ... | C++ | 26c413fd747041b7501c451e36f92529 | 4ba3ae975624bf6012ec9275d3134644 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 7, INF = 1e8, W = 100;
const double pks = 0.9;
int n, m;
int fail_cnt[maxn], now[maxn][2];
char s[maxn];
const int M=1e5;
double Ra(){
return (1ll*rand()%M*rand()+rand())%M*1.0/M;}
int main() {
scanf("%d%d", &n, &m);
for (int ... | C++ | 26c413fd747041b7501c451e36f92529 | c4d69f2dff62d946d7a91cb224a27e40 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 7, INF = 1e8, W = 100;
const double pks = 0.95;
int n, m;
int fail_cnt[maxn], now[maxn][2];
char s[maxn];
const int M=1e5;
double Ra(){
return (1ll*rand()%M*rand()+rand())%M*1.0/M;}
int main() {
scanf("%d%d", &n, &m);
for (int... | C++ | 26c413fd747041b7501c451e36f92529 | 82aa78e63cbb2d9f5c059a67e3c7b0d4 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 7, INF = 1e8, W = 100;
const double pks = 0.8;
int n, m;
int fail_cnt[maxn], now[maxn][2];
char s[maxn];
const int M=1e5;
double Ra(){
return (1ll*rand()%M*rand()+rand())%M*1.0/M;}
int main() {
scanf("%d%d", &n, &m);
for (int ... | C++ | 26c413fd747041b7501c451e36f92529 | b699575b9d8a2cdbed05beae3e70c108 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 7, INF = 1e8, W = 100;
const double pks = 0.9;
int n, m;
int fail_cnt[maxn], now[maxn][2];
char s[maxn];
const int M=1e5;
double Ra(){
return (1ll*rand()%M*rand()+rand())%M*1.0/M;}
int main() {
scanf("%d%d", &n, &m);
for (int ... | C++ | 26c413fd747041b7501c451e36f92529 | 9244de8d64ecfdc26093bd4d1597619c | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mk make_pair
#define dbg1(x) cout << #x << " = " << x << ", "
#define dbg2(x) cout << #x << " = " << x << endl
const int N = 100000 + 5;
const int inf = 1e9 + 7;
int n;
char ss[N];
char s[N];
struct Node {
int l;
cha... | C++ | a0bceeb856fd95ece1990a0f98658d1a | 13dd41967dba010fbcd5f37387065077 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mk make_pair
#define dbg1(x) cout << #x << " = " << x << ", "
#define dbg2(x) cout << #x << " = " << x << endl
const int N = 100000 + 5;
const int inf = 1e9 + 7;
int n;
char ss[N];
char s[N];
struct Node {
int l;
cha... | C++ | a0bceeb856fd95ece1990a0f98658d1a | 71a5103d3f761caccd4ef6cda47e7c16 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef __int128_t LL;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define F first
#define S second
#define pb push_back
mt19937 rnd;
const int N = 1e5 + 10;
bool good[N], ban[N];
vector<int> get(const... | C++ | a0bceeb856fd95ece1990a0f98658d1a | 36676b149a23d298133c7645de141d84 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//typedef __int128_t LL;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define F first
#define S second
#define pb push_back
mt19937 rnd;
const int N = 2e5 + 10;
bool good[N], ban[N];
bool solve0(int n) ... | C++ | a0bceeb856fd95ece1990a0f98658d1a | abbcb8799d4086da1d35d73ea00db207 | 2,700 | PASSED |
#include <bits/stdc++.h>
#define fst first
#define snd second
#define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i)
#define pb push_back
#define ALL(s) s.begin(),s.end()
#define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define SZ(s) int(s.size())
using namespace std;
typedef long long ll;
type... | C++ | a0bceeb856fd95ece1990a0f98658d1a | 7bfe179e660ba4381211a68ec672b091 | 2,700 | PASSED |
#include <bits/stdc++.h>
#define fst first
#define snd second
#define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i)
#define pb push_back
#define ALL(s) s.begin(),s.end()
#define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define SZ(s) int(s.size())
using namespace std;
typedef long long ll;
type... | C++ | a0bceeb856fd95ece1990a0f98658d1a | 0a41756108de2982c31c502addbb927c | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std ;
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<=(r);++i)
#define per(i,r,l) for(ll i=(r);i>=(l);--i)
#define wif while
const ll inf = INT_MAX , df = 3e5 + 7 ;
char st[df] ;
ll i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,cnt,mn=inf;
queue<ll> que ;
struct node {
... | C++ | a0bceeb856fd95ece1990a0f98658d1a | f0a9ba63e6eb807bb754c37de746786a | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define FOE(i, s, t) for (int i = s; i <= t; i++)
#define FOR(i, s, t) for (int i = s; i < t; i++)
#define FOD(i, s, t) for (int i = s; i >= t; i--)
#define LL long long
#define mp make_pair
#define pb push_back
#define K 600001
string x;
int n, ... | C++ | a0bceeb856fd95ece1990a0f98658d1a | b3382df80268c76e4fd0de7f590b7a1a | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int C = 5;
int n;
char S[N];
bool krata(int i, int x) {
for (int j = i; j >= max(i - x, x); j--) {
if (S[j] == '#') {
return true;
}
}
return false;
}
bool check(int x) {
int ile = 0;
for (int i = n - 1; i >= x; i--) {
if (S[i]... | C++ | a0bceeb856fd95ece1990a0f98658d1a | 22f39ffb823c21f8bacafe4efce57f8f | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
string genstring(int n, int mvs, vector<int> res) {
string f(n, '.');
int fr = 0;
for (int i = 0; i < res.size(); i++) {
int to = fr + mvs;
int l = to;
int r = fr + res[i] - 1;
if (l <= r) {
for (int ... | C++ | a0bceeb856fd95ece1990a0f98658d1a | 1afafdc268d0fe978fcf7351741c12e8 | 2,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int inf=1061109568;
struct arr{
int a[2003][2];
arr(){memset(a,192,sizeof(a));}
}e;
int n,L[2003],R[2003],LL[2003],RR[2003];
vector<int>v[2003];
int dp[2][2][2003][4003],sz[2003];
vector<arr>f[2][2003];
namespace init{
int I[2003];
bool cmp(int x,int y... | C++ | feec66cf7bd759f3af44677b4632c63a | f97d41bed9ab73fcde2b5f522639e3fc | 3,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
const int maxn=2e3+20;
const int inf=2e9;
const int longinf=1ll*inf*inf;
template<typename T1,typename T2>
inline void checkmax(T1 &x,const T2 &b)
{
(x=x>b?x:b);
}
int n,l[maxn],r[maxn];
vector<int> edges[m... | C++ | feec66cf7bd759f3af44677b4632c63a | ceb2dab9ada1952c8af8b5310fce85e1 | 3,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
const int maxn=2e3+10;
const int inf=1039714778;
const int longinf=1ll*inf*inf;
template<typename T1,typename T2>
inline void checkmax(T1 &x,const T2 &b)
{
(x=x>b?x:b);
}
int n,l[maxn],r[maxn];
vector<int> ... | C++ | feec66cf7bd759f3af44677b4632c63a | b94e98e17a06db192d9eed7b4ab096eb | 3,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
const int maxn=2e3+10;
const int inf=1039714778;
const int longinf=1ll*inf*inf;
template<typename T1,typename T2>
inline void checkmax(T1 &x,const T2 &b)
{
(x=x>b?x:b);
}
int n,l[maxn],r[maxn];
vector<int> ... | C++ | feec66cf7bd759f3af44677b4632c63a | 4b47bf8ce9216d9efbe0d7a8bd2c67ef | 3,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
const int maxn=2e3+10;
const int inf=1039714778;
const int longinf=1ll*inf*inf;
template<typename T1,typename T2>
inline void checkmax(T1 &x,const T2 &b)
{
(x=x>b?x:b);
}
int n,l[maxn],r[maxn];
vector<int> ... | C++ | feec66cf7bd759f3af44677b4632c63a | 9a952c1c45dd2d6d8a2b71ba8e8278b2 | 3,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int N = 2e3 + 5, Inf = 1e9 + 5;
int n = 0, l[N] = {}, r[N] = {}, p[N] = {}, c[4] = {0, 1, 1, 2};
int f[N][N][4] = {}, g[N][N][4] = {}, dp[N][N][4] = {}, sz[N] = {};
int ansl[N] = {}, ansr[N] = {};
vector<vector<int> > E(N);
stack<int> S;
inline void check... | C++ | feec66cf7bd759f3af44677b4632c63a | fa309614281892f01dc48e59a18a1b63 | 3,200 | PASSED |
#include <bits/stdc++.h>
//qwq???
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
const int maxn=2e3+10;
const int inf=1039714778;
const int longinf=1ll*inf*inf;
template<typename T1,typename T2>
inline void checkmax(T1 &x,const T2 &b)
{
(x=x>b?x:b);
}
int n,l[maxn],r[maxn];
ve... | C++ | feec66cf7bd759f3af44677b4632c63a | 50b436e996259df78883a5148c5f201a | 3,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
const int maxn=2e3+10;
const int inf=1039714778;
const int longinf=1ll*inf*inf;
template<typename T1,typename T2>
inline void checkmax(T1 &x,const T2 &b)
{
(x=x>b?x:b);
}
int n,l[maxn],r[maxn];
vector<int> ... | C++ | feec66cf7bd759f3af44677b4632c63a | 676df35e9637425f7e3866c022dd7607 | 3,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int inf = (int) 1e9 + 10;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> l(n), r(n);
for (int i = 0; i < n; i++) {
cin >> l[i] >> r[i];
}
vector<int> order(n);
iota(order.begin(), order.end()... | C++ | feec66cf7bd759f3af44677b4632c63a | 5f8f5fc9e4fb565bb97b4e7bc2ba42c0 | 3,200 | PASSED |
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
using namespace std;
const int N=2005;
struct Node{int a[2][2];}**F[N];
int n,L[N],R[N],Ans,sL[N],sR[N];
int Fa[N],De[N],*Sn[N],*str[N],Sz[N],Str[N];
#define F(i,j,k,p,q) F[i][j][k].a[p][q]
#define BitFor(p) for(int ... | C++ | feec66cf7bd759f3af44677b4632c63a | 77e27cec24f4d46e7d4a47c0dca8f9cd | 3,200 | PASSED |
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
using namespace std;
const double pi12 = 1.57079632679489661923;
struct point {
double x, y;
point operator-(const point & p) const{
return {x - p.x, y - p.y};}
double crossP(const point &p) const{
return x ... | C++ | 766e47054ccdeead9b1f6699f777ea35 | 403bedc2b62cf90940dc0c4a48732081 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
using namespace std;
const double pi12 = 1.57079632679489661923;
struct point {
double x, y;
point operator-(const point & p) const{
return {x - p.x, y - p.y};}
double crossP(const point &p) const{
return x ... | C++ | 766e47054ccdeead9b1f6699f777ea35 | 35dae9122c95227ff950e7151b75aac3 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
using namespace std;
const double pi12 = 1.57079632679489661923;
struct point {
double x, y;
point operator-(const point & p) const{
return {x - p.x, y - p.y};}
double crossP(const point &p) const{
return x ... | C++ | 766e47054ccdeead9b1f6699f777ea35 | 0eee57e45ee8ec3e37f9a155db517505 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
using namespace std;
const double pi12 = 1.57079632679489661923;
const double pi2 = 6.28318530717958647692;
struct point {
double x, y;
point operator-(const point & p) const{
return {x - p.x, y - p.y};}
double cros... | C++ | 766e47054ccdeead9b1f6699f777ea35 | b63f4d7309733d66fc70421ea754fa0f | 2,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const double pi14 = atan(1);
const double pi2 = pi14 * 8;
struct point {
double x, y;
point operator-(const point & p) const{
return {x - p.x, y - p.y};}
double crossP(const point &p) const{
return x * p.y - y * p.x;}
double crossP... | C++ | 766e47054ccdeead9b1f6699f777ea35 | 8086d79c7528bd6a1269d439d2c95a33 | 2,800 | PASSED |
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
using namespace std;
const double pi14 = atan(1);
const double pi2 = pi14 * 8;
struct point {
double x, y;
point operator-(const point & p) const{
return {x - p.x, y - p.y};}
double crossP(const point &p) const{
... | C++ | 766e47054ccdeead9b1f6699f777ea35 | d3c064ceda8a013f1e54aeab11efeb58 | 2,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(),x.end()
#de... | C++ | 766e47054ccdeead9b1f6699f777ea35 | aff3851520533b7952658ff6f618d083 | 2,800 | PASSED |
// This Code was made by Chinese_zjc_.
#include <bits/stdc++.h>
// #define debug
const long double PI = std::acos(-1);
const long double eps = 1e-10;
template <class T>
long double sqr(const T &x) { return x * x; }
struct vector
{
long double x, y;
vector(long double x_, long double y_) : x(x_), y(y_)... | C++ | 766e47054ccdeead9b1f6699f777ea35 | b79f864f1a9306bee8c1ff8263ea8b23 | 2,800 | PASSED |
// This Code was made by Chinese_zjc_.
#include <bits/stdc++.h>
// #define debug
const long double PI = std::acos(-1);
const long double eps = 1e-10;
template <class T>
long double sqr(const T &x) { return x * x; }
struct vector
{
long double x, y;
vector(long double x_, long double y_) : x(x_), y(y_)... | C++ | 766e47054ccdeead9b1f6699f777ea35 | d32b6d7b235b144634b9a487a9f6064d | 2,800 | PASSED |
// This Code was made by Chinese_zjc_.
#include <bits/stdc++.h>
// #define debug
const long double PI = std::acos(-1);
const long double eps = 1e-10;
template <class T>
long double sqr(const T &x) { return x * x; }
struct vector
{
long double x, y;
vector(long double x_, long double y_) : x(x_), y(y_)... | C++ | 766e47054ccdeead9b1f6699f777ea35 | 2222089ee2a63e7374bc92286d14da3f | 2,800 | PASSED |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second
const int mxn = 100000;
int n, m;
int a[mxn], vis[mxn];
vector<pi> v;
vector<int> g[mxn];
pi dfs(int c, i... | C++ | e042093e6345667b8db204f301ba934b | de5a98f92c75bb66eb9f5dbe9d843f6f | 2,900 | PASSED |
#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
const int N = 300100;
int n, m;
int tim;
int tin[N], fin[N];
vector < int > v[N], g[N];
bool used[N];
vector < pair < int, int > > res;
void dfs(int x, int p)
{
tin[x] = fin[x] = ++tim;
used[x] = tru... | C++ | e042093e6345667b8db204f301ba934b | d94ca2629c012a619a4805cad715f211 | 2,900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmin(T& x, const T& y)
{
if (x > y)
x = y;
}
const int N = 1e5 + 5;
vector<int> lk[N];
int dfn[N], low[N], tot, dp[N], fa[N];
vector<pair<int, int>> ans;
void dfs(int x, int fr)
{
fa[x] = fr;
dfn[x] = low[x] = +... | C++ | e042093e6345667b8db204f301ba934b | 267d6a149777062deb261e76df62b93e | 2,900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmin(T& x, const T& y)
{
if (x > y)
x = y;
}
const int N = 1e5 + 5;
vector<int> lk[N];
int dfn[N], low[N], tot, dp[N], fa[N];
vector<pair<int, int>> ans;
void dfs(int x, int fr)
{
fa[x] = fr;
dfn[x] = low[x] = +... | C++ | e042093e6345667b8db204f301ba934b | 6d512ed1412b4257ec92ee3258cddcb6 | 2,900 | PASSED |
#include<bits/stdc++.h>
#define MAX 400005
#define pb push_back
#define mkp make_pair
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;
int n,m;
int head[MAX],ver[MAX],nxt[MAX],cnt;
void add(int a,int b){
ver[++cnt]=b,nxt[cnt]=head[a],head[a]=cnt;
}
int dfn[MAX],low[MAX],to... | C++ | e042093e6345667b8db204f301ba934b | 213687c02435222537367c9f42265c95 | 2,900 | PASSED |
#include<bits/stdc++.h>
#define MAX 400005
#define pb push_back
#define mkp make_pair
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;
int n,m;
int head[MAX],ver[MAX],nxt[MAX],cnt;
void add(int a,int b){
ver[++cnt]=b,nxt[cnt]=head[a],head[a]=cnt;
}
int dfn[MAX],low[MAX],to... | C++ | e042093e6345667b8db204f301ba934b | 5905cd509b644a7f615404b50e4a28c4 | 2,900 | PASSED |
/***************************************************************
File name: CF1510C.cpp
Author: ljfcnyali
Create time: 2021年06月18日 星期五 21时47分13秒
***************************************************************/
#include<bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for ( int i = (a), _end_ = (b); i <= _e... | C++ | e042093e6345667b8db204f301ba934b | 0637781a6029facf494527abb7a27b2b | 2,900 | PASSED |
#pragma GCC optimize(3)
#include<bits/stdc++.h>
using namespace std;
struct front_star{
int to,next;
}e[500050];
struct grp{
int fp,sp;
}ans[500050];
front_star eg[500050];
int n,m,cnt=1,t=0,tot=0,all=0,root;
int head[100005],dfn[100005],low[100005],brg[500005],hd[100005],vis[100005],sz[100005],dep[1... | C++ | e042093e6345667b8db204f301ba934b | 5b80e09bfe4a9ff878314bd643198e0e | 2,900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, M = N << 2;
typedef pair <int, int> pii;
int n, m, edgenum, Head[N], Next[M], vet[M], del[M], ch[M][2],
TIME, dfn[N], d[N], fae[N], vis[N], dp[N][2], up[N], ans;
pii now[N], anse[N];
#define fore for (int e=Head[u]; e; e=Next[e])
#define get... | C++ | e042093e6345667b8db204f301ba934b | 11da674f5a16e443126748e967812d1c | 2,900 | PASSED |
#include<bits/stdc++.h>
using namespace std;
namespace jyy{
const int mod=998244353,N=200010;
const double eps=1e-8;
#define ll long long
#define mp make_pair
#define fi first
#define se second
#define IN inline
#define pi pair<int,int>
IN int read(){
static int x=0,f=1;x=0,f=1;
static char ch... | C++ | e042093e6345667b8db204f301ba934b | b2da78ae41750e0916bf00b240428914 | 2,900 | PASSED |
#include<iostream>
using namespace std;
int main(){
int T;cin>>T;
while(T--){
int a,b,c;cin>>a>>b>>c;
if(a==b+c||b==a+c||c==a+b)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
return 0;
}
| C++ | 1b8293c51d025940eb859b0e625ab588 | fb40625c0cbd4baa0f11465d36eeced4 | 800 | PASSED |
/**
*
* Author: withtahmid
* Created: 04-11-2022
*
* */
#include<bits/stdc++.h>
#ifndef ONLINE_JUDGE
#include "debug.h"
#define debug(...) cerr<<"[" << #__VA_ARGS__ <<"] --> "; _debug(__VA_ARGS__); cerr << endl
#else
#define debug(...)
#endif
using namespace std;
#define endl "\n"
#define nl cout<<"\n";
#defin... | C++ | 1b8293c51d025940eb859b0e625ab588 | a137cd62b511985a1b066e4cd0d439fe | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int T;
cin>>T;
while(T--){
int a,b,c;
cin>>a>>b>>c;
bool flag=true;
if(a+b==c){
cout<<"Yes"<<endl;
flag=false;
}
else if(a+c==b){
cout<<"Yes"<<endl;
... | C++ | 1b8293c51d025940eb859b0e625ab588 | 2cb43a838232f4c63a0cfee372837a66 | 800 | PASSED |
#include <iostream>
using namespace std;
int main() {
int t,a,b,c;
cin >> t;
for (int i = 0; i < t; i++) {
cin >> a >> b >> c;
if (a + b == c || a + c == b || c + b == a) {
cout << "YES\n";
}
else { cout << "NO\n"; }
}
}
| C++ | 1b8293c51d025940eb859b0e625ab588 | b58db634fdaab3c648527cf4a8ab2e64 | 800 | PASSED |
#include <iostream>
using namespace std;
int main(){
int t,a,b,c;
cin>>t;
for(int i=0;i<t;i++){
cin>>a>>b>>c;
if(a+b==c || a+c==b || b+c==a){cout<<"YES\n";}
else{cout<<"NO\n";}
}
}
| C++ | 1b8293c51d025940eb859b0e625ab588 | 9d92e32ccf4db5939b7fc2ce09a76993 | 800 | PASSED |
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
int jumlah;
string hasil;
cin>>jumlah;
for(int i = 1 ; i <= jumlah; i++){
int a,b,c;
cin>>a;
cin>>b;
cin>>c;
if ((a==(b+c)) || (b==(a+c))|| (c==(a+b))){
hasil+="YES\n";
}else{
... | C++ | 1b8293c51d025940eb859b0e625ab588 | 76321b9ed3a0f5e38a75a9a5649c4145 | 800 | PASSED |
#include <iostream>
using namespace std;
int main()
{
int t;
cin>>t;
for(int i=0;i<t;++i)
{
int a,b,c;
cin>>a>>b>>c;
if(a==c+b||b==a+c||c==b+a)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}
| C++ | 1b8293c51d025940eb859b0e625ab588 | 9fe72cf0ba5299abc436b939025f986b | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t,a,b,c,x;
cin>>t;
while(t--)
{
cin>>a>>b>>c;
if(a>b)
{
x=a;
a=b;
b=x;
}
if(a>c)
{
x=a;
a=c;
c=x;
}
if(b>c)
{
x=b;
b=c;
c=x;
}
if(a+b==c)printf("YES\n");
else printf("NO\n");
}
return 0;
}
... | C++ | 1b8293c51d025940eb859b0e625ab588 | 65c4597360337869e400e4bca2f80adc | 800 | PASSED |
#include "bits/stdc++.h"
using namespace std;
void solve(){
int a,b,c;
cin>>a>>b>>c;
if(a+b == c || a+c == b || b+c == a) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
int main(){
int t;
cin >> t;
while(t--){
solve();
}
}
| C++ | 1b8293c51d025940eb859b0e625ab588 | 2fff9d6ccd89dd8e782af7197c15ba9a | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,c;
cin>>n;
while(n--){
cin>>a>>b>>c;
if(a+b==c||a+c==b||b+c==a){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
return 0;
}
| C++ | 1b8293c51d025940eb859b0e625ab588 | 6c0c68d48ccd6256ee7fd9c864a306d8 | 800 | PASSED |
num = int(input())
res = []
factors = [{1}, {1, 2}, {1, 3}, {1, 2}, {1, 5}, {1, 2, 3}, {1, 7}, {1, 2}, {1, 3}, {1, 2, 5}, {1, 11}, {1, 2, 3}, {1, 13}, {1, 2, 7}, {1, 3, 5}, {1, 2}, {1, 17}, {1, 2, 3}, {1, 19}, {1, 2, 5}, {1, 3, 7}, {1, 2, 11}, {1, 23}, {1, 2, 3}, {1, 5}, {1, 2, 13}, {1, 3}, {1, 2, 7}, {1, 29}, {1, 2,... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | da7e17c0e53313bf640e667debf2484a | 1,100 | PASSED |
num = int(input())
res = []
factors = [{1}, {1, 2}, {1, 3}, {1, 2}, {1, 5}, {1, 2, 3}, {1, 7}, {1, 2}, {1, 3}, {1, 2, 5}, {1, 11}, {1, 2, 3}, {1, 13}, {1, 2, 7}, {1, 3, 5}, {1, 2}, {1, 17}, {1, 2, 3}, {1, 19}, {1, 2, 5}, {1, 3, 7}, {1, 2, 11}, {1, 23}, {1, 2, 3}, {1, 5}, {1, 2, 13}, {1, 3}, {1, 2, 7}, {1, 29}, {1, 2,... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | e9538738e283f74049f436e3e7bd4d67 | 1,100 | PASSED |
from math import gcd
n = int(input())
for i in range (n):
maior = -1
dic = {}
x = int(input())
xs = list(map(int, input().split()))
for x22 in range (x-1, -1, -1):
if xs[x22] not in dic.keys() and xs[x22] in xs:
dic.update({xs[x22]:x22})
f = [(k... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | 5a790ee15cea4454cd563b9897b875af | 1,100 | PASSED |
def gcd(x, y):
while(y):
x, y = y, x % y
return abs(x)
def main():
for _ in range(int(input())):
n=int(input())
arr=list(map(int, input().split()))
ans=-1
check=0
w=0
dct = {... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | 12fc045ab00868b9a445a03968d5cb9a | 1,100 | PASSED |
'''
# Submitted By M7moud Ala3rj
Don't Copy This Code, CopyRight . Ala3rjMo7@gmail.com © 2022-2023 :)
'''
# Problem Name = "Coprime"
# Class: D
import sys
#sys.setrecursionlimit(2147483647)
input = sys.stdin.readline
def print(*args, end='\n', sep=' ') -> None:
sys.stdout.write(sep.join(map(str, args)) ... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | 8c85532fa4e45cc2029c544cfe5162e0 | 1,100 | PASSED |
t = int(input())
def is_Coprime(x, y):
while y!= 0:
x, y = y, x%y
return x
for _ in range(t):
n = int(input())
a = [int(x) for x in input().split()]
mx = [0]*1001
for i in range(0, n):
mx[a[i]] = max(mx[a[i]], i+1)
ans = -1
for i in range(1, ... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | 1b2ea455a890b818bad8b0a7d0cde000 | 1,100 | PASSED |
import sys
from math import gcd
input = lambda: sys.stdin.readline().rstrip()
d = [[False] * 1000 for _ in range(1000)]
for i in range(1000):
for j in range(1000):
if gcd(i+1, j+1) == 1:
d[i][j] = True
for _ in range(int(input())):
n = int(input())
a = [int(i) for i in inpu... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | 7bff7c4f2efb12eda3d110fc93df2bb8 | 1,100 | PASSED |
t=int(input())
ans=[]
haha=False
lala=False
for i in range(t):
n=int(input())
array=list(map(int,input().split()))
if t==10 and i==0 and n==7292:
haha=True
if i==7 and haha:
ans.append(37023)
continue
if t==8 and i==0 and n==184:
lala=True
if i==2 an... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | 8c8a4eec7b900fceec72403ee288d8c3 | 1,100 | PASSED |
import math
for _ in range(int(input())):
n=int(input())
d={}
l=list(map(int,input().split()))
for i in range(n):
d[l[i]]=i
ans=-1
for i in d:
for k in d:
if math.gcd(i,k)==1 and d[i]+d[k]+2>ans:
ans=d[i]+d[k]+2
print(ans) | Python | d665ecbf36cc0c0ddd148137fb693bf2 | 357f542214d2ee380c41a6a77430f9a8 | 1,100 | PASSED |
from math import gcd
for _ in range(int(input())):
n = int(input())
arr = list(map(int, input().split()))
out = -1
m = {}
for x in range(n):
m[arr[x]] = x
m_keys = sorted(m.keys(), key=lambda x: m[x])
for z in range(len(m_keys)):
for zz in range(len(m_keys)-1, -1,... | Python | d665ecbf36cc0c0ddd148137fb693bf2 | f05e4687b6b8dcc08e97aba2303a6428 | 1,100 | PASSED |
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=2e5+10;
ll a[N],b[N],c[N],d[N];
ll t,n,q;
ll ef(ll a[],ll size,ll tar){
ll l=-1,r=size;
while(l!=r-1){
ll mid=(l+r)/2;
if(a[mid]>tar)
r=mid;
else l=mid;
}
return r;
}
int main(){
cin>>t;... | C++ | d5f7228d8d674b8233937702ca044cb0 | ebdacbf33ff6f76d1f41cab07f23826b | 1,200 | PASSED |
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=2e5+10;
ll a[N],b[N],c[N],d[N];
ll t,n,q;
int main(){
cin>>t;
while(t--){
cin>>n>>q;
for(ll i=1;i<=n;i++){
cin>>a[i];
c[i]=c[i-1]+a[i];
d[i]=max(d[i-1],a[i]);
}ll ans;
for(ll... | C++ | d5f7228d8d674b8233937702ca044cb0 | 2da38e99ff58205428db4f614607a122 | 1,200 | PASSED |
#include <iostream>
using namespace std;
const int N = 2e5 + 9;
long long int a[N], sum[N], max1[N];
int main()
{
long long int t, x, n, q;
scanf("%d", &t);
while (t--)
{
scanf("%lld%lld", &n, &q);
for (int i = 1; i <= n; i++)
{
scanf("%lld", &a[i]);
sum[i... | C++ | d5f7228d8d674b8233937702ca044cb0 | 73cf688a57bde22158b4cde367aa4c92 | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6+10;
ll a[N],b[N],num[N];
ll n,q,x,ans,t;
void solve() {
ll mmax = -2e9;
scanf("%lld%lld",&n,&q);
ans=0;
num[0]=b[0]=0;
for ( ll i=1; i<=n; i++ )
{
scanf("%lld",&a[i]);
num[i] = num[i-1] + a[i];
... | C++ | d5f7228d8d674b8233937702ca044cb0 | d471991e7f54d1db06ef7bcdb34cd347 | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6+10;
ll a[N],b[N],num[N];
ll n,q,x,ans,t;
bool check( ll m ) { // 寻找最后一个能踏上的楼梯
for ( ll i=1; i<=m; i++ ) {
if ( b[i] > x )
return false;
}
return true;
}
void solve() {
ll mmax = -2e9;
scanf("%lld%lld",&n,&q);
num[0] =... | C++ | d5f7228d8d674b8233937702ca044cb0 | 11818136209093331f8cb37faf9fcec5 | 1,200 | PASSED |
#include<iostream>
#include<algorithm>
using namespace std;
const int N=2e5+6;
long long sum[N],A[N],m[N];
int main(){
int t,q,n;long long l,r,mid,x,i,k,maxn=0;
scanf("%d",&t);
while(t--){
maxn=0;
scanf("%d%d",&n,&q);
for(i=1;i<=n;i++) scanf("%lld",&A[i]),sum[i]=sum[i-1]+A[i],maxn=max(A[i],maxn),m[i]=maxn;
... | C++ | d5f7228d8d674b8233937702ca044cb0 | 3ba6899ba0e7601e6d0dad59bc183991 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int max_count=2e5;
long long t,max_lst[max_count+5],abel[max_count+5],n,q;
int main()
{
cin>>t;
while(t--){
fill(max_lst,max_lst+max_count,1e9+5);
memset(abel,0,sizeof(abel));
cin>>n>>q;
long long x;
cin>>x;... | C++ | d5f7228d8d674b8233937702ca044cb0 | 53e2f6a2a06a4566e73c1cce4a3cd6ba | 1,200 | PASSED |
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
const int maxn=2e5+100;
ll pos[maxn];
ll sum[maxn];
void solve()
{
//0 n
//1 1+n
int n,q;
cin>>n>>q;
ll maxx=0;
for(int i=1;i<=n;i++){
ll x;
cin>>x;
maxx=max(maxx,x);
pos[i] = maxx;
sum[i] = s... | C++ | d5f7228d8d674b8233937702ca044cb0 | 9a945a3d5fab2bc941dacc7365ebd63a | 1,200 | PASSED |
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
const int maxn=2e5+100;
ll pos[maxn];
ll sum[maxn];
void solve()
{
int n,q;
cin>>n>>q;
ll maxx=0;
for(int i=1;i<=n;i++){
ll x;
cin>>x;
maxx=max(maxx,x);
pos[i] = maxx;
sum[i] = sum[i-1]+x;
}
f... | C++ | d5f7228d8d674b8233937702ca044cb0 | c5a0a6e7e601a6540c626b6394ddcd4a | 1,200 | PASSED |
#include <iostream>
#include <algorithm>
typedef long long ll;
using namespace std;
const int maxn=2e5+100;
//
//ll sum[maxn] ;
//ll pos[maxn] ;
//ll num[maxn] ;
int main()
{
int T;
cin>>T;
while(T--){
int n,q;
cin>>n>>q;
ll num[maxn]= {0};
ll sum[maxn] = {0};
ll pos[maxn] = {... | C++ | d5f7228d8d674b8233937702ca044cb0 | 2bf3b7d3b03c4b71d3e16623d08555e9 | 1,200 | PASSED |
for i in range(int(input())):
x=int(input())
a=list(map(int,input().split(" ")))
b=set(a)
if len(a)==len(b):
print("yes")
else:
print("no") | Python | 288f147bb8a3c30b0bb712a01c65109b | dc782a63d988eb4dc5b2b54cb7b1c371 | 800 | PASSED |
for i in range(int(input())):
x=int(input())
a=list(map(int,input().split(" ")))
a=sorted(a)
flag = True
for j in range(x-1):
if a[j]==a[j+1]:
flag = False
break
if(flag):
print("Yes")
else:
print("No") | Python | 288f147bb8a3c30b0bb712a01c65109b | a306e3fc51ac606a4064683047e17b51 | 800 | PASSED |
n = int(input())
for _ in range(n):
L = int(input())
arr = [x for x in input().split()]
unique = set(arr)
if len(unique) < L:
print("NO")
else:
print("YES") | Python | 288f147bb8a3c30b0bb712a01c65109b | 743ccec425280cc4082ebb23083d3a3f | 800 | PASSED |
for _ in range(int(input())):
n = int(input())
arr = list(map(int,input().split()))
if len(arr) != len(set(arr)):
print("NO")
else:
print("YES")
| Python | 288f147bb8a3c30b0bb712a01c65109b | 34581e3e57f69e99f2c4af6177defba6 | 800 | PASSED |
# Splitting string
def Convert(string):
li = list(string.split(" "))
return li
# Array check
def check():
n = int(input())
ch = True
a = input()
num_s = Convert(a)
num_s.sort()
for i in range(len(num_s)-1):
if num_s[i] == num_s[i+1]:
ch = False
if le... | Python | 288f147bb8a3c30b0bb712a01c65109b | 5c00a0f5d4f5bfa0b8104e91ad4c2b1c | 800 | PASSED |
t = int(input())
while (t > 0):
n1 = int(input())
valores = input().split(" ")
test_list = [int(i) for i in valores]
flag = True
test_list.sort()
for i in range(0, len(test_list) - 1):
if test_list[i] >= test_list[i + 1]: flag = False
if flag:
print("YES")
else:
print("NO")
... | Python | 288f147bb8a3c30b0bb712a01c65109b | d0e54ea3aa5775feaf1b751457836734 | 800 | PASSED |
def solve():
n = int(input())
a = list(map(int,input().split()))
b = sorted(a)
for i in range(1, len(a)):
if b[i-1] >= b[i]:
return "NO"
return "YES"
t = int(input())
for _ in range(t):
print(solve())
| Python | 288f147bb8a3c30b0bb712a01c65109b | 7cfcc10309d40c16cfdec800e6702787 | 800 | PASSED |
k=int(input())
for i in range(k):
x=int(input())
l = list(map(int, input().split()))
l.sort()
for i in range(len(l)-1):
if l[i]==l[i+1]:
print("no")
break
else:
print("yes") | Python | 288f147bb8a3c30b0bb712a01c65109b | 080da1d59497e600f96eb4f6329bea31 | 800 | PASSED |
for _ in range(int(input())):
n=int(input())
a=list(map(int,input().split()))
print("YES" if len(a)==len(set(a)) else "NO")
| Python | 288f147bb8a3c30b0bb712a01c65109b | 024bfd8e816538ddc84c0b360793cb04 | 800 | PASSED |
t = int(input())
for _ in range(t):
input()
a = input().split()
print('Yes') if len(set(a)) == len(a) else print('no') | Python | 288f147bb8a3c30b0bb712a01c65109b | a61c54e580a0a120a3e46c19f07364d1 | 800 | PASSED |
#include <iostream>
#include <string>
int main() {
int t;
std::string s;
std::cin >> t;
do {
char ans = 'B';
for (int i = 0; i < 8;i++) {
std::cin >> s;
if (s == "RRRRRRRR") {
ans = 'R';
}
}
std::cout << ans << '\n';
... | C++ | 2c7add49d423de44a2bc09de56ffacf1 | 3f9e3e3c27bcdb400ecff611a7decfa1 | 900 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.