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;
#include <iostream>
#include <cstring>
#include <algorithm>
#include<stdio.h>
#define endl '\n'
#include <vector>
#define int long long
using namespace std;
struct node
{
int x, i;
};
node pi[2000010];
int ai[2000010];
bool cmp(node a, node b)
{
return a.... | C++ | 66daa3864875e48d32a7acd23bd7a829 | e7e735a12ed1ffe1b1dfb1e04fa460a6 | 1,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=2e5+20;
int x[N];
int n,k;
int ans;
int cnt;
bool vis[N];
struct node
{
int val,pos;
}a[N];
bool cmp(node x,node y)
{
return x.val>y.val;
}
signed main()
{
int T;
cin>>T;
while(T--)
{
cin>>n>>k;
ans=0;
... | C++ | 66daa3864875e48d32a7acd23bd7a829 | 5f108ddc9ba2e31fdbbbb46880c499fc | 1,700 | PASSED |
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
int T,n,k,a[1000005];
bool cmp(const int x,const int y)
{
return x>y;
}
int main()
{
scanf("%d",&T);
while(T--)
{
scanf("%d%d",&n,&k);
ll sum=0;
for(int i=1;i<=n;i++)
{
scanf("%d",&a[i]);
sum+=a[i];
}
... | C++ | 66daa3864875e48d32a7acd23bd7a829 | 2f7e3e16591415321276a7cc5383c57b | 1,700 | PASSED |
#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll n,m,ans,j,b[200005],t;
bool f[200005]= {false};
struct no {
ll x,id;
} a[200005];
bool cmp(no z,no b) {
return z.x>b.x;
}
void init(){
ans=0;
j=0;
for(register int i=1;i<=n;i++)
f[i]=false;
}
int main() {
cin>>t;
... | C++ | 66daa3864875e48d32a7acd23bd7a829 | 95b76a68ba118f72d12f3f3ccd787b63 | 1,700 | PASSED |
#include<bits/stdc++.h>
#define int long long
using namespace std;
inline int read(){int f=1,x=0;char ch=getchar();while (ch<'0'||ch>'9'){if (ch=='-') f=-1; ch=getchar();}while (ch>='0'&&ch<='9') {x=x*10+ch-'0';ch=getchar();}return x*f;}
inline void write(int x){if (x<0){putchar('-');x=-x;}if(x>9) write(x/10);putch... | C++ | 66daa3864875e48d32a7acd23bd7a829 | 95bf07af0ab172f822bb5c86d4697917 | 1,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int t,n,k;
long long a[200005],ans;
int main()
{
scanf("%d",&t);
while(t--)
{
ans=0;
scanf("%d%d",&n,&k);
for(int i=1;i<=n;i++) scanf("%lld",&a[i]),ans+=a[i],a[i]=a[i]-(n-i);
sort(a+1,a+n+1,greater<long long>());
for(int i=1;i<=k;i++) ans-=a[i];
... | C++ | 66daa3864875e48d32a7acd23bd7a829 | a22ca4d05d7f5ff01660ea821b777305 | 1,700 | PASSED |
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
const int N=200000+5;
long long n,k,a[N],f[N];
struct S{
int b,id;
}x[N];
bool cmp(const S &x,const S &y){
return x.b>y.b;
}
int main(){
int t;
cin>>t;
while(t--){
memset(f,0,sizeof(f));
cin>>n>>k;
for(int i=... | C++ | 66daa3864875e48d32a7acd23bd7a829 | a1dde54314818fc8ce2657b24d15121b | 1,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=1e7;
void solve(){
int n,k;
cin>>n>>k;
vector<int> a(n);
int sum=0;
for(int i=0;i<n;i++){
cin>>a[i];sum+=a[i];
a[i]-=n;
a[i]+=i;
a[i]++;
}
sort(a.rbegin(),a.rend());
for(int i=0;i<k;i++)sum-=a[i];
cout<<sum-... | C++ | 66daa3864875e48d32a7acd23bd7a829 | 17050818ce2f3a455b70743347b4a6ba | 1,700 | PASSED |
// LUOGU_RID: 95358972
#include<iostream>
using namespace std;
long long a,b,c,n,m,x,y,z;
int main(){
cin>>n;
while(n--){
scanf("%lld%lld%lld",&a,&b,&c);
printf("%lld %lld% lld\n",a+b+c,b+c,c);
}
return 0;
} | C++ | f0c22161cb5a9bc17320ccd05517f867 | 07640f9ba54c20f9afeff36cb4574754 | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main(){
int q,a,b,c;
scanf("%d",&q);
while(q--){
scanf("%d%d%d",&a,&b,&c);
printf("%d %d %d\n",a+b+c,b+c,c);
}
return 0;
} | C++ | f0c22161cb5a9bc17320ccd05517f867 | a2cd363089b73cdaa07192364587fcdb | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
long long t,a,b,c;
int main()
{
scanf("%lld",&t);
while(t--)
{
scanf("%lld %lld %lld",&a,&b,&c);
long long x=a+b+c,y=b+c,z=c;
printf("%lld %lld %lld\n",x,y,z);
}
return 0;
} | C++ | f0c22161cb5a9bc17320ccd05517f867 | ef35ace1bcb7ec453aa473b6fcb8f82e | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int n,a,b,c;
int main(){
cin>>n;
while(n--){
cin>>a>>b>>c;
cout<<a+b+c<<" "<<b+c<<" "<<c<<endl;
}
return 0;
}
| C++ | f0c22161cb5a9bc17320ccd05517f867 | 53f59edb6ad0f0fb033c7f174774658b | 800 | PASSED |
#include <cstdio>
#include<iostream>
using namespace std;
#define ll long long
int t;
ll a,b,c;
int main() {
scanf("%d",&t);
while(t--) {
cin>>a>>b>>c;
cout<<a+b+c<<" "<<b+c<<" "<<c<<endl;
}
return 0;
} | C++ | f0c22161cb5a9bc17320ccd05517f867 | 705f8ef61c2abc57bebf3d4bb6cdbca8 | 800 | PASSED |
#include<bits/stdc++.h>
#define Withers using
#define AK namespace
#define IOI std;
Withers AK IOI;
typedef long long ll;
typedef pair<int,int> pii;
bool k=0;
#define infll 0x3f3f3f3f3f3f3f3f
#define inf 0x3f3f3f3f
int main()
{
int t;
cin>>t;
while(t--)
{
long long a,b,c;
scanf("%lld%lld%lld",&... | C++ | f0c22161cb5a9bc17320ccd05517f867 | 9b479a8081ff23ebffdfb4c4c480a741 | 800 | PASSED |
#include<iostream>
#include<cstdio>
#define ll long long
using namespace std;
/*inline ll qread()
{
ll x=0;char ch=getchar();
while(ch<'0'||ch>'9')ch=getchar();
while(ch>='0'&&ch<='9')x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
return x;
}*/
int main()
{
ll T,a,b,c;
scanf("%lld",&T);
while(T--)
{
/... | C++ | f0c22161cb5a9bc17320ccd05517f867 | 44031308834a70260af6cf378af4616b | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int t;
long long a,b,c;
int main()
{
cin>>t;
while(t--)
{
cin>>a>>b>>c;
cout<<a+b+c<<" "<<b+c<<" "<<c<<endl;
}
} | C++ | f0c22161cb5a9bc17320ccd05517f867 | 66fd39570c38302197a42a9767ae370d | 800 | PASSED |
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n, m, i, j, k;
int a, b, c, x, y, z;
signed main()
{
int T;
cin >> T;
while (T--)
{
cin >> a >> b >> c;
if (a > b) swap(a, b);//ๆไธชๅบ
if (b > c) swap(b, c);
if (a > c) swap(a, c);
z = c;//ไธ้ข็ๆนๆณ็ฎxyz
y = c + b;
x = y +... | C++ | f0c22161cb5a9bc17320ccd05517f867 | 3d91e8d2f2080b07c47c465f4c09849a | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,a,b,c;
int main()
{
cin >> n;
while (n--)
{
cin >> a >> b >> c;
cout << (a+b+c) << ' ' << (b+c) << ' ' << c << endl;
}
return 0;
} | C++ | f0c22161cb5a9bc17320ccd05517f867 | 6590ed998a1c8aac57bc00b46749a309 | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
long long int arr[600001];
int main()
{
long long int t,i,j,k,l,n,tp;
cin>>t;
while(t--){
string ss;
cin>>ss;
vector<long long int> vpvp;
for(i=0;i<ss.length();i++){
vpvp.push_back(ss[i]-'0');
}
sort(vpv... | C++ | adf024899fb2a684427463733358566a | a2e47262b40cfeb741780a204eef8737 | 800 | PASSED |
/*
Author: Abhinav Kashyap
Portfolio: https://abhinavkashyap061.github.io
*/
#include <iostream>
#include <vector>
#define ll long long
#define int_max 2147483647
#define int_min -2147483648
using namespace std;
int main(){
int test_cases;
cin>>test_cases;
while(test_cases--){
// ... | C++ | adf024899fb2a684427463733358566a | 3217fe135ff2f98033870dd572e81b4a | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
int smallest = 10;
cin >> n;
if (n<100) {
cout << n%10 << endl;
}
else {
int next;
while (n>10) {
next = n % 10;
if (next < smallest) {
smallest =... | C++ | adf024899fb2a684427463733358566a | 26a6e6dc85a623a4e60befd77dc4bdd1 | 800 | PASSED |
/* ShAiDSk */
/*----------------------------------------------------------------------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/*----------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------... | C++ | adf024899fb2a684427463733358566a | 862018e1d307355cd7181a40133170c1 | 800 | PASSED |
/* ShAiDSk */
/*----------------------------------------------------------------------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/*----------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------... | C++ | adf024899fb2a684427463733358566a | c2c3bfecbf1cec17b1bf704a4feffc66 | 800 | PASSED |
/* ShAiDSk */
/*----------------------------------------------------------------------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/*----------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------... | C++ | adf024899fb2a684427463733358566a | a6952bdfec2508f9b40d1595ddab846c | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std ;
long long int dp[ 10001 ], n, mn = 1e9, j, t ;
string s ;
int main()
{
cin >> t ;
for( int k = 1 ; k <= t ; k ++ )
{
cin >> s ;
for( int i = 0 ; i < s.size() ; i ++ )
{
if( s[ i ] - 48 < mn )
{
... | C++ | adf024899fb2a684427463733358566a | 3a9d65a99615e53dfd1bee3c8c37f1ef | 800 | PASSED |
//////////////////////////////////////////////////////////////////////////////////////////////
#include <bits/stdc++.h> //
using namespace std; //
//////////////////////////////////////////////////////////////////////////////////////////////
typedef long long ll; //
typedef long double ld; //
typedef vect... | C++ | adf024899fb2a684427463733358566a | e817e9729dadd241a87dfcb1823cd3a2 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define TestCases int _test {1} ; cin >> _test ; while(_test--)
#define FAST ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define all(x) (x).begin() , (x).end()
#define nl "\n"
void solve()
{
string s; cin >> s;
... | C++ | adf024899fb2a684427463733358566a | 267c47fa8275c04c97807cc88cfc825e | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define TestCases int _test {1} ; cin >> _test ; while(_test--)
#define FAST ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define all(x) (x).begin() , (x).end()
#define nl "\n"
void solve()
{
string s; cin >> s;
... | C++ | adf024899fb2a684427463733358566a | 0c71807644202ca03506c0df3bbcdc34 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main(){
int casos,n,m;
cin >> casos;
for(int i=0;i<casos;i++){
cin >> n >> m;
vector< vector<int> > mat( n , vector<int>(m) );
for (int i=0;i<n;i++){
for (int j=0;j<m;j++){
cin>>mat[i][j];
... | C++ | cfe752f8ff049e535309c234da60472d | ffde60678cc681f2acf456ca2516a36c | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main(){
int w;
cin >> w;
vector<vector<int>> r;
int a=0;
for (int i=0; i<w; i++){
int n;
cin >> n;
int m;
cin >> m;
int matriz[n][m];
vector<vector<int>> vec;
int p=0;
for(int i=0; i<n; i++){ //ingresar la matriz
... | C++ | cfe752f8ff049e535309c234da60472d | 99fa38f2e38388c2637fc1cb20b579be | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >>t;
while (t--){
int n;
int m;
cin >> n >> m;
vector<vector<int>> matriz;
vector<int> casos;
bool cagada = false;
int malo10=0;
for (int i = 0; i<n; i++){
vect... | C++ | cfe752f8ff049e535309c234da60472d | d6ccb29879f1c81d72ff40719504755b | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t; cin >> t;
while(t>0){
int n; cin>> n; // n filas
int m; cin>> m; // m columnas
int uwu;
vector<vector<int>> filas(n);
for (int i = 0... | C++ | cfe752f8ff049e535309c234da60472d | bddbfdcc45ee0ccd05617caeca00ac6f | 1,400 | PASSED |
#include <bits/stdc++.h>
bool check_matrix(std::vector<std::vector<int>> matrix, int rows, int cols) {
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols - 1; j++) {
if (matrix[i][j] > matrix[i][j+1]) {
return false;
}
}
}
return true;
}
int... | C++ | cfe752f8ff049e535309c234da60472d | 7d620ab732e15750c28710b7c458ba65 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
pair<int,int> check_row(vector<int> row, int m) {
vector<int> ordered_row = row;
sort(ordered_row.begin(), ordered_row.end());
if (ordered_row == row) {
return {0,0};
} else {
int cnt=0;
pair<int,int> cols;
for (int i=0; i<m; i++) {
if (row[i]... | C++ | cfe752f8ff049e535309c234da60472d | a93ea1e7d4b28071e398018d83410a3a | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
/*Buscar posiciones malas, si hay alguna mala instantaneamente intercambiar, pues si no se puede con un cambio,
no se podrรก nunca.
Buscar 2 posiciones erroneas e intercambiarlas, si aun asi no es correcto, no se puede.
Tomar la grilla y ordenando por filas, luego compar... | C++ | cfe752f8ff049e535309c234da60472d | 7fe8b8a118fbaea4479fad590a068bc1 | 1,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define pii pair<int, int>
#define rep(i,a,n,k) for(int i=a;i<=n;i+=k)
#define per(i,a,n,k) for(int i=a;i>=n;i-=k)
const int N = 2e5+10;
int n, m;
int a[N];
void solve()
{
cin>>n>>m;
vector<vector<int>> a(n,vector<int>(m));
rep(i,0,n... | C++ | cfe752f8ff049e535309c234da60472d | 69b5435d99a1da443f4dc299b661a854 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
vector<int> ordena(vector<int> fila, vector<int> filaOrd) {
vector<int> vec;
for (int i = 0; i < fila.size(); i++) {
if (fila[i] != filaOrd[i]) {
vec.push_back(i);
}
}
if (vec.size() != 2) {
vec = {0,0};
return ... | C++ | cfe752f8ff049e535309c234da60472d | 4a1eb8e48cc277e5a58a92dac08cf6b1 | 1,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main(){
int casos_prueba = 0;
cin >> casos_prueba;
cout << "\n";
for (int i = 0; i < casos_prueba; i++){
//cantidad de filas
int n = 0;
cin >> n;
//cantidad de columnas
int m = 0;
cin >> m;
vector<vec... | C++ | cfe752f8ff049e535309c234da60472d | 6139877a5ab5ca143050b36a3751f1f3 | 1,400 | PASSED |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define int ll
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(), (a).end()
#define X first
#define Y second
typedef tree<int, n... | C++ | 7e678f141f411d3872f25559e2c1f17c | 492bd4b4cdf64467c3ab19db7b84f59d | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
// #define double long double
#define forn(i, n) for (int i = 0; i < n; ++i)
#define for1(i, n) for (int i = 1; i <= n; ++i)
int n, k;
int a[100005];
void solve() {
cin >> n >> k;
int kk = k;
map<int, ... | C++ | 7e678f141f411d3872f25559e2c1f17c | d14fced7e36d195f07a47670044e5041 | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
// #define double long double
#define forn(i, n) for (int i = 0; i < n; ++i)
#define for1(i, n) for (int i = 1; i <= n; ++i)
int n, k;
int a[100005];
void solve() {
cin >> n >> k;
int kk = k;
map<int, ... | C++ | 7e678f141f411d3872f25559e2c1f17c | e5abfd24156480cd6b56f874378aced3 | 2,100 | PASSED |
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
using namespace std;
const int N = 1e5;
int a[N];
struct custom_hash {
static uint64_t splitmix64(uint64_t x) {
x += 0x9e3779b97f4a7c15;
x = (x ^ (x >> 30)) * 0xbf58476d1... | C++ | 7e678f141f411d3872f25559e2c1f17c | 115cf9665e111097ca1b0bda1fcc912e | 2,100 | PASSED |
#include <bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef long long int ll;
typedef long double ld;
typedef unsigned long long ull;
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout... | C++ | 7e678f141f411d3872f25559e2c1f17c | c8c4a1d9d8a509c13721c63c3e147028 | 2,100 | PASSED |
๏ปฟ#include <iostream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cassert>
#include <ctime>
#include <chrono>
#include <cstdio>
#include <random>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#... | C++ | 7e678f141f411d3872f25559e2c1f17c | cf83dd39d2df87257d3470bcbda06545 | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define all(v) ((v).begin()), ((v).end())
#define rall(v) ((v).rbegin()), ((v).rend())
#define F first
#define S second
#define oo 1e18+5
#define MOD ll(... | C++ | 7e678f141f411d3872f25559e2c1f17c | 8b164ffead706e223584d876cb0f4fb7 | 2,100 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define all(v) ((v).begin()), ((v).end())
#define rall(v) ((v).rbegin()), ((v).rend())
#define F first
#define S second
#define oo 1e18+5
#define MOD ll(... | C++ | 7e678f141f411d3872f25559e2c1f17c | 6d6a77132650987b84bff7e328eadd3a | 2,100 | PASSED |
/**
* author: longvu
* created: 08/12/22 22:35:10
**/
#include<bits/stdc++.h>
using namespace std;
#define sz(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
const int INF = 1e7;
const int nax = (int)(200901);
const int mod = 1e9 + 7;
template<class X, class Y>
bool maximize(X& x, co... | C++ | 7e678f141f411d3872f25559e2c1f17c | a607c6eb02a70c14765b5085f8a9b25f | 2,100 | PASSED |
#include<bits/stdc++.h>
#define Dracarys ios_base::sync_with_stdio(0);
#define bug(x) cerr<<#x<<'='<<x<<endl;
#define lp(i,a,b) for(int i=a; i<=b; i++)
#define ll int
#define eb push_back
#define pb push_back
#define umm unordered_map
using namespace st... | C++ | 7e678f141f411d3872f25559e2c1f17c | 95b014aa5add98a48e17747c05b4b313 | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define int long long
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#define infinite 9123456789
#define db cout << "Debug" << "\n";
#define dbg(x) cout << #x << " = " << x << "\n"
const int N = 2e5 + 10;
i... | C++ | 46d2e493ff289004af925cd21218a0cf | 5c50e4ceac2cebb1633362763c844406 | 2,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define int long long
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#define infinite 9123456789
#define db cout << "Debug" << "\n";
#define dbg(x) cout << #x << " = " << x << "\n"
const int N = 2e5 + 10;
i... | C++ | 46d2e493ff289004af925cd21218a0cf | 9b7a8aba81be16336129b04583c0d389 | 2,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define int long long
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#define infinite 9123456789
#define db cout << "Debug" << "\n";
#define dbg(x) cout << #x << " = " << x << "\n"
const int N = 2e5 + 10;
i... | C++ | 46d2e493ff289004af925cd21218a0cf | b11603e858401b625f31e5aa996224f0 | 2,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define int long long
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#define infinite 9123456789
#define db cout << "Debug" << "\n";
#define dbg(x) cout << #x << " = " << x << "\n"
const int N = 2e5 + 10;
i... | C++ | 46d2e493ff289004af925cd21218a0cf | 8b95bd558f4226d41443fbe1703d3fa5 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
#define f(n) for(int i = 0; i < n; i++)
#define fj(n) for(int j = 0; j < n; j++)
#define fk(n) for(int k = 0; k < n; k++)
#define ci(n) cin >> n;
#define ic(n) int n; cin >> n;
#define lc(n) int n; cin >> n;
#define... | C++ | 46d2e493ff289004af925cd21218a0cf | bdedaac31b32730b6a340b99efc5017c | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
#define f(n) for(int i = 0; i < n; i++)
#define fj(n) for(int j = 0; j < n; j++)
#define fk(n) for(int k = 0; k < n; k++)
#define ci(n) cin >> n;
#define ic(n) int n; cin >> n;
#define lc(n) int n; cin >> n;
#define... | C++ | 46d2e493ff289004af925cd21218a0cf | 17ebeb041e02ea23d4832258855029e0 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
#define f(n) for(int i = 0; i < n; i++)
#define fj(n) for(int j = 0; j < n; j++)
#define fk(n) for(int k = 0; k < n; k++)
#define ci(n) cin >> n;
#define ic(n) int n; cin >> n;
#define lc(n) int n; cin >> n;
#define... | C++ | 46d2e493ff289004af925cd21218a0cf | b6f107a8214974197bc20f194e600db8 | 2,600 | PASSED |
#include <bits/stdc++.h>
#define mid ((l+r)/2)
using namespace std;
typedef int ll;
class multi_segtree
{
public:
ll m;
vector<ll> seg;
vector<ll> mn,mx;
multi_segtree(ll n)
{
m = 1<<(ll)ceil(log2(n));
for (ll i=-1; i<=2*m+5; i++)
seg.push_back(0),
... | C++ | 46d2e493ff289004af925cd21218a0cf | 7e793fb9f232f35a71cec7e94bfa6dac | 2,600 | PASSED |
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <stdlib.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define mp make_pair
#define pb push_back
#defin... | C++ | 46d2e493ff289004af925cd21218a0cf | 34c6f48090f0ea43eba7082935611623 | 2,600 | PASSED |
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <stdlib.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define mp make_pair
#define pb push_back
#defin... | C++ | 46d2e493ff289004af925cd21218a0cf | a3151a9ca6985ba6403dc9ed4f620db3 | 2,600 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
int T,n,m,tot;char s[N];string anss;
bool all0(){for(int i=1;i<=n;i++)if(s[i]=='1')return 0;return 1;}
void append(int l,int r){tot++,anss+=to_string(l)+" "+to_string(r)+"\n";}
void solve2(int l,int r,int k,int p,int typ){
if(k==p){for(int i=l;i<=r... | C++ | b79e9a69b75f9c18a685156d04335c56 | 69747ff91ae46c890e8c2f5641ccc8af | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6+5;
vector<int>g;
int lgn[maxn],vis[maxn],vs[maxn];
char s[maxn];
vector<pair<int,int>>ans;
bool solve(int l,int r,int n){
if(l>r)return false;
if(r-l+1==1){
ans.push_back({g[l],g[l]});
return true;
}else if(r-l+1==2){
if(n==2... | C++ | b79e9a69b75f9c18a685156d04335c56 | d7139d5d8b2b9fe8f72979e82cb47c31 | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6+5;
vector<int>g;
int lgn[maxn],vis[maxn*4],vs[maxn];
char s[maxn];
vector<pair<int,int>>ans0;
bool solve(int l,int r,int n){
if(l>r)return false;
vector<pair<int,int>>ans;
int nowsz;
if(r-l+1==1){
ans.push_back({g[l],g[l]});
}e... | C++ | b79e9a69b75f9c18a685156d04335c56 | eccff7c67578c7bd2354bf0554c7599d | 3,400 | PASSED |
// e3c8f1a924 2022ๅนด05ๆ27ๆฅ ๆๆไบ 15ๆถ37ๅ00็ง
#include<cstdio>
#include<algorithm>
#include<vector>
#include<utility>
#include<cctype>
#include<cassert>
#include<cstdlib>
std::vector<std::pair<int, int>> ans;
int n, a[1000006], s[1000006], p[1000006];
int get(int i, int x) {
int k = s[i] + x - a[i];
return p[k];
}
void sol... | C++ | b79e9a69b75f9c18a685156d04335c56 | 99e42dac12dbfe35c71eed61beacc089 | 3,400 | PASSED |
// e3c8f1a924 2022ๅนด05ๆ27ๆฅ ๆๆไบ 15ๆถ37ๅ00็ง
#include<cstdio>
#include<algorithm>
#include<vector>
#include<utility>
#include<cctype>
#include<cassert>
#include<cstdlib>
std::vector<std::pair<int, int>> ans;
int n, a[1000006], s[1000006], p[1000006];
int get(int i, int x) {
int k = s[i] + x - a[i];
return p[k]... | C++ | b79e9a69b75f9c18a685156d04335c56 | a1a9d06a02751c750ed64cbdec924b0c | 3,400 | PASSED |
#include <iostream>
#include <cstring>
#include <vector>
#include <utility>
#include <string>
#include <cassert>
using namespace std;
int closey(int n){
int num = 0;
while(n > 0){
n /= 2;
num++;
}
return 1 << (num-1);
}
int bite(int n){
int what = 1;
for(int... | C++ | b79e9a69b75f9c18a685156d04335c56 | 4d69037c56ad650a4c42c939ab50e689 | 3,400 | PASSED |
//~ while (clock()<=69*CLOCKS_PER_SEC)
//~ #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
//~ #pragma GCC target ("avx2")
//~ #pragma GCC optimize("Ofast")
//~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//~ #pragma GCC optimize("unroll-loops")
#include <bits/st... | C++ | b79e9a69b75f9c18a685156d04335c56 | dbd81029ca49568fb3b7f9884ece2910 | 3,400 | PASSED |
// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
/*
using namespace __gnu_pbds;
using namespace __gnu_cxx;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
<b... | C++ | b79e9a69b75f9c18a685156d04335c56 | a8b267a42cb40b46a579a297a6e01b48 | 3,400 | PASSED |
//test
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6;
int g[MAXN + 1];
string s;
vector<pair<int, int>> segments; // [l, r]
int get(int k, int i) { // get k-th '1' on [i, |s|)
--i;
while (k --> 0) i = s.find('1', i + 1);
return i;
}
void five() {
int first = get(1, 0), last... | C++ | b79e9a69b75f9c18a685156d04335c56 | d26196831d748d62fe0d820864ed571c | 3,400 | PASSED |
#include <cstdio>
#include <cstring>
#include <algorithm>
const int N=1000005;
namespace iobuff{
const int LEN=1000000;
char in[LEN+5], out[LEN+5];
char *pin=in, *pout=out, *ed=in, *eout=out+LEN;
inline char gc(void)
{
return pin==ed&&(ed=(pin=in)+fread(in, 1, LEN, stdin), ed==in)?EOF:*pin++;
}
i... | C++ | b79e9a69b75f9c18a685156d04335c56 | e4b281c7a651ad6110f1b7bbaacb1cfc | 3,400 | PASSED |
#include<bits/stdc++.h>
#define endl '\n'
#define inf 20060430
#define fastIO ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
using namespace std;
const int N=1010;
struct node{
int p,idw;
};
vector<node> tu[N];
int w[N*N],wid;
void add(int x,int y,int V){
tu[x].push_back({y,wid}),w[wid]=V,wid++;
... | C++ | d1e4269be1f81875c163c15a0759df88 | eeb2fc1f255fad47707f0aa0fb57aa22 | 2,800 | PASSED |
#include<bits/stdc++.h>
#define endl '\n'
#define inf 20060430
#define fastIO ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
using namespace std;
const int N=1010;
struct node{
int p,idw;
};
vector<node> tu[N];
int w[N*N],wid;
void add(int x,int y,int V){
tu[x].push_back({y,wid}),w[wid]=V,wid++;
... | C++ | d1e4269be1f81875c163c15a0759df88 | c9fc20beb7a049b9bd2e3a1fa6de8557 | 2,800 | PASSED |
#include<bits/stdc++.h>
#define endl '\n'
#define inf 20060430
#define fastIO ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
using namespace std;
const int N=1010;
struct node{
int p,idw;
};
vector<node> tu[N];
int w[N*N],wid;
void add(int x,int y,int V){
tu[x].push_back({y,wid}),w[wid]=V,wid++;
... | C++ | d1e4269be1f81875c163c15a0759df88 | 0dbe2c547480a5b761a8dbd2becee3dc | 2,800 | PASSED |
// LUOGU_RID: 94339088
#pragma GCC optimize(3)
#include<bits/stdc++.h>
using namespace std;
const int maxn=1200000+5;
int n,m,t[1000+5];
int LP=1;
namespace fastio{
namespace io{
const int MaxBuff=1<<15;
const int Output=1<<25;
char B[MaxBuff],*S=B,*T=B;
#define getc() ((S==T)&&(T... | C++ | d1e4269be1f81875c163c15a0759df88 | e2551af95da776f9b1b2f25c4b91a7af | 2,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N=1e3+10;
bool st[N];
vector<ll>g[N];
ll match[N],a[N],b[N],tot1,tot2;
bool find(ll x) {
for(auto v:g[x]) {
if(!st[v]) {
st[v]=1;
if(match[v]==0||find(match[v])) {
match[v]=x;
return 1;
}
}
}
return 0;
... | C++ | d1e4269be1f81875c163c15a0759df88 | 3967335f453032f084e551f3c5405146 | 2,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int n,a[1010],m;
vector<int>g[1010];
int ak[1010];
bool vis[1010];
bool dfs(int x){
for(int v:g[x])if(!vis[v]){
vis[v]=1;
if(!ak[v]||dfs(ak[v])){
ak[v]=x;
return 1;
}
}
return 0;
}
int main(){
cin>>n>>m;int L=0;
for(int i=1;i<=n;i++)scanf("... | C++ | d1e4269be1f81875c163c15a0759df88 | b7a930a05d146ce1e72619b498efa9a6 | 2,800 | PASSED |
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
#define int long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())... | C++ | d1e4269be1f81875c163c15a0759df88 | eeca1f0eed65a1799667a6e52baf4bbf | 2,800 | PASSED |
#include <bits/stdc++.h>
#define eb emplace_back
using namespace std;
const int N = 1005, M = 2000005, inf = 1e9;
int n, m, s, t, cnt = 1, big, v[N], to[M], nxt[M], head[N], dep[N], val[M], max_flow;
inline void add(int x, int y, int w) {
to[++ cnt] = y, nxt[cnt] = head[x], head[x] = cnt, val[cnt] = w;
to[++ c... | C++ | d1e4269be1f81875c163c15a0759df88 | 087b59811a58045b28db1a5dd8539182 | 2,800 | PASSED |
#include<cstdio>
#include<cstring>
#define MAXN 3000055
int to[MAXN],head[MAXN],nxt[MAXN],top;
void add(int now,int tow){to[++top]=tow;nxt[top]=head[now];head[now]=top;}
int use[MAXN],vis[MAXN];
int id=1;
bool dfs(int x){
for (int i=head[x];i!=0;i=nxt[i]){
int ver=to[i];
if(vis[ver]!=id){
vis[ver]=id... | C++ | d1e4269be1f81875c163c15a0759df88 | ead4c215400467379e30db9d654d97a3 | 2,800 | PASSED |
#include<cstdio>
#include<cstring>
#define MAXN 3000055
int to[MAXN],head[MAXN],nxt[MAXN],top;
void add(int now,int tow){to[++top]=tow;nxt[top]=head[now];head[now]=top;}
int use[MAXN],vis[MAXN];
bool dfs(int x){
for (int i=head[x];i!=0;i=nxt[i]){
int ver=to[i];
if(!vis[ver]){
vis[ver]=1;
if(use[ve... | C++ | d1e4269be1f81875c163c15a0759df88 | 49c8ca86e77272b916121684958dba72 | 2,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int n;
string s;
bool solve(){
int st = s.find('a');
if(st == -1){
return false;
}
int l = st , r = st;
for (int i = 1; i < n ; ++i) {
int nxt = s.find(char('a' + i));
if(nxt == -1) return false;
if(nxt == l - 1) l--;
... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 4a4d6bf98b3e6f1a11ad21f4858ea152 | 800 | PASSED |
#include<iostream>
#include<queue>
#include<cstring>
#include<cmath>
#include<string>
using namespace std;
int main()
{
int t;
cin >> t;
int a[30];
while (t--)
{
int flag = 1, i = 0;
memset(a, 0, sizeof a);
string str;
cin >> str;
a[str[0]-'a'] = 1;
if (str[0] - 'a' >= str.size()) flag = 0;
if (flag&... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 7ba7a28966ff4be0acd90a93ad130956 | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int T;
cin>>T;
while(T--)
{
string s;
cin>>s;
int flag=0,t=0;
for(int i=0;s[i];++i)
{
if(s[i]=='a'){
t=i;
flag=1;
break;
}
}
if(!flag){
cout<<"NO"<<endl;
continue;
}
int temp = 1;
for(int i=t-1,j=t+1;i>=0||j<s.leng... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 13e50437490bdf38cc9e9911e2a86f19 | 800 | PASSED |
#include "bits/stdc++.h"
using namespace std;
int main()
{
int t;
cin >> t;
getchar();
while (t--)
{
int k = 1, l = -1, r = -1;
string s, x;
cin >> s;
for (int i = 0; i < s.size(); ++i)
{
if (s[i] == 'a')
{
l = i;
r = i;
x += s[i];
}
}
if (l == -1)
{
cout << "NO" << endl;
... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 35869b0353805a919f79b6884660d7eb | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define all(x) (x).begin(),(x).end()
#define uniq(v) (v).erase(unique(all(v)),v.end())
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define rep2(i,a,b) for(ll i=a;i>=b;i--)
#define pb push_back
typ... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 2b686db64c461a399a7f84939a7c46a6 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef deque<ll> dq ;
typedef list<ll> li;
typedef vector<string> vst ;
typedef vector<ll> vll ;
typedef deque<ll>::iterator dita;
typedef double dd;
typedef greater<ll> ... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 5e9d4e7cab608e1d43cfe512f79a60f0 | 800 | PASSED |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const doubl... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | b3e2383a83e4afb2fc3114d324f4ca78 | 800 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned ll
#define uint unsigned
#define pii pair<int,int>
#define pll pair<ll,ll>
#define IT iterator
#define PB push_back
#define fi first
#define se second
#define all(a) a.begin(),a.end()
#define mid ((r+l)>>1)
#define lson p<<1,l,mid
#define rson p<<1|1,mi... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 594da78cd424e3e8894c5f81d75979c6 | 800 | PASSED |
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define INF 0x3f3f3f3f
using namespace std;
int read() {
int op = 1, a = 0; char c = getchar();
for (; c < '0' || c > '9'; c = getchar()) if (c == '-') op = -1;
for (; c >= '0' && c <= '9'; c = getchar()) a = a... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 0ee5b58d8979f0cbf6fe0d7659671f7c | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ios ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define INF 0x3f3f3f3f
//ๅคๆญๆฏๅฆ้่ฆๅผll๏ผ๏ผ๏ผ
//ๅคๆญๆฏๅฆ้่ฆๅๅงๅ๏ผ๏ผ๏ผ
const int mod=1e9+7;
int t;
string s;
int main()
{
// freopen("test.in","r",stdin);
// freopen("output.in", "w", stdout);
cin>>t... | C++ | 801bf7c73c44c68eaa61c714d5aedf50 | 4be363fe1e2de5f29d37f31ea441684b | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
int main()
{
int t[maxn],a[maxn];
int n,q,k;
cin>>q;
while(q--){
cin>>n>>k;
memset(a,0x3f3f3f3f,sizeof(a));
for(int i=1;i<=k;i++){
cin>>t[i];
}
for(int i=1;i<=k;i++){
cin>>a[t[i]];
}
for(int i=1;i<=n;i++){
a[i]=min(a[i],a... | C++ | 16bd6786078dbaa443e97eec581cff73 | 41ef81f7810d5c1107743730291fb35c | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
using ll = long long;
ll ntc, n, k, loc, tem;
ll shu[(ll)3e5+5];
ll aircon[(ll)3e5+5][2];
int main() {
#ifdef linux
freopen ("input.txt", "r", stdin);
freopen ("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false); cin.tie(0);... | C++ | 16bd6786078dbaa443e97eec581cff73 | fbecea24dae2336e70ea609ac22f53d1 | 1,500 | PASSED |
// Author: Shitful
// Date: 2022-03-08
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template <class T, class Comp = less<T>>
void sort(vector<T> &vec, Comp cmp = less<T>())
{
sort(vec.begin(), vec.end(), cmp);
}
template <class T>
void unique(vector<T> &vec)
{
vec.erase(unique(vec.begin... | C++ | 16bd6786078dbaa443e97eec581cff73 | 7207e21b9bc6e50ce44afa791bb725ae | 1,500 | PASSED |
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<map>
#define ll long long
using namespace std;
const int inf = 0x3f3f3f3f;
const int N = 3e5+9;
int t[N],s[N];
int main()
{
int q;
scanf("%d",&q);
while(q--)
{
int n,k;
scanf("%d %d",&n,&k);
for... | C++ | 16bd6786078dbaa443e97eec581cff73 | 03ba169064fe15fbc321e6cd6cdb4a9c | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
#define nline "\n"
#define sz(x) ((int)((x).size()))
void _print(int x) {
cerr << x;
}
void _print(ll x) {
cerr << x;
}
void _print(double x) {
cerr << x;
}
void _print(char x) {
cerr << x;
}
void _print(string x)... | C++ | 16bd6786078dbaa443e97eec581cff73 | c84c0e9ef8c1d43dc401eb27f6813205 | 1,500 | PASSED |
#include<stack>
#include<cstdlib>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<queue>
#include<cstring>
#include<deque>
#include<vector>
#include<iostream>
#include<map>
#include<set>
#include<iomanip>
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long
using namespace ... | C++ | 16bd6786078dbaa443e97eec581cff73 | c198f9e9675cddf8fc01feddc642947e | 1,500 | PASSED |
/*
*ใใใใใใ ใใ โโใใโโ
* ใใใใใใใใโโโโโโโโโโ
* ใใใใใใใใโใใใใใใใ โ ใ
* ใใใใใใใใโใใใโใใ โ
* ใใใใใใใใโใ๏ผใใใ๏ผใ โ
* ใใใใใใใใโใใใใใใใ โ
* ใใใใใใใใโ...ใโใ... โ
* ใใใใใใใใโ โ
* ใใใใใใใใโโ โโโ
* ใใใใใใใใใโ โใCode is far away from bug with the animal protectingใใใใใใใใใใ
* ใใใใใใใใใโ ... | C++ | 16bd6786078dbaa443e97eec581cff73 | 084310d136e9d08905976a1eb3f1fd3a | 1,500 | PASSED |
//CodeForces - 1547E
#include<iostream>
#include<cstdio>
#include<cstring>
#include<math.h>
#include<stack>
#include<queue>
#include<map>
#include<vector>
#include<algorithm>
#define mem(a,b) memset(a,b,sizeof a);
using namespace std;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int N = 3e6+5;
int T,n,k;
ll ... | C++ | 16bd6786078dbaa443e97eec581cff73 | 6c704bb6bff08a18fc37eeaf818aee4b | 1,500 | PASSED |
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<queue>
#include<vector>
#include<map>
#include<stack>
using namespace std;
const int N=3e5+17;
int T,n,m;
int t[N];
struct node{
int pos,t;
};
struct node air[N];
bool cmp(struct node a,struct node b){
return a.pos<b.pos;
}
signed mai... | C++ | 16bd6786078dbaa443e97eec581cff73 | 05f0f77d6705c49de11c2e7ed6ea256a | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int a[300005];
int b[300005];
int main()
{
int t;
while(cin>>t)
{
while(t--)
{
int n,k;
cin>>n>>k;
memset(b,0x3f3f3f3f,sizeof(b));
for(int i=1;i<=k;i++)
{
cin>>a[i];
}
for(int i=1;i<=k;i++)
{
cin>>b[a[i]];
}
for(int i=1;i<=n;i++)
... | C++ | 16bd6786078dbaa443e97eec581cff73 | 81a15d24d4c7a68792532424d65a3e02 | 1,500 | PASSED |
#include <iostream>
#include <algorithm>
#include<vector>
#include <string>
using namespace std;
int main()
{
int t;
cin >> t;
for (int j = 0; j < t; j++)
{
int k, n, m;
cin >> k >> n >> m;
int a[200],b[200],c[400];
memset(a, -1, 200*sizeof(int));
memset(b, -1, 200*sizeof(int));
memset(c... | C++ | 6628bd89b4d4fdfa90d2357f7cc1b795 | d7381409ad3f6b0ca488876892bb0b64 | 1,100 | PASSED |
#include <iostream>
#include <algorithm>
#include<vector>
#include <string>
using namespace std;
int main()
{
int t;
cin >> t;
for (int j = 0; j < t; j++)
{
int k, n, m;
cin >> k >> n >> m;
int a[200],b[200],c[400];
memset(a, -1, 200*sizeof(int));
memset(b, -1, 200*sizeof(int));
memset(c... | C++ | 6628bd89b4d4fdfa90d2357f7cc1b795 | aaac6de64b1f012c9779dd8dddd0c295 | 1,100 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.