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;
#define ll long long
#define ld long double
#define pb push_back
#define sec second
#define fir first
#define mo 1000000007
#define inf 1e18
#define rep(i, s, n) for (ll i = s; i < n; i = i + 1)
#define rrep(i,s,n) for(ll i=s;i>=n;i--)
ll mod(ll n) { return (n % (ll)m... | C++ | b85c8bfbe67a23a81bef755f9313115a | 377b0f1b269c62cacdc76e44074acb28 | 1,500 | PASSED |
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <stdio.h>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <time.h>
#include <string>
#include <vector>
#include <math.h>
#include <cstdio>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <un... | C++ | b85c8bfbe67a23a81bef755f9313115a | fcf558f7f4c6b787facab67cf6f630b2 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define vi vector<int>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pi 3.141592653589793238
#define eb emplace_back
#define rep(i,a,b) for (int i = a; i <= b; i++)
#define zip(i,a,b) for(int i=a;i<b;i++)
#define r... | C++ | b85c8bfbe67a23a81bef755f9313115a | 31ba2a57fc85f46d1169da3a215dcc5b | 1,500 | PASSED |
#include<bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f
#define mods 1000000007
#define modd 998244353
#define PI acos(-1)
#define fi first
#define se second
#define lowbit(x) (x&(-x))
#define mp make_pair
#define pb push_back
#define si size()
#define E exp(1.0)
#define fixed cout.setf(ios::fixed)
#define ... | C++ | b85c8bfbe67a23a81bef755f9313115a | 29f4fcfec5dd9b28e8c09251fd4f6dd8 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef vector<ll> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<vi> vvi;
#define F first
#define S second
#define pb emplace_back
#define M 1000000007
#define watch(x) cout << (#x) << " is " << (x) <... | C++ | b85c8bfbe67a23a81bef755f9313115a | d102a5ffc5b98778b6ed8f0178b6b7b8 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int a,b,c,d,i,j,k,l;
cin>>a>>b;
c=floor((double)a/2.0);
c--;
d=b-c;
if(a==1 && b==0)
{
cout<<1;
return 0;
}
if(a==2 && b>0)
{
cout<<b<<" "<<2*b;
return 0;
}
... | C++ | b85c8bfbe67a23a81bef755f9313115a | 2d09985880531f68a84bc54236a5a9e5 | 1,500 | PASSED |
// **** billu_saanda ****
// agar kch smjh nhi aa rha to gcd laga lo ya fir BS se socho.....
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
#define ff first
#define ss second
#define pii pair<int,int>
#define io(); freopen("inputf.in","r",stdin); freopen("outputf.in","w",stdout)... | C++ | b85c8bfbe67a23a81bef755f9313115a | de90eadf0d3924b03ce210d16ab5465f | 1,500 | PASSED |
#include <iostream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <tuple>
#include <math.h>
#include <set>
#include <stack>
#include <bitset>
#include <map>
#include <queue>
#include <random>
#include <unordered_set>
#include <unordered_map>
#define DEBUG
#define fi first
#defin... | C++ | b85c8bfbe67a23a81bef755f9313115a | 0127c8ecb88a10d94ac02b3a5de67cf6 | 1,500 | PASSED |
// Author: Gaurang_Kothiya
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <bitset>
#include <cstdint>
#include <initializer_list>
using namespace std;
using namespace __gnu_pbds;
#define data_set(type) tree<type,null_type,le... | C++ | b85c8bfbe67a23a81bef755f9313115a | 8daaad674c187be9ebf8c175be98e832 | 1,500 | PASSED |
/*W
A
S
D
WW
WA
WS
WD
AW
AA
AS
AD
SW
SA
SS
SD
DW
DA
DS
DD
WWW
WWA
WWS
WWD
WAW
WAA
WAS
WAD
WSW
WSA
WSS
WSD
WDW
WDA
WDS
WDD
AWW
AWA
AWS
AWD
AAW*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define debug(x) cout<<#x<<" is "<<x<<endl;
const int maxn=2e5+5;
const double eps=1e-3;
const ll inf=1e18;... | C++ | a4f183775262fdc42dc5fc621c196ec9 | f60aee00f18a87e3ccb29a6db5f24054 | 2,100 | PASSED |
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<iostream>
#include<iterator>
#include<math.h>
#include<cmath>
#include<sstream>
#include<vector>
#include<iomanip>
#include<string>
#include<fstream>
#include<algorithm>
#include<map>
#include<thread>
#include<stack>
#include<numeric>
#include<functiona... | C++ | a4f183775262fdc42dc5fc621c196ec9 | 4f6d30da7ae52635103667540b667fda | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define maxn 5005
string s;
int simchk(vector<int> psum){
int mx=0;
int mi=1e9;
for(int j=0;j<psum.size();j++){
mx=max(mx,psum[j]);
mi=min(mi,psum[j]);
}
int i1=0,i2=0;
for(int i=0;i<psum.size();i++){
if(psum[i]==mi){
i1=i;
... | C++ | a4f183775262fdc42dc5fc621c196ec9 | 07cfb9c687b8c02aa4634de302fc18de | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int T;
vector<int> mx, my;
int xmax[200010], xmin[200010];
int ymax[200010], ymin[200010];
int sumx[200010], sumy[200010];
signed main(){
// freopen("in.in","r",stdin);
cin >> T;
while(T--){
string s; cin >> s;
mx.clear();
my.clear();
for(int... | C++ | a4f183775262fdc42dc5fc621c196ec9 | 542afcc5592a829c861162c573b22626 | 2,100 | PASSED |
//{
#include<cstdio>
#include<cstring>
#include<queue>
#include<iostream>
#include<map>
#include<set>
#include<algorithm>
#include<vector>
#include<cmath>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define rep(i, a, b) for(int i=(a); i<(b); i++)
#define sz(a) (int)... | C++ | a4f183775262fdc42dc5fc621c196ec9 | 80b381c4597e8734598a6983bf28e653 | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef long long ll;
string s;
int check(vi& a, vi&b);
int check_Wrapp(vi& a, vi& b){
return check(a, b) || check(b, a);
}
int check(vi& a, vi& b){
//cout << a.back() << " " << b.back() << " " << a.size()<<endl;
if(a.front() > b.back()... | C++ | a4f183775262fdc42dc5fc621c196ec9 | d5d607c3231c6ea68c857af0eb9eea5c | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int T;
string s;
bool f(vector<int> v){
int n = 0;
int mini = 0, maxi = 0;
pair<pair<int, int>, pair<int, int>> can;
for(int i = 0; i<v.size(); i++){
n += v[i];
if(mini > n){
mini = n;
can.first.first = can.first.sec... | C++ | a4f183775262fdc42dc5fc621c196ec9 | 8d4c2d5b4d511e3df7805cca1019c040 | 2,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N = 2e5+7,INF = 1e9;
char s[N];
int pre1[N],pre2[N];
bool process(int *pre,int n,int mx,int mi){
int lmax,fmin=-1,fmax=-1,lmin;
for(int i=0;i<=n;i++){
if(pre[i]==mx){
if(fmax==-1)fmax=i;
lmax=i;
}else if(pre[i]==mi){... | C++ | a4f183775262fdc42dc5fc621c196ec9 | e9df8fe6e4ca8a6f047bca9104102ee4 | 2,100 | PASSED |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int T, len;
ll fxmin, lxmin, fxmax, lxmax, xmax, xmin, xnow;
ll fymin, lymin, fymax, lymax, ymax, ymin, ynow;
ll ans;
char s[200003];
int main()
{
ios::sync_with_stdio(false);
cin >> T;
while(T--)
{
cin >> s;
len = strlen(s);
ans = 1e18;
x... | C++ | a4f183775262fdc42dc5fc621c196ec9 | a969f1e8288c4a5dc77fda71a28264b9 | 2,100 | PASSED |
#include<iostream>
#include<vector>
#include<stack>
#include <stdlib.h>
#include <cmath>
#include <iomanip>
#include <map>
#include <algorithm>
#include <climits>
#define ll long long
#define pi 3.141592653589
using namespace std;
int main(){
int T;
cin>>T;
for(int t=0;t<T;t++){
string S;
ci... | C++ | a4f183775262fdc42dc5fc621c196ec9 | 52cf80980ee0d0f5878b2077323e29f3 | 2,100 | PASSED |
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include<iomanip>
#define LLMAX 1000000000000000000
#define LL long long
#define LD... | C++ | 1d547a38250c7780ddcf10674417d5ff | a6e77573666648bf4db32b56c7357276 | 1,900 | PASSED |
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include<iomanip>
#define LLMAX 1000000000000000000
#define LL long long
#define LD... | C++ | 1d547a38250c7780ddcf10674417d5ff | 73ad97b6825cc747461bafc0744ab38b | 1,900 | PASSED |
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <cassert>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <functional>
#include <string>
#include <tuple>
#include <utilit... | C++ | 1d547a38250c7780ddcf10674417d5ff | fefa764bfdb1a3cd2d694c66161535ad | 1,900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define MAX 10000000000000
const long double pi = 3.14159265358979;
struct point {
long double x;
long double y;
};
vector <point> v;
bool into(point P, point a, point b) {
long double scalar1 = (P.x-a.x)*(b.x-a.x) + (P.y-a.y)*(b.y-a.y);
long double scala... | C++ | 1d547a38250c7780ddcf10674417d5ff | 7cb7fac9fd49a16a986b957b8f2c650d | 1,900 | PASSED |
#pragma comment(linker,"/STACK:32000000")
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <limits>
#include <numeric>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#inclu... | C++ | 1d547a38250c7780ddcf10674417d5ff | 2794b846ced7fce2b4fe1d0b0af68c72 | 1,900 | PASSED |
#pragma comment(linker,"/STACK:32000000")
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <limits>
#include <numeric>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#inclu... | C++ | 1d547a38250c7780ddcf10674417d5ff | 11ff7aedc1cc56fc11385c24742e6f0f | 1,900 | PASSED |
#include<iostream>
#include<stdio.h>
#include<string>
#include<iomanip>
#include<math.h>
using namespace std;
double q(double x,double xx,double y,double yy)
{
return sqrt((x-xx)*(x-xx)+(y-yy)*(y-yy));
}
main()
{
long long int i,j,k,l,n,x,y;
double s,m,t,tt,z,a,e,data[100009][2];
while(cin>>n>>x>>y)
{
... | C++ | 1d547a38250c7780ddcf10674417d5ff | ac1e41c7c5f4d501a512cbe3d927b5e6 | 1,900 | PASSED |
#include <iostream>
#include <iomanip>
#include <math.h>
#include <vector>
using namespace std;
constexpr double PI = 2.0 * acos(0.0);
struct point{
double x, y;
double dist;
};
struct v{
double x, y;
};
int main()
{
int n;
double p1, p2;
cin >> n >> p1 >> p2;
point p;
p.x = p1;
p.... | C++ | 1d547a38250c7780ddcf10674417d5ff | ab16ffd5854caf498de486c0480bdfc9 | 1,900 | PASSED |
import java.util.*;
import java.lang.*;
import java.io.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main {
public static void main(String[] args) throws Exception {
// your code goes here
Scanner sc = new Scanner(System.in);
int... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | a8313cf6e9bdac5250c2093bff13e0a4 | 800 | PASSED |
import java.io.*;
import java.util.*;
public class practice361a {
public static void main(String[] args) throws Exception {
// BufferedReader f = new BufferedReader(new FileReader (new File("sample.txt")));
// PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("sample.txt")));
// StringToken... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | 08f5a9735083b2c6562fffe15a879a25 | 800 | PASSED |
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n=in.nextInt();
int k=in.nextInt();
int arr[][]=new int[n][n];
;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
if(i==j)
ar... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | b770035b105e48827eac8dc859acc033 | 800 | PASSED |
import java.util.Scanner;
public class oci2 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[][] lista = new int[n][n];
for(int i = 0;i < n;i++){
for(int j = 0;j <... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | e13e65a4e42cf66a6b36dc8afb2b385e | 800 | PASSED |
import org.w3c.dom.css.CSSUnknownRule;
import java.lang.reflect.Array;
import java.util.*;
public class geek {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n=s.nextInt();
int k=s.nextInt();
StringBuffer sb=new StringBuffer();
for(int i=0;i<n;... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | 1da05da89bb12603339d7927a27b16d4 | 800 | PASSED |
import java.util.Scanner;
public class jeje {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt(); //suma
int[][] table = new int[n][n];
for(int i=0; i<n; i++){
ta... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | c02dbf3807920b89603f8ccaf078b3a9 | 800 | PASSED |
import java.util.Scanner;
/**
*
* @author Krolos
*/
public class ALevkoAndTable {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner k=new Scanner(System.in);
int x=k.nextInt();
int y=k.nextInt();
int arr[][]=new int[x][... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | e736de24ba97a326ab0f8353e02fa7f7 | 800 | PASSED |
import java.io.PrintWriter;
import java.util.Scanner;
public class LevkoAndTable {
static Scanner in = new Scanner(System.in);
static PrintWriter out = new PrintWriter(System.out);
public static void main (String args[]){
int n = in.nextInt() , k = in.nextInt();
for (int i = 0; i < n; i++) ... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | 3d746115321854339a242b2bc8c312ca | 800 | PASSED |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* ... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | 5c9216a1ec4a155e2b7e6e9373cf7c61 | 800 | PASSED |
import java.util.HashMap;
import java.util.Scanner;
public class football {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int k = scn.nextInt();
int[][] mat = new int[n][n];
for (int i = 0; i < n; i++) {
for (... | Java | e80088bee9c0df6adf280f8ffbeaa4a9 | b621a3000d177cf8b48090b74d52ce59 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
double dist(pair<double, double> a, pair<double, double> b)
{
return sqrt(pow(a.first - b.first, 2) + pow(a.second - b.second, 2));
}
vector<pair<pair<double, double>,int>> ar;
double min_d = 1e12;
double go(int l, int r, vector<pair<pair<double, double>, int>>& pat... | C++ | 41bc5d7e091a92af7160056ca6030588 | c1616eb4dd41c18aafc185ddf5e78df5 | 1,900 | PASSED |
//Testing 2
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define debug(a) cout << #a << ": " << a << endl
#define debuga1(a, l, r) fto(i, l, r) cout << a[i] << " "; cout << endl
#define fdto(i, r, l) for(int i = (r); i >= (l); --i)
#define fto(i, l, r) for(int i = (... | C++ | 41bc5d7e091a92af7160056ca6030588 | 260639adb91de6534b0c55271ec71962 | 1,900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define debug(a) cout << #a << ": " << a << endl
#define debuga1(a, l, r) fto(i, l, r) cout << a[i] << " "; cout << endl
#define fdto(i, r, l) for(int i = (r); i >= (l); --i)
#define fto(i, l, r) for(int i = (l); i <= (r)... | C++ | 41bc5d7e091a92af7160056ca6030588 | d1659ca9d3a4f129e99ba7c72c46f1ba | 1,900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define debug(a) cout << #a << ": " << a << endl
#define debuga1(a, l, r) fto(i, l, r) cout << a[i] << " "; cout << endl
#define fdto(i, r, l) for(int i = (r); i >= (l); --i)
#define fto(i, l, r) for(int i = (l); i <= (r)... | C++ | 41bc5d7e091a92af7160056ca6030588 | 168c431baa573e558e442c48aec5c797 | 1,900 | 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 ll;
typedef vector<long long> vl;
typedef pair<long long , long long > pl;
const int N=1e6+1;
#define po pop_back
#define pb push_back
#define mk make_... | C++ | 41bc5d7e091a92af7160056ca6030588 | 3ca6203f34fdc6dc030cafb2132df9ea | 1,900 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+100;
struct Pt{
int x,y,quad=1,d,pos;
void read(int i){
cin>>x>>y;
pos=i+1;
if(x<0)quad+=1,x=-x;
if(y<0)quad+=2,y=-y;
d=x*x+y*y;
}
};
int dist(Pt a,Pt b){
return (b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);
}
bool cmp(Pt a,Pt b){
return a.d<... | C++ | 41bc5d7e091a92af7160056ca6030588 | f2b9e6605838180220e620e57d27b4a4 | 1,900 | PASSED |
#include <iostream>
#include <limits>
#include <numeric>
#include <sstream>
#include <vector>
#include <algorithm>
#include <cassert>
#include <random>
#include <queue>
#include <fstream>
#include <unordered_map>
#include <list>
#include <functional>
std::vector<int> ReadVector(int size) {
std::vector<int> res(s... | C++ | 41bc5d7e091a92af7160056ca6030588 | 28f8e1020c3a920e5bd99c27a2e01e2b | 1,900 | PASSED |
#include <iostream>
#include <limits>
#include <numeric>
#include <sstream>
#include <vector>
#include <algorithm>
#include <cassert>
#include <random>
#include <queue>
#include <fstream>
#include <unordered_map>
#include <list>
#include <functional>
std::vector<int> ReadVector(int size) {
std::vector<int> res(s... | C++ | 41bc5d7e091a92af7160056ca6030588 | c83d7593b73ddcc23863b8710fcabe46 | 1,900 | PASSED |
#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <b... | C++ | 41bc5d7e091a92af7160056ca6030588 | 0d92e641236ad699b6144f63778ef8dd | 1,900 | PASSED |
#include <cstdio>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <iostream>
#include <queue>
using namespace std;
#define mp make_pair
#define sqr(a) (a)*(a)
typedef long double ld;
typedef long long ll;
const int MAXN = 1e5;
const int INF = 1e9;
st... | C++ | 41bc5d7e091a92af7160056ca6030588 | b4989e17fbbffb2fb20554165de49daf | 1,900 | PASSED |
#include <bits/stdc++.h>
#include <climits>
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define srep(i, begin, end) for (__typeof(end) i = begin; i != end; i++)
#define si(x) int x = scanInt();
#define sll(x) LL x = scanL... | C++ | 2fa543c8b8f9dc500c36cf719800a6b0 | 1365cecb220a2c230901ac7d9fe4bc9f | 1,500 | PASSED |
#include <bits/stdc++.h>
#define s(a) cin >> a;
#define s2(a,b) cin >> a>> b;
#define s3(a,b,c) cin >> a>> b>> c;
#define s4(a,b,c,d) cin >> a>> b >> c >> d;
#define sp(b) cout << b << "\n";
#define sp2(b,c) cout << b << " "<<c <<endl;
#define sp3(a,b,c) cout <... | C++ | 2fa543c8b8f9dc500c36cf719800a6b0 | 2982bab416ec6aff7dbfeee63646c579 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 9;
int pos[26] , n , index1 = -1 , index2 = -1 , flag , ANS ;
int main(){
char s[MAX] , t[MAX] ;
scanf("%d",&n);
scanf("%s",s+1);
scanf("%s",t+1);
for(int i = 1 ; i <= n ; i++){
if(s[i] != t[i])
ANS++ , pos[t... | C++ | 2fa543c8b8f9dc500c36cf719800a6b0 | 0e6dcf11e5a04bed1290477e38ff6a20 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 9;
int freq[26][26] , n , index1 = -1 , index2 = -1 , flag , ANS ;
int main(){
char s[MAX] , t[MAX] ;
scanf("%d%s%s",&n,&s,&t);
for(int i = 0 ; i < n ; i++)
if(s[i]!=t[i])
ANS++ , freq[s[i] - 'a'][t[i] - 'a'] = i + 1... | C++ | 2fa543c8b8f9dc500c36cf719800a6b0 | 1e3b168cc967af603c8fd02f90364b12 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
string s,t;
cin>>s>>t;
int dp[26][26];
memset(dp,-1,sizeof(dp));
int hamming = 0;
for(int i=0;i<n;i++)
{
if(s[i]!=t[i])
{
dp[s[i]-'a'][t[i]-'a']=i;
hamming++;
}
}
for(int i=0;i<26;i++)
{
for(int j=0;j<26;j++)
{
if(d... | C++ | 2fa543c8b8f9dc500c36cf719800a6b0 | 36f30da9fa3b4ddd5c7f34beb39194cf | 1,500 | PASSED |
// e==m*pow(c,2) \\
#include<bits/stdc++.h>
#define pb push_back
#define pii pair<char, char>
using namespace std;
bool q['z'+1]['z'+1];
int main()
{
map< pair<char, char> , int> ara;
vector<char> a, b;
ios_base::sync_with_stdio(0);
cin.tie();
cout.tie();
string s1, s2;
bool chk=false;
... | C++ | 2fa543c8b8f9dc500c36cf719800a6b0 | 07c7144e42b4d6750c90d3e660dfc518 | 1,500 | PASSED |
// e==m*pow(c,2) \\
#include<bits/stdc++.h>
#define pb push_back
#define pii pair<char, char>
using namespace std;
bool q['z'+1]['z'+1];
int main()
{
map< pair<char, char> , int> ara;
vector<char> a, b;
ios_base::sync_with_stdio(0);
cin.tie();
cout.tie();
string s1, s2;
bool chk=false;
... | C++ | 2fa543c8b8f9dc500c36cf719800a6b0 | 2cebe837d52ced14df946bb0595dca99 | 1,500 | PASSED |
/**
* Created by Anna on 18.03.2015.
*/
/**
* Created by Anna on 08.03.2014.
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.StringTokenizer;
public class TaskB {
StringTokenizer st;
Buf... | Java | 2fa543c8b8f9dc500c36cf719800a6b0 | e821b2ae04c37121e0ea3fa376d5b8b4 | 1,500 | PASSED |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.StringTokenizer;
public class B {
/**
* @param args
*/
public static void main(String[... | Java | 2fa543c8b8f9dc500c36cf719800a6b0 | 9e43f69141a553ce4089fcc28df85b26 | 1,500 | PASSED |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.StringTokenize... | Java | 2fa543c8b8f9dc500c36cf719800a6b0 | e52582a082779aa8ea5ddd37d82a56f7 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ref(i,x,y)for(int i=x;i<=y;++i)
typedef unsigned long long ULL;
struct xint{
ULL a[5];
xint(){ref(i,0,4)a[i]=0;}
};
xint operator+(xint a,xint b){ ref(i,0,4)a.a[i]+=b.a[i];return a; }
xint operator-(xint a,xint b){ ref(i,0,4)a.a[i]-=b.a[i];return a; }
xint operato... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 31c3c9ec7e40240b42c049ebcbfa8d5a | 3,400 | PASSED |
#include <bits/stdc++.h>
#define I inline
#define fi first
#define se second
#define R register
#define LL long long
#define mp make_pair
#define reg register int
#define pii pair<int,int>
#define ULL unsigned long long
#define fo(i, a, b) for(reg i = a; i <= b; i++)
#define fd(i, a, b) for(reg i = a; i >= b; i--)
#de... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 0990ee29d044467e3cce7fd77fcdaa25 | 3,400 | PASSED |
#include <bits/stdc++.h>
#define I inline
#define fi first
#define se second
#define R register
#define LL long long
#define mp make_pair
#define reg register int
#define pii pair<int,int>
#define ULL unsigned long long
#define fo(i, a, b) for(reg i = a; i <= b; i++)
#define fd(i, a, b) for(reg i = a; i >= b; i--)
#de... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | bc56825c42e38ce9ccfde58d537916b7 | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
using num=unsigned long long;
const num mod=(1LL<<58);
const int B=10;
const int SZ=(B+1)/2; //B=5
using elem=array<num,SZ>;
elem operator +(const elem& a,const elem& b){
elem c={0};
for(int i=0;i<SZ;++i)c[i]=a[i]+b[i];
return c;
}
elem operator -(const elem& a,c... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 4c47656819172ec50c3b03d4e25b4a56 | 3,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
uint64_t inv5 = 14757395258967641293ULL;
const int N = 100000;
const int M = 10;
using TM = array<uint64_t, M>;
TM a[N];
TM mul(const TM &a, const TM &b) {
TM ret = {};
for (int i = 0; i < M; i++)
for (int j = 0; j < M; j++) {
ret[(i + j) % M] += a[i] * b[j];
... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 688f4c5094d0483ff49179b3d90b0277 | 3,400 | PASSED |
#include<bits/stdc++.h>
using std::cin;
using std::cout;
typedef unsigned long long u64;
const u64 i5 = 57646075230342349;
const int N = 1e5;
struct wwj {
u64 a0, a1, a2, a3;
// 1, w, w^2, w^3
// w^4 = w^3 - w^2 + w - 1
// w^5 = -1
// w^6 = -w
inline wwj(u64 b0, u64 b1, u64 b2, u64 b3) :
a0(b0), a1(b1), a2(b... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 5b843c5eba9cbc77e734c2a76d6d9a0c | 3,400 | PASSED |
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<vector>
using namespace std;
#define Whats(x) cout<<#x<<" is "<<(x)<<endl
#define Divhim() cout<<">>>>>>>>>"<<endl
#define Divher() cout<<"<<<<<<<<<"<<endl
#define Oops() cout<<"!!!!!!!!!!"<<endl
template<typename T> b... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 9a1de3ec75c9f28e36e62b0d079387ec | 3,400 | PASSED |
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<vector>
using namespace std;
#define Whats(x) cout<<#x<<" is "<<(x)<<endl
#define Divhim() cout<<">>>>>>>>>"<<endl
#define Divher() cout<<"<<<<<<<<<"<<endl
#define Oops() cout<<"!!!!!!!!!!"<<endl
template<typename T> b... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 78dbc7b097d823bdeb99e5a7cbb5ca5a | 3,400 | PASSED |
//Zory-2020
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
// typedef __int128 ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define FR first
#define SE second
#define MP make_pair
#define PB push_back
#define vc vector
//#define db double
#define all(x) (x)... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | 7f8485663e4eab23431ae21bdf0680b1 | 3,400 | PASSED |
//Zory-2020
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
// typedef __int128 ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define FR first
#define SE second
#define MP make_pair
#define PB push_back
#define vc vector
//#define db double
#define all(x) (x)... | C++ | a7ad43f36de9fd81fb39b1744cdd6aac | b0bc175828de68d8a48fe968298f7cd9 | 3,400 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define sd(a) scanf("%d",&a)
#define sdd(a,b) scanf("%d%d",&a,&b)
#define ss(a) scanf("%s",a)
const int M = 200179;
int n, q, k, x, s;
pair <int,int> p[M];//, bid[M]; //player, bid
vector <int> pb[M]; //player => his bids
set <int> last; //player's last ... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | 439dccf5ea465024a4552749b236a2fe | 2,000 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define sd(a) scanf("%d",&a)
#define sdd(a,b) scanf("%d%d",&a,&b)
#define ss(a) scanf("%s",a)
const int M = 200009;
int n, q, k, x, s;
vector <pair <int,int> > p;//, bid[M]; //player, bid
vector <int> pb[M]; //player => his bids
set <int> last; //player'... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | 643f994178c4978faf3ac21ffcf904df | 2,000 | PASSED |
/*
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <stack>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <unordered_set>
#include <unordered_map>
#include <bitse... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | 5e474bb0e277c7fb3d4c680fc5e7987d | 2,000 | PASSED |
/*
ans=\frac{2}{n (n+1)}\
left(\frac{1}{4} \
sum _{i=1}^n i (n-i) (-i+n+1)+\
frac{1}{2} (n (n+1)) F(n)-\
sum _{1\leq i<j\leq n,\text{Null}a_i>a_j} i (-j+n+1)\right)
*/
/*
Time: 161220
Prob: CF749E
By RogerRo
*/
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<vector>
#include<queue>
... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | 15e7c3d65c953b119ba124ad404291be | 2,000 | PASSED |
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <stack>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <unordered_set>
#include <unordered_map>
#include <bitset>... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | d41c28c605b2485325ddcdbecde723a3 | 2,000 | PASSED |
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
const long long M = 200009;
long long n, q, k, x, s;
vector <pair <long long,long long> > p;//, bid[M]; //player, bid
vector <vector <long long> > pb; //player => his bids
set <long long> last; ... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | c0971cb2123977b97650e8ec44bca179 | 2,000 | PASSED |
/*
#include <iostream>
#include <stdio.h>
#include <cmath>
#include <math.h>
#include <string>
#include <algorithm>
#include <functional>
#include <stack>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <unordered_set>
#include <unordered_map>
#include <bitse... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | e505206c2c5adc7431259db59837571e | 2,000 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define sd(a) scanf("%d",&a)
#define sdd(a,b) scanf("%d%d",&a,&b)
#define ss(a) scanf("%s",a)
#define in(a) a.begin(), a.end()
const int M = 200179;
int n, q, k, x, s;
pair <int,int> p[M]; //player, bid
vector <int> pb[M]; //player => his bids
set <int> last; ... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | f33a08f175ccc93206da6c82fb558bc9 | 2,000 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define sd(a) scanf("%d",&a)
#define sdd(a,b) scanf("%d%d",&a,&b)
#define ss(a) scanf("%s",a)
const int M = 200009;
int n, q, k, x, s;
pair <int,int> p[M];//, bid[M]; //player, bid
vector <int> pb[M]; //player => his bids
set <int> last; //player's last ... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | 70a72e447e980e5e7f9f3006ce70b329 | 2,000 | PASSED |
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
void solve()
{
const long long M = 200009;
long long n, q, k;
vector <pair <long long,long long> > p;//, bid[M]; //player, bid
vector <vector <long long> > pb; //player => his bids
set <long long> last; ... | C++ | 33ec0c97192b7b9e2ebff32f8ea4681c | 8d811c1cd07f8ea1bbc99ef0161b403f | 2,000 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, p, k;
struct spot {
int v;
int b[7];
bool operator<(const spot &c) const &{
return v > c.v;
}
} a[100007];
ll dp[100007][1 << 7];
int t[1 << 7];
int get_t(int i) {
int r = 0;
while (i) {
if (i & 1)r++... | C++ | db1e1831383d057dccda263f2ec864f7 | fe0ebf2ebe94ce6b3af17f7d201580c7 | 2,300 | PASSED |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. Aint rights reserved.
#include<bits/stdc++.h>
#define MAX 100005
#define INF 1e18
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair < int , int >
#define fi first
#define se second
u... | C++ | db1e1831383d057dccda263f2ec864f7 | 74fc5eae045fe2948573162bcd3525ca | 2,300 | PASSED |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. Aint rights reserved.
#include<bits/stdc++.h>
#define MAX 100005
#define INF 1e15
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair < int , int >
#define fi first
#define se second
u... | C++ | db1e1831383d057dccda263f2ec864f7 | e1f6f36df8d38484e6b053772276b9a1 | 2,300 | PASSED |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. All rights reserved.
#include<bits/stdc++.h>
#define MAX 100005
#define INF 1e18
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair < ll , ll >
#define fi first
#define se second
usin... | C++ | db1e1831383d057dccda263f2ec864f7 | 392c8f4ff3d0636fdf1c9fdda2290b02 | 2,300 | PASSED |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. Aint rights reserved.
#include<bits/stdc++.h>
#define MAX 100005
#define INF 1e18
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair < int , int >
#define fi first
#define se second
u... | C++ | db1e1831383d057dccda263f2ec864f7 | dcafd8343584b9db9b1c5b08b7c6b82e | 2,300 | PASSED |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. Aint rights reserved.
#include<bits/stdc++.h>
#define MAX 100005
#define INF 1e15
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair < int , int >
#define fi first
#define se second
u... | C++ | db1e1831383d057dccda263f2ec864f7 | 09530f8d02dc6380d6a4b5a6b8b44068 | 2,300 | PASSED |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. Aint rights reserved.
#include<bits/stdc++.h>
#define MAX 100005
#define INF 1e18
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair < int , int >
#define fi first
#define se second
u... | C++ | db1e1831383d057dccda263f2ec864f7 | cc48128e85f32b47029911ec87189f8a | 2,300 | PASSED |
// Copyright © 2020 Diego Garcia Rodriguez del Campo. Aint rights reserved.
#include<bits/stdc++.h>
#define MAX 100005
#define INF 1e15
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair < int , int >
#define fi first
#define se second
u... | C++ | db1e1831383d057dccda263f2ec864f7 | 0118ff32b592310bd631f7154b22c03a | 2,300 | PASSED |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef double db;
typedef std::string str;
#define sei set<int>
#define sell set<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
#de... | C++ | db1e1831383d057dccda263f2ec864f7 | ecf061199a445a7926324853a41114c3 | 2,300 | PASSED |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef double db;
typedef std::string str;
#define sei set<int>
#define sell set<ll>
#define pii pair<int,int>
#define pll pair<ll,ll>
#de... | C++ | db1e1831383d057dccda263f2ec864f7 | 34efa1c57f4e3d87545969db73ad1c6e | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 5;
int a[N], b[N];
int n;
signed main() {
ios::sync_with_stdio(false);
int T;
cin >> T;
while (T--) {
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
b[i] = a[i];
... | C++ | 6e6356adb23da0dfa38834a0e157524c | dc865ff42a18c0a3e66520c798232930 | 1,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define pi 3.14159265359
#define mp make_pair
#define vecs vector<string>
#define vecb vector<vector<bool> >
#define veci vector<vector<int> >
typedef long long int ll;
/*void add(int u,int v,veci &list){
list[u].push_back(v);
lis... | C++ | 6e6356adb23da0dfa38834a0e157524c | 6ecf37d889faceedda260ca972aaa483 | 1,800 | PASSED |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int T,n;
int a[30005];
int main(){
cin >>T;
while(T--){
cin >>n;
for(int i=1; i<=n; ++i)
cin>>a[i];
bool tag=true;
int l=a[1],r=0;
for(int i=2; i<n; ++i){
... | C++ | 6e6356adb23da0dfa38834a0e157524c | ce13a4e7fb586611bc4bbfadc1b4fcfa | 1,800 | PASSED |
#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
#define P 1000000007
#define rep(i,n) for(i=0;i<n;++i)
#define re(i,a,n) for(i=a;i<=n;++i)
#define repr(i,a,n) for(i=a;i>=n;--i)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
ll binpow(ll x, ll y, ll p)
{
ll res... | C++ | 6e6356adb23da0dfa38834a0e157524c | 6faced16c34ee058781dc33df19ff9a5 | 1,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
/* * * * * * * * * * */
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
/* * * * * * * * * * */
/* *
*
* I love Ylva Eriksson
*
* */
int main(){
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
//freopen("input.txt", "r", stdi... | C++ | 6e6356adb23da0dfa38834a0e157524c | b778bed2d3756c1b0cd4275c85809844 | 1,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
using ll=long long int;
using ld=long double;
int main()
{
#ifndef ONLINE_JUDGE
// for getting input from input.txt
freopen("input.txt", "r", stdin);
// for writing output to output.txt
freopen("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
... | C++ | 6e6356adb23da0dfa38834a0e157524c | 8defe1910097a34ff39b6ca3535abde5 | 1,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int N=3e4+100;
int a[N],mi[N],m[N],dp[N];
int main(){
int t;
cin >> t;
while(t--){
int n;
cin >> n;
for (int i=0 ; i<n ; i++){
cin >> a[i];
}
int q=-5;
dp[0]=0;
dp[1]=0;
for (int... | C++ | 6e6356adb23da0dfa38834a0e157524c | 741dabe490f4ac757b4af22d8976b453 | 1,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
void solve(){
ll n;
cin >> n;
ll a[n];
for(ll i = 0; i < n; i++) cin >> a[i];
ll c[n] = {0};
for(ll i = 0; i < n-1; i++) if(a[i] > a[i+1]) {
c[0] += (a[i] - a[i+1]);
c[i+1] -= (a[i] - a[i+1]);
}
a[0]... | C++ | 6e6356adb23da0dfa38834a0e157524c | 22c3ac6bd3477f34c0e3edf5f92ae985 | 1,800 | PASSED |
#include <iostream>
#include <cstdio>
#include <set>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <string>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <fstream>
#include <iomanip>
//#include <uno... | C++ | 6e6356adb23da0dfa38834a0e157524c | c47a92cae0a99212d254d4ac3be7d7a4 | 1,800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define lli long long int
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int z;cin>>z;
for(int i=0;i<z;i++){
int n;cin>>n;
int arr[n];
for(int k=0;k<n;k++) cin>>arr[k];
in... | C++ | 6e6356adb23da0dfa38834a0e157524c | f14b00424a1f1815b0c6180640bfdff7 | 1,800 | PASSED |
#include<bits/stdc++.h>
#define ls (nd<<1)
#define rs (nd<<1|1)
using namespace std;
int n,cnt,ans,sum,l,r,tcnt,base;
int lsh[800010],L[200010],R[200010],a[1600010],s[1600010],ss[1600010];
void clr()
{
for(int i=1;i<=cnt+1;i++) a[i]=s[i]=ss[i]=0;
cnt=0;
}
int main()
{
int T;
int LL,RR,mid;
scanf("%d",&T);
lsh[... | C++ | 58d7066178839b400b08f39b680da140 | 2b5caf5ba51fd8378b869550e89539fc | 2,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N=200050;
int t,n;
int a[N<<3],b[N<<2],d[N<<3];
struct node
{
int x,y;
}c[N];
int main()
{
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
scanf("%d%d",&c[i].x,&c[i].y);
b[2*i-1]=c[i].x,b[2*i]=c[i].y;
}
sort(b+1,b+2*n+1);... | C++ | 58d7066178839b400b08f39b680da140 | f3e6d1845ed72825777a80e3b16d63c9 | 2,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define il inline
#define re register
#define debug printf("Now is Line : %d\n",__LINE__)
#define file(a) freopen(#a".in","r",stdin);freopen(#a".out","w",stdout)
//#define int long long
#define D double
#define inf 1234567890
#define mod 1000000007
il int read() {
re int... | C++ | 58d7066178839b400b08f39b680da140 | 8a21bd7ef10c767ef0fa79997716f441 | 2,300 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.