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;
array<int, 3> a;
vector<pair<int, int64_t>> inp[3];
auto maxb(auto& a, const auto& b) { return a < b? a = b, 1: 0; }
auto minb(auto& a, const auto& b) { return a > b? a = b, 1: 0; }
auto eval(array<int64_t, 3> w) {
array<int, 3> cnt{};
int64_t res{};
... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | 8100c9ad71a5acb3a3a79d73a5614eb3 | 3,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#ifdef SG
#include <debug.h>
#else
template<typename T> struct outputer;
struct outputable {};
#define PRINT(...)
#define OUTPUT(...)
#define show(...)
#define debug(...)
#define deepen(...)
#define timer(...)
#define fbegin(...)
#define fend
#d... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | ad0f66de7e607c695454955d5cc20628 | 3,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#ifdef SG
#include <debug.h>
#else
template<typename T> struct outputer;
struct outputable {};
#define PRINT(...)
#define OUTPUT(...)
#define show(...)
#define debug(...)
#define deepen(...)
#define timer(...)
#define fbegin(...)
#define fend
#... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | e9a9c8ec183ef4b70b73cbdf066e7cc1 | 3,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#ifdef SG
#include <debug.h>
#else
template<typename T> struct outputer;
struct outputable {};
#define PRINT(...)
#define OUTPUT(...)
#define show(...)
#define debug(...)
#define deepen(...)
#define timer(...)
#define fbegin(...)
#define fend
#... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | 718d9363cb8c32671fdae74fe48584dd | 3,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#ifdef SG
#include <debug.h>
#else
template<typename T> struct outputer;
struct outputable {};
#define PRINT(...)
#define OUTPUT(...)
#define show(...)
#define debug(...)
#define deepen(...)
#define timer(...)
#define fbegin(...)
#define fend
#... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | 2419a587486657a07be7ef957f7627be | 3,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
array<int, 3> a;
vector<pair<int, int64_t>> inp[3];
auto maxb(auto& a, const auto& b) { return a < b? a = b, 1: 0; }
auto minb(auto& a, const auto& b) { return a > b? a = b, 1: 0; }
auto eval(array<int64_t, 3> w) {
array<int, 3> cnt{};
int64_t res{};
... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | bf0d68d1e8f5fcabb685672eed685d53 | 3,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
array<int, 3> a;
vector<pair<int, int64_t>> inp[3];
auto maxb(auto& a, const auto& b) { return a < b? a = b, 1: 0; }
auto minb(auto& a, const auto& b) { return a > b? a = b, 1: 0; }
auto eval(array<int64_t, 3> w) {
array<int, 3> cnt{};
int64_t res{};
... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | bfafd62eae2ff24f517c4ea39fe3366c | 3,500 | PASSED |
#pragma GCC optimize "unroll-loops,tree-vectorize"
#pragma GCC target "movbe,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,aes,pclmul,fsgsbase,rdrnd,fma,bmi,bmi2,f16c,rdseed,clflushopt,xsavec,xsaves,adx,prfchw,lzcnt,abm"
#include <bits/stdc++.h>
using namespace std;
constexpr int N = 1e5 + 1;
int n;
... | C++ | 1e5b091fd8cad0cc7741d0ea85974fa8 | 8f4c9c1edd2deb7c587d3f08d835aeed | 3,500 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
int a , q = 0 , ... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | 3dc0fda16dad9905c1d23d4e49b4090c | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
int a , q = 0 , ... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | 46c40c99793c9b13e4188447e6e2b670 | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
/*
int a , ... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | b70d3829b85c6dcaf11813793b16ce0b | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
int a , q = 0 , ... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | 4d8049790bbbe9c42054eb2cbb8d8833 | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
int a , q = 0 , ... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | c3069544670225c6007be403904076bd | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
int a , q = 0 , ... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | 26a851667750bbe5622523e622ddc1a8 | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
int a , q = 0 , ... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | 191f6d94343060b800fb4208f235b020 | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
ll a , q = 0 , w... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | e0864b565fa0355cd3f9808cd63564f6 | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
ll a , q = 0 , w... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | f005c162de1191531c87ea603e24ee5d | 800 | PASSED |
#include <bits/stdc++.h>
#define fr first
#define sc second
#define pb push_back
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define ll long long
using namespace std;
void func() {
ll a , q = 0 , w... | C++ | 5ccef7fbfd5e85d7fc7ef92f9ebc4088 | eb2bfe3afde667b9d850275836f35e76 | 800 | PASSED |
// LUOGU_RID: 90750152
/*
Title:
Code:
Algorithm:
Sol:
*/
#include <bits/stdc++.h>
#define ll long long
#define re register
using namespace std;
const int N = 2e5 + 5;
inline ll read(){
int s = 0, w = 1;
char ch = getchar();
while(ch < '0' || ch > '9'){if(ch == '-') ... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | 594d9b8580d28b4588b7d6d4652ce55d | 2,400 | PASSED |
/*
Title:
Code:
Algorithm:
Sol:
*/
#include <bits/stdc++.h>
#define ll long long
#define re register
using namespace std;
const int N = 2e5 + 5;
inline ll read(){
int s = 0, w = 1;
char ch = getchar();
while(ch < '0' || ch > '9'){if(ch == '-') w = -1; ch = getchar();... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | 1ee7431b37e5ee98639e3beddea40e2f | 2,400 | PASSED |
/*
Title:
Code:
Algorithm:
Sol:
*/
#include <bits/stdc++.h>
#define ll long long
#define re register
using namespace std;
const int N = 2e5 + 5;
inline ll read(){
int s = 0, w = 1;
char ch = getchar();
while(ch < '0' || ch > '9'){if(ch == '-') w = -1; ch = getchar();... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | ae2a7502ee497d07000c8359990b14e9 | 2,400 | PASSED |
/*
Title:
Code:
Algorithm:
Sol:
*/
#include <bits/stdc++.h>
#define ll long long
#define re register
using namespace std;
const int N = 2e5 + 5;
inline ll read(){
int s = 0, w = 1;
char ch = getchar();
while(ch < '0' || ch > '9'){if(ch == '-') w = -1; ch = getchar();}
... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | fd21d4b40c20abc1c720e6902fe9681b | 2,400 | PASSED |
// LUOGU_RID: 90316680
/*
Title:
Code:
Algorithm:
Sol:
*/
#include <bits/stdc++.h>
#define ll long long
#define re register
using namespace std;
const int N = 2e5 + 5;
inline ll read(){
int s = 0, w = 1;
char ch = getchar();
while(ch < '0' || ch > '9'){if(ch == '-') w =... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | a6ed345a3478540d445837fc90fae84b | 2,400 | PASSED |
/*
Title:
Code:
Algorithm:
Sol:
*/
#include <bits/stdc++.h>
#define ll long long
#define re register
using namespace std;
const int N = 2e5 + 5;
inline ll read(){
int s = 0, w = 1;
char ch = getchar();
while(ch < '0' || ch > '9'){if(ch == '-') w = -1; ch = getchar();}
... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | 3be367d7c68ba8c426816035a71c0bb0 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
template<typename T>void read(T &x)
{
T f=1;x=0;char s=getchar();
while(s<'0'||s>'9'){if(s=='-')f=-1;s=getchar();}
while(s>='0'&&s<='9') {x=x*10+s-'0';s=getchar();}
x*=f;
}
ll n,m;
ll arr[200005];
struct SegmentTree{
#de... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | 85c9d483e7079c19b687760f6b3381b4 | 2,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n; cin>>n;
vect... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | 8cb5bfb549a3e908551f31edfac535ef | 2,400 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
int main() {
long long zero = 0;
long long kk=1;
//cin >> kk;
for(long long uu=0; uu<kk; uu++){
long long n;
cin >> n;
long long A[n];
for(long long i=0; i<n;i++) cin >> ... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | e83c51fa711d6ba59ee75d70c8ada91d | 2,400 | PASSED |
//Linkwish's code
/*
f[i]发生变化时,如果f[i+1]也会发生变化,
当且仅当
1.当原来f[i+1]=a[i+1]时,现在的f[i]+1<a[i+1]
2.当原来f[i+1]=f[i]+1时,现在的f[i]+1>a[i+1]
我们需要找到一个分割点x
f[x]能被f[i]直接或间接地更新,而f[x+1]不行
这满足单调性
因为如果f[j]能被更新,那么f[j-1]一定能被更新,因为f[j]的更新来自于f[j-1]
所以可以二分求割点,然后一起算答案
现在的问题就是需要在可以接受的复杂度内进行单点询问是否能够更新
设我们当前操作令 a[pos]=val
如果现在min(a[p... | C++ | 8a3b87734e221d3ec613525d35eebfd5 | 926764001e9f0036a7f8a5cb4b8a026c | 2,400 | PASSED |
#include <bits/stdc++.h>
//#include "debug.h"
#include <iostream>
using namespace std;
using ll = long long;
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define all(v) v.begin(),v.end()
#define fori(size) for(int i=0; i < (size); i+= 1)
#define forj(size) for(i... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | 949e5b674948955dc9bc00151485f8da | 1,300 | PASSED |
#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define PI acos(-1)
using namespace std;
int a[200005];
int sum[200005];
signed main() {
for(int i=1;i<=200000;i++) sum[i]=sum[i-1]+i;
int cnt=0;
int t;cin >> t;
while(t--){
int n;cin >> n;
for(int i=1;i<=n;i++)... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | bf8f49a12790accf35fbc4bb7f4fc84d | 1,300 | PASSED |
#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define PI acos(-1)
using namespace std;
int a[200005];
int sum[200005];
signed main() {
for(int i=1;i<=200000;i++) sum[i]=sum[i-1]+i;
int cnt=0;
int t;cin >> t;
while(t--){
int n;cin >> n;
for(int i=1;i<=n;i++)... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | 123200b1a63e2c9ed2a81c96e50ceeea | 1,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
long long arr[1000000];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
long long tastcase,num1,counter = 0,hh = 1;
cin>>tastcase;
for(long long x = 0; x < tastcase; x++)
{
cin>>num1;
for(... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | b47713d39cd5d5bf750c484d5a7fa916 | 1,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
void solve()
{
long long n,id=1,now=0,ans=0;
cin>>n;
vector<int>a(n+2);
a[n+1]=-1e9;
for(int i=1;i<=n;i++) cin>>a[i];
for(int i=1;i<=n;i++)
{
for(int j=id;j<=n+1;j++)
if(a[j]-j<now)
{
ans+=j-i;
id=j,now--;
break;
}
}
cout<<ans<... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | 3002aa4bcbe13bbebc664f72d3578a1c | 1,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
void solve()
{
long long n,id=1,now=0,ans=0;
cin>>n;
vector<int>a(n+2);
a[n+1]=-1e9;
for(int i=1;i<=n;i++) cin>>a[i];
for(int i=1;i<=n;i++)
{
for(int j=id;j<=n+1;j++)
if(a[j]-j<now)
{
ans+=j-i;
id=j,now--;
break;
}
}
cout<<ans<... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | 8172ce39f8812a755a21444926526b09 | 1,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define int long long
int32_t main(){
fastio;
int t; cin>>t;
while(t--){
int n,ans=0; cin>>n;
int a[n];int tyy;
set<int> s;
map<int,int> M;
for(int i=0;i<n;i++) cin>>a[i];
vector<pair<int,int... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | 62387be35d4a252ffb3efefb06d23427 | 1,300 | PASSED |
#include <iostream>
#include <cstring>
using namespace std;
typedef long long ll;
const int N = 200010;
int a[N], n, t;
bool st[N];
void solve()
{
cin >> n;
for(int i = 1;i <= n; i++) cin >> a[i];
ll res = 0;
for(int i = 1,j = 1;i <= n; i++)
{
while(j <= ... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | a0597b047480a327b4f08f530df5567a | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
int a[200005];
signed main() {
int t;
cin >> t;
while (t--) {
int n;cin>>n;
for(int i=1;i<=n;i++)cin>>a[i];
int ans=0;
int l=1,r=1;
while(l<=n){
while(r<=n&&r-l+1<=a[r]){
... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | fd1382e9a7444ed707fcccbc370fd7e0 | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
int a[200005];
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
for (int i = 1; i <= n; i++) cin >> a[i];
int an... | C++ | 4811646a6a68f6b83891bd22985ce7e5 | f43a9946dd2944176d3e27f1a4864aea | 1,300 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define st first
#define nd second
#define rep(i,n) for(int i=0 ; i<n ; i++)
#define pb push_back
#define mp make_pair
using namespace std;
bool is(int n){
for(int i=2; i*i<=n ; i++){
if(n%i==0)return false;
}
retu... | C++ | 7a559fd046e599b16143f40b4e55d127 | e3f8f571b826cb1642fe4ed51f72e2a3 | 1,200 | PASSED |
#include <vector>
#include <iostream>
#include <map>
//#include <bits/stdc++.h>
#define ll long long
using namespace std;
/*
bool sortbysec(const pair<int,pair<int,int>> &a,
const pair<int,pair<int,int>> &b)
{
return (a.second.second < b.second.second);
}
*/
int Gcd (int a,int b)
{
int... | C++ | 7a559fd046e599b16143f40b4e55d127 | 6912ed54980e4685eaa8650121c14ccf | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll a, ll b)
{
if((a%b)==0){
return b;
}else{
return gcd(b, a%b);
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll t, n, i, j, f, g;
... | C++ | 7a559fd046e599b16143f40b4e55d127 | 4dce21cc2bc308a1ed4fb99790363920 | 1,200 | PASSED |
// Copyright: Mayank(nerdmyk)
#include <bits/stdc++.h>
using namespace std;
// #define int long long
#define sqrt(x) sqrtl(x)
#define mod 1000000007
void solve()
{
int n;
cin >> n;
vector<int> a(n + 2);
for (int i = 1; i <= n; i++)
{
cin >> a[i];
}
a[0] = 1;
a[n + 1] = 1;
ve... | C++ | 7a559fd046e599b16143f40b4e55d127 | c8dbaa591c0507f3d07cddfdd76f250b | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define sc(x) scanf("%d",&x)
#define _sc(x) scanf("%lld",&x)
#define pf(x) printf("%d",x);
#define _pf(x) printf("%lld",x);
#define FOR(i,a,b) for(int i = a;i<=b;++i)
#define _FOR(i,a,b) for(int i = a;i<b;++i)
const ll mod = 1e9+7;
const ll... | C++ | 7a559fd046e599b16143f40b4e55d127 | 6166b9cad6ccdbd4a9b7fe16ab75b80e | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define sc(x) scanf("%d",&x)
#define _sc(x) scanf("%lld",&x)
#define pf(x) printf("%d",x);
#define _pf(x) printf("%lld",x);
#define FOR(i,a,b) for(int i = a;i<=b;++i)
#define _FOR(i,a,b) for(int i = a;i<b;++i)
const ll mod = 1e9+7;
const ll... | C++ | 7a559fd046e599b16143f40b4e55d127 | 4a9756648f8481c5ed1b913c6111d470 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vector<int>v,v1;
int a;
for(int i = 0; i < n; i++){
cin>>a;
... | C++ | 7a559fd046e599b16143f40b4e55d127 | 09e27c7bba045a310920461ed5014ea7 | 1,200 | PASSED |
//I just wanted to mention that I'm blind.
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
int a[maxn];
int gcdd(int a, int b) {
for (int i = min(a, b); i >= 1; i--) {
if (a % i == 0 && b % i == 0)
return i;
}
return 0;
}
int main () {
int t;
cin >> ... | C++ | 7a559fd046e599b16143f40b4e55d127 | 7f6df157131b07ffca832ce4915dec7b | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
int a[maxn];
int gcdd(int a, int b) {
for (int i = min(a, b); i >= 1; i--) {
if (a % i == 0 && b % i == 0)
return i;
}
return 0;
}
int main () {
int t;
cin >> t;
while (t--) {
long long n, k... | C++ | 7a559fd046e599b16143f40b4e55d127 | ed1d20fa581888e5a432da1a66872740 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int>PII;
#define xx first
#define yy second
#define pb push_back
const int N = 2e5 + 10;
const ll mod = 998244353;
const double eps = 1e-8;
const int INF = 0x3f3f3f3f;
const ll inf = 0x3f3f3f3f3f3f3f3f;
int a[N],b[N];
... | C++ | 7a559fd046e599b16143f40b4e55d127 | 7f2d73d5e08dc086a755a67dffced854 | 1,200 | PASSED |
// LUOGU_RID: 90677890
#include <bits/stdc++.h>
using namespace std;
const int N=510;
int n,num[N];
int dp[N][N][N],pre[N][N];
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++) scanf("%d",&num[i]);
memset(dp,-0x3f,sizeof(dp));
dp[0][0][0]=0;
int ans=0;
for(int i=1;i<=n;i++){
memset(pre,-0x3f,sizeof(... | C++ | 59a8a939125d4bb0619adff83bc7b493 | 4ef1cd1253307c918a0eda8e4be4943d | 2,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N=510;
int n,num[N];
int dp[N][N][N],pre[N][N];
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++) scanf("%d",&num[i]);
memset(dp,-0x3f,sizeof(dp));
dp[0][0][0]=0;
int ans=0;
for(int i=1;i<=n;i++){
memset(pre,-0x3f,sizeof(pre));
for(int j=0;j... | C++ | 59a8a939125d4bb0619adff83bc7b493 | e97f688b8cda6b02e471a6515ee669c8 | 2,600 | PASSED |
// LUOGU_RID: 90273330
#include <bits/stdc++.h>
#define rep(i,l,r) for (int i = l; i <= r; i++)
#define per(i,r,l) for (int i = r; i >= l; i--)
#define fi first
#define se second
#define prt std::cout
#define gin std::cin
#define edl std::endl
namespace wxy{
const int N = 505;
int n,a[N],f[N][N][N],g[... | C++ | 59a8a939125d4bb0619adff83bc7b493 | 60b4b8b0d113a4564e815fb366c76ac8 | 2,600 | PASSED |
#include <bits/stdc++.h>
#define rep(i,l,r) for (int i = l; i <= r; i++)
#define per(i,r,l) for (int i = r; i >= l; i--)
#define fi first
#define se second
#define prt std::cout
#define gin std::cin
#define edl std::endl
namespace wxy{
const int N = 505;
int n,a[N],f[N][N][N],g[N][N][N];
inline voi... | C++ | 59a8a939125d4bb0619adff83bc7b493 | 2b936253f6c36b584919d6af0b46ee84 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int MAXN=510;
int dp[2][MAXN][MAXN],max_pre[2][MAXN][MAXN],a[MAXN],n;
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
int opt=1;
for(int j=0;j<=n;j++)
for(int k=0;k<=n;k++)
{
dp[0][j... | C++ | 59a8a939125d4bb0619adff83bc7b493 | 2dc375ac51c9ed3536b8c65cec2d0f71 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int MAXN=510;
int dp[2][MAXN][MAXN],max_pre[2][MAXN][MAXN],a[MAXN],n;
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
int opt=1;
for(int j=0;j<=n;j++)
for(int k=0;k<=n;k++)
{
dp[0][j... | C++ | 59a8a939125d4bb0619adff83bc7b493 | 1857698e5d238649fe37c5ce83a89a11 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int MAXN=510;
int dp[2][MAXN][MAXN],max_pre[2][MAXN][MAXN],a[MAXN],n;
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
int opt=1;
for(int j=0;j<=n;j++)
for(int k=0;k<=n;k++)
{
dp[0][j... | C++ | 59a8a939125d4bb0619adff83bc7b493 | a42f778962576e371b2cf82799f585f7 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define MAXN 500
long long dp[MAXN + 5][MAXN + 5][MAXN + 5];
long long mmax[MAXN + 5][MAXN + 5];
int n;
long long a[MAXN + 5];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> n;
for (int i = 1; i... | C++ | 59a8a939125d4bb0619adff83bc7b493 | 0303c72ab172f84485d631e148f0a829 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define MAXN 500
long long dp[MAXN + 5][MAXN + 5][MAXN + 5];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
long long a[n + 10];
for (int i = 1; i <= n; i++) cin >> a[i];
l... | C++ | 59a8a939125d4bb0619adff83bc7b493 | 1b32cf61985c6eb8e30ae03c7627ea92 | 2,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn=505;
int n,a[maxn],f[2][maxn][maxn],mx[maxn][maxn];
inline void chkmax(int &a,int b) { a=(a>b)?a:b; }
int main()
{
// freopen("data.in","r",stdin);
// freopen("czx.out","w",stdout);
int i,j,k,p,r,l,now,lst,ans;
scanf("%d",&n);
for(i=1;i<=n;i++) ... | C++ | 59a8a939125d4bb0619adff83bc7b493 | e7fa6edd0bdd634b297ebe593cb3a7f6 | 2,600 | PASSED |
#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define ve vector
#define endl '\n'
#define all(x) x.begin(),x.end()
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
mt19937 gen(chrono::steady_clock::now().time_since_epoch().count());... | C++ | c313a305cc229ec23b19c6e4dd46b57b | b90ea75bbdd884bcc261d7da4fb4ae16 | 2,200 | PASSED |
#include "bits/stdc++.h"
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_strin... | C++ | c313a305cc229ec23b19c6e4dd46b57b | 408a014c32ec66408b26eeb930696ecc | 2,200 | PASSED |
#include <bits/stdc++.h>
#include<iostream>
#include<string.h>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using namespace std::chrono;
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt... | C++ | c313a305cc229ec23b19c6e4dd46b57b | 553d4ec4cd60cd81e1bb34284fc93a05 | 2,200 | PASSED |
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define pll pair<ll, l... | C++ | c313a305cc229ec23b19c6e4dd46b57b | e4e85b6f7764371af2a10fc44a395d3e | 2,200 | PASSED |
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
//const int mod = 1000000007;
//using mint = modint998244353;
//const int mod = 998244353;
//const int INF = 1e9;
//const long long LINF = 1e18;
#define rep(i, n) for (int i = 0; ... | C++ | c313a305cc229ec23b19c6e4dd46b57b | 16786cd8eb283d5041e4c48a76dfe9ff | 2,200 | PASSED |
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
//const int mod = 1000000007;
//using mint = modint998244353;
//const int mod = 998244353;
//const int INF = 1e9;
//const long long LINF = 1e18;
#define rep(i, n) for (int i = 0; ... | C++ | c313a305cc229ec23b19c6e4dd46b57b | a343846c81014a45d8acf46f6ac99fcd | 2,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define Max 5000005
#define endl '\n'
#define PL pair<int,int>
void solve() {
ll n, len = 0;
cin >> n;
string s;
cin >> s;
for (int i = 0; i < n * 2; i++) {
if (s[i] == '1') {
len++;
}
}
if (len & 1) {... | C++ | c313a305cc229ec23b19c6e4dd46b57b | 4be56448f0ae493f95f53afece767df2 | 2,200 | PASSED |
/* Includes */
#include <bits/stdc++.h>
/* Using libraries */
using namespace std;
/* Defines */
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ld double
#define pb push_back
#define vc vector
#define sz(a) (int)a.size()
#define forn(i, n) for (int i = 0; i < n; ++i)
#de... | C++ | c313a305cc229ec23b19c6e4dd46b57b | 82d45d1c908dae09c0da9f2e44a9567e | 2,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> pii;
#define x first
#define y second
void solve()
{
int n;
cin>>n;
string s;
cin>>s;
string st=s;
int cnt=0;
for(auto c:s)
if(c=='1')
cnt++;
if(cnt&1)
return puts("-1"),void();
string left;
... | C++ | c313a305cc229ec23b19c6e4dd46b57b | 0f6076fb32d4cdd1f99740c27a707184 | 2,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long
#define F first
#define S second
#define endl '\n'
int const M = 1e6 + 10 , N = 1e6 , mod = 998244353 , lg = 29;
ll T , n;
char s[M];
string str;
main() {
ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.ti... | C++ | c313a305cc229ec23b19c6e4dd46b57b | f97d7ca597efaec2601846715bd8671c | 2,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define all(a) begin(a), end(a)
#define len(a) int((a).size())
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...)
#endif // LOCAL
template<typename Fun>
struct y_combinator {
const Fun fun;
... | C++ | 1ffe78370058a72ed0bdffeafe877183 | f365b316f8aeb34f72c70a2ecefd8d2c | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define all(a) begin(a), end(a)
#define len(a) int((a).size())
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...)
#endif // LOCAL
template<typename Fun>
struct y_combinator {
const Fun fun;
... | C++ | 1ffe78370058a72ed0bdffeafe877183 | ae346913754de7e368f8c7c62181185f | 3,400 | PASSED |
#include <bits/stdc++.h>
namespace IO {
std::ostream& fmtbase(std::ostream& out, const char* format) {
for (; *format; format++) {
if (*format == '{' && *(format + 1) == '}') {
throw std::invalid_argument("Error Number of Parameters!");
}
out << *format;
}
return out;
}
te... | C++ | 1ffe78370058a72ed0bdffeafe877183 | a8a441bf81c4c80e751fbe3f340d6edc | 3,400 | PASSED |
#include <bits/stdc++.h>
namespace IO {
std::ostream& fmtbase(std::ostream& out, const char* format) {
for (; *format; format++) {
if (*format == '{' && *(format + 1) == '}') {
throw std::invalid_argument("Error Number of Parameters!");
}
out << *format;
}
return out;
}
te... | C++ | 1ffe78370058a72ed0bdffeafe877183 | 9db2e581077d14cfd3c3bda2da6b6698 | 3,400 | PASSED |
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/hash_policy.hpp>
// #include <ext/pb_ds/priority_queue.hpp>
using namespace std;
// using namespace __gnu_pbds;
#define fi first
#define se second
#define fill0(a) memset(a, 0, sizeof(a))
#define fill1(a) memset(a, -1, ... | C++ | 1ffe78370058a72ed0bdffeafe877183 | 90d96f0856ebb324030c73f069240a79 | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#pragma region y_combinator
#ifndef Y_COMBINATOR_HPP
#define Y_COMBINATOR_HPP
template<class Fun>
class y_combinator_result {
Fun fun_;
public:
template<class T>
explicit y_combinator_result(T &&fun) : fun_(std::forward<T>(fun)) {}
template<class ...A... | C++ | 1ffe78370058a72ed0bdffeafe877183 | 95db3645773fad55928d5ed805886f53 | 3,400 | PASSED |
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#pragma region y_combinator
#ifndef Y_COMBINATOR_HPP
#define Y_COMBINATOR_HPP
template<class Fun>
class y_combinator_r... | C++ | 1ffe78370058a72ed0bdffeafe877183 | e6e31de800ea892a1ec858c3b56a1d4a | 3,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
struct node{
int son[26],fa,col,len,fail;
}p[1000011];
int n,len[1000011],t[1000011],g[1000011],lowbit[1000011],sz[1000011],dfn[1000011],cnt,sum,idx[1000011],f[1000011],st[1000011],ans,father[1000011][21],ss[1000011],mxlen[1000011];
bool fl[1000011];
vector<int> vec[... | C++ | 1ffe78370058a72ed0bdffeafe877183 | 81e6598c7037ae84f3c34274a1043c26 | 3,400 | PASSED |
// ~Be name khoda~ //
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fi first
#define se second
#define cl clear
#define endll '\n'
const int maxn = 1e6 + 10;
const int m... | C++ | 1ffe78370058a72ed0bdffeafe877183 | f786b4a7b090ff137575ffc254e768c1 | 3,400 | PASSED |
// ~Be name khoda~ //
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fi first
#define se second
#define cl clear
#define endll '\n'
const int maxn = 1e6 + 10;
const int m... | C++ | 1ffe78370058a72ed0bdffeafe877183 | 670d482faab7877edd305eaea301e623 | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
template <class T> bool umin(T &x,T y) {return y<x? x=y,1: 0;}
template <class T> bool umax(T &x,T y) {return y>x? x=y,1: 0;}
template <class T> void read(T &x){x=0; char c=getchar(); int f=0;while (c<'0'||c>'9') f|=(c=='-'),c=getchar();while (c>='0'&&c<='9') x=(x<<3)+(... | C++ | c061a1c1cde6d352218dfd655627f257 | 2d4a5b85c440f6ccbbd2434210fc90d7 | 3,200 | PASSED |
/*************************************************************************
> File Name: D.cpp
> Author: The-Out-Land
> Mail: 2264454706@qq.com
> Created Time: 2021年03月23日 星期二 12时02分22秒
************************************************************************/
#include <bits/stdc++.h>
#define enter putch... | C++ | c061a1c1cde6d352218dfd655627f257 | ca7cc863af8c06cefe4ec387ccf96bb2 | 3,200 | PASSED |
#include<bits/stdc++.h>
#define fi first
#define se second
using namespace std;
typedef long long ll;
#define int long long
const int N = 1000;
ll ans[N][N];
ll cur = 1;
ll want = -1;
ll total = 0 , id;
bool debug = 1;
void init(){
want = -1;
total = 1;
id =0 ;
}
int ask(ll M){
i... | C++ | c061a1c1cde6d352218dfd655627f257 | aa90c4699737147c39d9a36a4896df87 | 3,200 | PASSED |
#include<bits/stdc++.h>
#define Misaka namespace
#define Mikoto std
#define ll long long
using Misaka Mikoto;
ll p;
bool ask(ll x)
{
cout<<"? "<<x<<endl;
fflush(stdout);
string t;
cin>>t;
fflush(stdout);
if(t=="Lucky!")
return p+=x,0;
if(t=="Fraudster!")
return p-=x,1;
return 0;
}
int mai... | C++ | c061a1c1cde6d352218dfd655627f257 | 257d3feda0607a5b7f6e4c9c854e1811 | 3,200 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define db long double
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
using namespace std;
const int N = 107;
db dp[N][20*N];
db mv[N][20*N];
const int REPEAT = 2;
const int ADD = 2*REPEAT;
... | C++ | c061a1c1cde6d352218dfd655627f257 | 46c16daf0613e2fa4d7bc7a18db465b2 | 3,200 | PASSED |
/*
* 开 long long,开 long long,开 long long!
* 取模必须开 long long!
* 运算元素超过 1e8 就要慎重,超过 1e9 就不要赌了!
* 检查题目有没有要求输出 YES, NO 及大小写,输出方案前要不要输出步数。
* 检查空间有没有超,不要深搜 10!。
*/
#include <bits/stdc++.h>
using namespace std;
template<typename T> inline void ckmax(T &x, T y) { x = x > y ? x : y; }
template<typename T> i... | C++ | c061a1c1cde6d352218dfd655627f257 | 59b7913650798853a5470b2c7ec8b4bf | 3,200 | PASSED |
#include <bits/stdc++.h>
typedef long long ll;
const ll INF = (ll)(1E14);
ll S, K; int cnt; char result[20];
bool query(ll x) {
if( x < 0 || x > INF ) puts("WA 3"), exit(0);
cnt++; if( cnt > 105 ) puts("WA 1"), exit(0);
printf("? %lld\n", x), fflush(stdout);
scanf("%s", result);
if( result[0] ... | C++ | c061a1c1cde6d352218dfd655627f257 | e848210db6233d52d930e721e4696e49 | 3,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define mt make_tuple
#define rep(i,begin,end) for (__typeof(begin) i=(begin),_end=(end),_step=1-2*((begin)>(end));i!=_end;i+=_step)
// OUTPUT
template<class a, class b>
ostream& operator << (ostream& os, const pair<a,b>& p) {
os<<"("<<p... | C++ | c061a1c1cde6d352218dfd655627f257 | 104a94a70b898e0095ec526c18ea6fdf | 3,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
string s;
bool ask(long long x){
cout<<"? "<<x<<"\n";
fflush(stdout);
cin>>s;
return s[0]=='L';
}
void solve(){
long long l=0,r=1e14+1,mid,sum=1;
while(l+1<r){
mid=l+0.5*(r-l)*sum/(sum+r)+1;
mid=max(min(mid,sum),l);
if(ask(mid))l=mid,sum+=mid;
el... | C++ | c061a1c1cde6d352218dfd655627f257 | 36ca2e3e04b1adc461028183b1c8425d | 3,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
string s;
bool ask(long long x){
cout<<"? "<<x<<"\n";
fflush(stdout);
cin>>s;
return s[0]=='L';
}
void solve(){
long long l=0,r=1e14+1,mid,sum=1;
while(l+1<r){
mid=l+0.5*(r-l)*sum/(sum+r)+1;
mid=max(min(mid,sum),l);
if(ask(mid))l=mid,sum+=mid;
el... | C++ | c061a1c1cde6d352218dfd655627f257 | c1756337a520becdb69e8b63c2624e5b | 3,200 | PASSED |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <cmath>
#include<set>
using namespace std;
typedef long long ll;
const int N=1e5+10;
int a[N];
int main(){
//ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int t;
scanf("%d",&t);
while(t--){
... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 0939d13b4cb6ee0302965ffcad5ffc2a | 1,100 | PASSED |
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<map>
#include<set>
#include<queue>
#define D double
#define ll long long
#define SP system("pause");
#define P puts("");
using namespace std;
int a[100005];
set<int>se;
int main()
{
int t;
cin>>t;
while(t--)
{
mem... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 1158288e0a4f6b5db9c985cd66758e38 | 1,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define bf ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pb push_back
#define pp pop_back
#define pi 2*acos(0.0)
#define pr 10
#define mxx 100000 // 10^... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 8a201767602b519587485bd12b14686d | 1,100 | PASSED |
#include"bits/stdc++.h"
using namespace std;
vector<int> vec;
set<int> st;
int main(){
int t;
cin>>t;
int n,d,k;
while(t--){
vec.clear();
st.clear();
cin>>n>>k;
bool flag=false;
for(int i=0;i<n;i++){
cin>>d;
vec.push_back(d);
st.insert(d);
}
sort(vec.begin(),vec.end());
int t;
for(int i=0... | C++ | c0d23fe28ebddbfc960674e3b10122ad | edb7d547d74a6fbc486cab512814bf4f | 1,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;signed main(){int t;cin>>t;while(t--){map<int,int>m;int f=0,X=0,n,k;cin>>n>>k;while(n--){int a;cin>>a;m[a]++;}while(k--){
int M=prev(m.end())->first;
while(m[X])X++;
m.erase(X);
m[((X+M)>>1)+((X+M)&1)]++;
if(((X+M)>>1)+((X+M)&1)>X)break;
if(X>M){f=1;
m[X]++;
break;}
}cout<... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 0be54e8ae9e2843515ba36ab3dfeae11 | 1,100 | PASSED |
#include<unordered_set>
#include<iostream>
#include<cmath>
using namespace std;
const int N = 1e4+10;
int findx(int res,unordered_set<int> &us){
int i = res;
while(1){
if(us.count(i)==0){
return i;
}
else{
i++;... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 8babe642e61b57f349e1f3af98d1cce7 | 1,100 | PASSED |
#include <iostream>
#include <set>
using namespace std;
set<int> x;
int main()
{
int t;
cin>>t;
while(t--)
{
int max1=0;
int y=0;
int n,m;
cin>>n>>m;
for(int i=0;i<n;i++)
{
int q;
cin>>q;
max1=max(q,max1);
x.insert(q);
}
int mex;
for(int i=0;i<m;i++)
{
for(int i=0;;i++)
{
... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 93f432d7154a3a7efe247959b41dc7b0 | 1,100 | PASSED |
#include<iostream>
#include<set>
#include<math.h>
#include<vector>
#include<algorithm>
using namespace std;
#define int long long
signed main()
{
int t, n, k, x, max, mex;
cin >> t;
while (t--)
{
cin >> n >> k;
vector<int>v;
set<int>s;
for (int i = 0; i < n; i++)
{
cin >> x;
v.push_back(x);
s.... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 77324031332a72a69199342588c0fbf3 | 1,100 | PASSED |
#include <bits/stdc++.h>
using namespace std ;
int main(void) {
ios::sync_with_stdio(false) ; cin.tie(0) ;
int t ;
cin >> t ;
while (t--) {
long long n , k ;
cin >> n >> k ;
long long less_n = 0 , missing = n , distinct , mx = LONG_LONG_MIN ;
vector<long long> ar(n) ;
set<long long> s ;
... | C++ | c0d23fe28ebddbfc960674e3b10122ad | ebeeaaca47b29aee594b88863ff5d7a6 | 1,100 | PASSED |
#include<iostream>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#define LL long long
#define pb push_back
using namespace std;
int t;
set<int>st;
int main()
{
scanf("%d", &t);
while(t--)
{
int n, k, x;
int mx=0, mex, y;
scanf("%d%d", &n, &k);
for(int i=0; i<n; i++)
{
scanf("%d",... | C++ | c0d23fe28ebddbfc960674e3b10122ad | 27c1aadfadeace28b3636c66682d6f83 | 1,100 | PASSED |
#include<bits/stdc++.h>
#define ll long long
using namespace std;
//const ll M=1e30;
//int Gcd (int a,int b)
//{
// if(!b)
// return a;
// return Gcd(b,a%b);
//}
//
//int lcm (int a,int b)
//{
// return (a*b)/Gcd(a,b);
//}
//
//ll power(ll a, ll b ,ll m)
//{
// if(!b)
// return 1;
// ll ... | C++ | 6fbf41dc32d1c28351d78a9ec5fc0026 | 0b72dfb46a32282a27955ffca4c692e2 | 900 | PASSED |
/*
,\/~~~\_ _/~~~~\
| ---, `\_ ___,-------~~\__ /~' ,,'' |
| `~`, ',,\`-~~--_____ --- - /, ,--/ '/'
`\_|\ _\` ______,---~~~\ ,_ '\_/' /'
\,_| , '~,/'~ /~\ ,_ `\_\ \_ \_\'
,/ /' ,... | C++ | 6fbf41dc32d1c28351d78a9ec5fc0026 | a47e601545915f7e84a0897c004601ab | 900 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.