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;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
vector<float> a(n);
int sum = 0;
bool black = true;
long long b = 0;
long long w = 0;
for(int i = 0; i < n; ++i) {
cin >> a... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | 504b66df524de48d295f283a231a232b | 2,000 | PASSED |
//
// main.cpp
// KUTU
//
// Created by Naimul Hasan on 18/12/19.
// Copyright © 2019 Naimul Hasan. All rights reserved.
//
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <map>
#include <cmath>
#include <set>
#include <vector>
#include <cstdlib>
#include <queue>
#define ll ... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | 27358af8c3a5babac3767f53dc0cbd41 | 2,000 | PASSED |
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#define int long long
#define pb push_back
#define mp make_pair
#define all(v) v.begin(),v.end()
#define rep(i,start,lim) for(long long (i)=(start);i<(lim);i++)
#define boost ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define osit ostream_iterat... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | f058f9196247e68371c72f605c650031 | 2,000 | PASSED |
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#define int long long
#define pb push_back
#define mp make_pair
#define all(v) v.begin(),v.end()
#define rep(i,start,lim) for(long long (i)=(start);i<(lim);i++)
#define boost ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define osit ostream_iterat... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | c37c8463e65e26604d6e6c8266eec0e0 | 2,000 | PASSED |
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("fma,avx")
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define sz(a) (int) (a).size()
#define all(a) (a).begin(), (a).end()
#define x first
#define y second
bool more_or_equal(string &a, string &b) {
... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | 1d157f4a3b45c547abe5626689abbf88 | 2,000 | PASSED |
#include<bits/stdc++.h>
using namespace std;
long long ans=0;
int a[300005];
int n;
int main()
{
scanf("%d",&n);
int maxx=0;
ans=0;
int num1=0,num0=0;
for(int i=1;i<=n;i++)
{
scanf("%d",&a[i]);
ans+=a[i]/2;
if(a[i]%2)
{
if(i%2) num1++;
else num0++;
}
}
printf("%lld\n",ans+min(num1,num0));
retu... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | ef864411a153d8d2bb0b6e5c30f07411 | 2,000 | PASSED |
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <iomanip>
#include <assert.h>
#include <ctime>
#include <fstream>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#define null nullptr
using names... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | fae84346e50f4608860e5f127f1952d4 | 2,000 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main () {
long long n , temp = 0 , a[2] = {};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> temp;
a[1] += temp / 2 , a[0] += temp / 2 , a[i % 2] += temp % 2;
if (i == n - 1)
return cout << min(a[1] , a[0]), 0;
}
}
| C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | 9cb61932c2019ad4ae715c31f2b8b96d | 2,000 | PASSED |
#include<bits/stdc++.h>
#define int long long
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(v) (int) v.size()
#define TASK ""
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
void solve() {
int n... | C++ | 6ac3246ee9cf78d81f96a3ed05b35918 | e3cde22326f3eac72636963d959c6df5 | 2,000 | PASSED |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <stdint.h>
#include <cstring>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <algorithm>
#include <numeric>
#define PI 3.1415926536
using namespace std;
void readFile();
vector < pair < int, int > > omar;
bo... | C++ | 4abdd16670a796be3a0bff63b9798fed | 0f1048c60b3c390536ddc509888743b2 | 1,100 | PASSED |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <stdint.h>
#include <cstring>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <deque>
#include <algorithm>
#include <numeric>
#define PI 3.1415926536
using namespace std;
void readFile();
vector < pair < int, int > > omar;
bo... | C++ | 4abdd16670a796be3a0bff63b9798fed | 7278230c855f3f227bc6c267e7b4650f | 1,100 | PASSED |
#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
struct po{
int a,b;
};
vector<struct po> c;
//struct po c[2000];
bool compare1(po lhs,po rhs){
if(lhs.b > rhs.b)
return true;
else if(lhs.b < rhs.b)
return false;
if(lhs.a > rhs.a)
... | C++ | 4abdd16670a796be3a0bff63b9798fed | 12290e0d0d4e764f7925f7e2e192ed7c | 1,100 | PASSED |
#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
struct po{
int a,b;
};
//vector<struct po> c;
struct po c[2000];
bool compare1(po lhs,po rhs){
if(lhs.b > rhs.b)
return true;
else if(lhs.b < rhs.b)
return false;
if(lhs.a > rhs.a)
... | C++ | 4abdd16670a796be3a0bff63b9798fed | c1c3f2f67ffdb268e8165a19a286c27d | 1,100 | PASSED |
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#define N 1002
#define inf 1<<25
using namespace std;
struct point
{
int tp,bt;
}pnt[N],num[N];
bool cmp1(point p1,point p2)
{
if(p1.bt!=p2.bt) return p1.bt>p2.bt;
return p1.tp>p2.tp;
}
int main()
{
int n,tmp,cnt=1,numtp,numbt,numcnt=0,ansn... | C++ | 4abdd16670a796be3a0bff63b9798fed | d4d171929b9a01c569fc5934fb62dbce | 1,100 | PASSED |
/** coder Mohammad Al-Hussein *_^ */
#include <bits/stdc++.h>
#define ll long long
#define pi 3.1415926535897
#define eps 0.0000000001
#define F first
#define S second
#define All(v) v.begin(),v.end()
#define MAX 1e7
#define MIN 1e-7
#define mod 1000000007
#define read freopen("input.txt","r",stdin)
#define write freop... | C++ | 4abdd16670a796be3a0bff63b9798fed | efe57cf1d0c7bda202e21852aaf0ffc8 | 1,100 | PASSED |
/** coder Mohammad Al-Hussein *_^ */
#include <bits/stdc++.h>
#define ll long long
#define pi 3.1415926535897
#define eps 0.0000000001
#define F first
#define S second
#define All(v) v.begin(),v.end()
#define MAX 1e7
#define MIN 1e-7
#define mod 1000000007
#define read freopen("input.txt","r",stdin)
#define write freop... | C++ | 4abdd16670a796be3a0bff63b9798fed | 0bcaa91851c629f78d8ca1540e0bd274 | 1,100 | PASSED |
#include<iostream>
using namespace std;
int main(){
int n;
while(cin>>n){
int*a=new int [n];
int*b=new int [n];
int g=0,h=0;
for(int i=0;i<=n-1;i++){
cin>>a[i]>>b[i];
g+=b[i];
}
for(int j=0;j<=n-2;j++){
for(int k=j+1;k<=n-1;k++){
if(b[j]<b[k]){
int c=b[j]; b[j]=b[k]; b[k]=c;
int d=a... | C++ | 4abdd16670a796be3a0bff63b9798fed | bd3285976b4af2b7778f70d3f5688824 | 1,100 | PASSED |
# include<stdio.h>
# include<stdlib.h>
# include<string.h>
struct node
{
int a,b;
}card[1001];
int comp(const void * p1,const void * p2)
{
struct node * c = (node *)p1;
struct node * d = (node *)p2;
return d->a-c->a;
}
int main()
{
int n,i,num,ans,vis[1001],k;
while(scanf("%d",&n)!=EOF)
{... | C++ | 4abdd16670a796be3a0bff63b9798fed | d7fbe7678672032d1a2cc99aa1340d55 | 1,100 | PASSED |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stack>
#include <queue>
#include <string>
#include <string.h>
#include <iostream>
#include <algorithm>
using namespace std;
struct x{
int a;
int b;
friend bool operator<(x xx, x yy)
{
return xx.a > yy.a;
}
}x[100005];
int main()
{
... | C++ | 4abdd16670a796be3a0bff63b9798fed | e3e4fdbc5c1bdacbfe8e6236ba5f33ed | 1,100 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define SYNC ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
typedef pair<ll,ll> pll;
int main(){
SYNC;
ll n , m = 0, j , i , k = 0 , c = 0 , x = 0 , y = 0 ;
cin >> n;
ll a[n]... | C++ | ced70b400694fa16929d4b0bce3da294 | d112ba47bc1e7fd1852fb8b8a1c5a79c | 1,300 | PASSED |
#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
unsigned long long int i,t,s,ch,n,j,k,a[1010][1010];
int main()
{
cin >> n;
for (i =0; i<n;i ++)
for (j=0;j<n;j++)
cin >> a[i][j];
j = 1;i=0;
k = sqrt(a[i][j]*a[i+1][j+1]/a[i][j+1]);
i=1;
for(j=0; j < n; j++)
if (a[1][j] != 0)
... | C++ | ced70b400694fa16929d4b0bce3da294 | 604708d6c26b6e36d198c5d406f8aaa1 | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main ()
{
int n , i , j;
scanf("%d", &n);
long long int matriz [n][n] ;
for (i = 0 ; i < n ; i++)
for (j = 0 ; j < n ; j++) scanf("%lld", &matriz[i][j]);
long long int a = matriz[0][1] ;
long long int b = matriz[0][2] ;
long ... | C++ | ced70b400694fa16929d4b0bce3da294 | e39e4c2f1c649d93e5171fadfb09fff2 | 1,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
long long a[1005][1005];
int n;
int main()
{
ios_base::sync_with_stdio(false);
long long ans[1005];
cin>>n;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cin>>a[i][j];
}
}
ans[0]=sqrt(a[0][1]*a[0][2]/a[1][2]);
for(int i=1;i<n;i++){
ans[i]=a[0][i]/ans[0];
}
... | C++ | ced70b400694fa16929d4b0bce3da294 | 04e7fd4a0f9dd6854f3ba1cc3ae1cbfb | 1,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pii pair<int , int>
#define pll pair<long long , long long>
#define fi first
#define se second
#define N 505
#define mod 1000000007
#define double long double
#define INF 1e18 + 7
ll a[1005][1005];
ll ans[1005];
int main... | C++ | ced70b400694fa16929d4b0bce3da294 | d33ff9c620444f5506bc15ea8d2fb5a8 | 1,300 | PASSED |
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
long long m[1000][1000];
//ios_base::sync_with_stdio(0);
cin.tie(0);
for (int i = 0; i < n; ++i) {
for (int j = 0; j < n; ++j) {
cin >> m[i][j];
}
}
int a = sqrt(m[0][1] * m[0][2] / m[1][2]);
co... | C++ | ced70b400694fa16929d4b0bce3da294 | 457f979a61dcda2de334eba04dee23af | 1,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n;
cin>>n;
ll a[n][n];
for(ll i=0; i<n; i++){
for(ll j=0; j<n; j++){
cin>>a[i][j];
}
}
ll a0=(a[0][1]*a[0][2])/a[1][2];
a0=sqrt(a0);
cout<<a0<<" ";
for(... | C++ | ced70b400694fa16929d4b0bce3da294 | deb8ff0fee940dc2c80d7a9e840d66b8 | 1,300 | PASSED |
import java.io.*;
import java.util.*;
public class Main{
//public static Reader sc = new Reader();
public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException{
String s = br.readLine();
TreeSet<Character> tr = new TreeSet<... | Java | 1e107d9fb8bead4ad942b857685304c4 | 039831ae03d8a9784aaf5283c43d7a02 | 1,300 | PASSED |
import java.util.*;
public class B {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
char a[] = sc.next().toCharArray();
System.out.println("Mike");
char min = a[0];
for(int ... | Java | 1e107d9fb8bead4ad942b857685304c4 | 1842314ad911a16c65a45c721d34e7dd | 1,300 | PASSED |
import java.util.*;
import java.io.*;
public final class Codeforces{
public static void main(String[] args) throws IOException{
StringBuffer buff=new StringBuffer();
BufferedReader buffer=new BufferedReader(new InputStreamReader(System.in));
String s=buffer.readLine();
int n=s.length... | Java | 1e107d9fb8bead4ad942b857685304c4 | c121942e9205e4a5e853868b638959c3 | 1,300 | PASSED |
import java.awt.Point;
import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Winner {
static class Solver {
public void solve(MyReader in, PrintWriter out) {
String s = in.next();
int n = s.length();
char min = s.charAt(0);
boolean... | Java | 1e107d9fb8bead4ad942b857685304c4 | 2074faee828619a75564c5a08139f1dd | 1,300 | PASSED |
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.println(solve(s));
sc.close();
}
static String solve(Stri... | Java | 1e107d9fb8bead4ad942b857685304c4 | 80aab9802e62ed74ffb413c730351b36 | 1,300 | PASSED |
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
FastScanner sc=new FastScanner(System.in);
PrintWriter out=new PrintWriter(System.out);
S... | Java | 1e107d9fb8bead4ad942b857685304c4 | c27e3621b196f9363a7531e807547182 | 1,300 | PASSED |
import java.util.*;
import java.lang.*;
import java.io.*;
import java.awt.Point;
// SHIVAM GUPTA :
//NSIT
//decoder_1671
// STOP NOT TILL IT IS DONE OR U DIE .
// U KNOW THAT IF THIS DAY WILL BE URS THEN NO ONE CAN DEFEAT U HERE................
// ASCII = 48 + i ;// 2^28 = 268,435,456 > 2* 10^8 // log 10 base 2 = ... | Java | 1e107d9fb8bead4ad942b857685304c4 | fc966d70d8ab062d82a0f44e1c5825e2 | 1,300 | PASSED |
// practice with kaiboy
import java.io.*;
import java.util.*;
public class CF1220C extends PrintWriter {
CF1220C() { super(System.out); }
Scanner sc = new Scanner(System.in);
public static void main(String[] $) {
CF1220C o = new CF1220C(); o.main(); o.flush();
}
void main() {
byte[] cc = sc.next().getBytes()... | Java | 1e107d9fb8bead4ad942b857685304c4 | cbd21b110dc7deb572e3cf6f51ef84af | 1,300 | PASSED |
import java.util.*;
import java.io.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
String str = sc.next();
char arr[] = str.toCharArray(), minchar=arr[0];
out.println("Mike");
... | Java | 1e107d9fb8bead4ad942b857685304c4 | 77ff6e4e9a8d41aad18084e2a5dc0cbe | 1,300 | PASSED |
import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class Competetive {
public static void main(String[] args) {
FastScanner sc=new FastScanner();
PrintWriter out=new PrintWriter(System.out);
char s[]=sc.next().toCharArray();
out.println("Mike");
char c=s[0];
for(int i=1;i<s.length;... | Java | 1e107d9fb8bead4ad942b857685304c4 | 29daadc22721fa5cdcbfa37104950d5b | 1,300 | PASSED |
#include <iostream>
#include <cstring>
using namespace std;
char moves[100005];
void mers (int& x, int& y,int i,char moves[])
{
if (moves[i]=='R') x++;
else y++;
}
int main()
{
int n;
int x=0,y=0;
cin>>n;
cin.get();
cin.getline(moves, 100000);
int nr=0,pas=0,y1=0,x1=0;
for (int i=0;i... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | 46cb2261539b57c5f2dc29ba199781e2 | 900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
long long int output=0;
cin >> n;
string S;
for(int i=1;i<=n;i++)
{
char x;
cin >> x;
S.push_back(x);
}
bool side;
if(S[0] == 'U')
side = true;
else side = false;
... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | 6ed4f9aa23f9bb7bd322c1d0c118e10b | 900 | PASSED |
#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
using namespace std;
int ex,ey;
bool check(int x,int y,int ex1,int ey1)
{
// cout<<x<<" x"<<y<<" y"<<ex<<" ex"<<ey<<"ey"<<endl;
if((x>ex1&&y>=ey1)||(y>ey1&&x>=ex1))
{
// cout<<x<<" "<<y<<" "<<ex<<" "<<ey<<endl;
ex=min(x+1,y+1)... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | c08e5600b40220b14c0431e59efc1739 | 900 | PASSED |
#include <algorithm>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#define what_is(x) cerr << #x << " is " << x << endl;
#define rep(i, begin, end) for(__typeof(end) i = (begin) - ((begin) > (end)); i != (end... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | 9d4c054b81f36562f21ce7bb927c1071 | 900 | PASSED |
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int n;
string s;
cin >> n;
cin >> s;
bool b = s[0] == 'R';
int x = 0, y = 0, k = -1;
int length = s.length();
for(int i = 0; i < length; i++){
if(s[i] == 'R') x++;
else if(s[i] == 'U') y++;
if(b){
if(y > x) {
k++;
b = ... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | a032adf61e0b0b4ff33770759a5ada85 | 900 | PASSED |
#include <iostream>
using namespace std;
int main(){
int n,s=0,l=0,k=0;
string a;
cin>>n;
cin>>a;
for (int i=0;i<n;i++){
if (l==s&&a[i]==a[i-1])
k++;
if (a[i]=='U')
s++;
else if (a[i]=='R')
l++;}
cout<<k;
return 0;
}
| C++ | e4381bd9f22c0e49525cc05cc5cd2399 | ebe659bfac8c434098f3fb9d75242c32 | 900 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define clr(a, x) memset(a, x, sizeof(a))
#define mp(x, y) make_pair(x, y)
#define pb(x) push_back(x)
#define X first
#define Y second
#define fastin \
ios_base::sync_with_stdio(0); \
cin.tie(0);
typedef long long ll;
typedef long double ld;
typed... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | 2c59ae2470e1cf8b14f6ee095e156329 | 900 | PASSED |
#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define ll long long int
using namespace std;
int main()
{
fast;
ll n,m=0,i,j=0,l=0;
cin>>n;
string s;
cin>>s;
i=1;
int a[100002],b[100002];
a[0]=0;b[0]=0;
for(i=0;i<n;i++)
{
if(s[i]==... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | 8e376ef2ac701ca1263e550cf5a1b949 | 900 | PASSED |
#include <cstdio>
using namespace std;
int n,ans,x,y,fl;
char c;
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;++i)
{
scanf(" %c",&c);
if(c=='U') y++; else x++;
if(!fl) fl=x>y?1:2;
if(fl==1&&x<y) ans++,fl=2;
else if(fl==2&&x>y) ans++,fl=1;
}
printf("%d",ans);
return 0;
} | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | 3f24967a7e0dcb5851ea59580886bfa3 | 900 | PASSED |
//465,DIV2
#include <bits/stdc++.h>
using namespace std;
char arr[1000001];
char res[1000001];
int main()
{
long long int N,x=0,y=0,ct=0,i,px=0,py=0,tx=0,ty=0;
string str;
cin>>N;
cin>>str;
for(i=0;i<str.length();i++)
{
if(str[i]=='R')
{
x=x+1;
... | C++ | e4381bd9f22c0e49525cc05cc5cd2399 | 5b8143bf93f19f435dfe99a5c87f7d03 | 900 | PASSED |
import java.util.*;
import java.io.*;
import java.lang.*;
public class File {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Flat radius:
double R = sc.nextDouble();
// Flat coordinates:
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
// Fafa ... | Java | 29d4ca13888c0e172dde315b66380fe5 | add80bef14bdaa326f10d4b75769dc5a | 1,600 | PASSED |
// practice with kaiboy
import java.io.*;
import java.util.*;
public class CF935C extends PrintWriter {
CF935C() { super(System.out, true); }
Scanner sc = new Scanner(System.in);
public static void main(String[] $) {
CF935C o = new CF935C(); o.main(); o.flush();
}
void main() {
int R = sc.nextInt();
int x1... | Java | 29d4ca13888c0e172dde315b66380fe5 | bdf80909f1329f38dad9e049388479eb | 1,600 | PASSED |
import java.io.*;
import java.util.*;
import java.lang.*;
public class Rextester{
static double distance(double x1,double y1,double x2,double y2){
return Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2));
}
public static void main(String[] args)throws IOException{
BufferedReader br = new ... | Java | 29d4ca13888c0e172dde315b66380fe5 | b88cf621201f707cf3a0bf49509ea626 | 1,600 | PASSED |
import java.util.*;
import java.io.*;
import java.lang.*;
public class File {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Flat radius:
double R = sc.nextDouble();
// Flat coordinates:
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
// Fafa c... | Java | 29d4ca13888c0e172dde315b66380fe5 | f44cfb581d76ad65b9fdda31da34a69e | 1,600 | PASSED |
import java.util.*;
import java.io.*;
import java.lang.*;
public class File {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Flat radius:
double R = sc.nextDouble();
// Flat coordinates:
double x1 = sc.nextDouble();
double y1 = sc.nextDouble();
// Fafa c... | Java | 29d4ca13888c0e172dde315b66380fe5 | 1913f6f8d99b197d72886208f6b61c5f | 1,600 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N=1e4 +10;
int n;
string s;
vector<int> p[N];
void renew(int idx)
{
if (idx==0)
{
for(int i=0; i<n; ++i) s[i]=char(i %26 +'a');
}
else
{
for(int i=0; i<n; ++i)
{
int now='a'-1;
for(auto x: p[i]) s... | C++ | e9079292d6bb328d8fe355101028cc6a | 024cded13349759453622d0ab27b4cac | 2,200 | PASSED |
#include <iostream>
#include <vector>
#include <set>
#include <string>
#include <algorithm>
#include <cstring>
#include <map>
#include <random>
#include <chrono>
using namespace std;
const long long INF = 1LL << 50;
const int N = 101;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
char genChar... | C++ | e9079292d6bb328d8fe355101028cc6a | 6c0a732ae5bb8a634f5644858aeb3328 | 2,200 | PASSED |
/*
<3 <3 <3 Rose <3 <3 <3
BLACKPINK!
Ah yeah, ay yeah!
BLACKPINK!b
Ah yeah, ay yeah!
[Verse 1: Jennie]
Chakan eolgure geureochi mothan taedo
Ganyeorin mommae sok garyeojin volumeeun du baero
Geochimeopsi jikjin guji bojin anchi nunchi
Black hamyeon Pink urin yeppeujanghan Savage
[Verse 2: Lisa]
Wonhal ttaen daenoko ... | C++ | e9079292d6bb328d8fe355101028cc6a | da31ead5ccb93bd71161f466d2ba929d | 2,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main(){
string t;
cin>>t;
int n=t.length();
string s1="",s2="",s3="";
const string konstans="abcdefghijklmnopqrstuvwxyz";
for(int i=0;i<26;i++){
for(int j=0;j<26;j++){
for(int k=0;k<26;k++){
s1+=konstans[i];
... | C++ | e9079292d6bb328d8fe355101028cc6a | e4d0f34fb4b035345a4ea05b3fda5d8e | 2,200 | PASSED |
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
typedef long long ll;
typedef long double ld;
#define int ll
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) (int)x.size()
#define pii pair<int, int>
const int MOD = 1e9 + 7;
const int N =... | C++ | e9079292d6bb328d8fe355101028cc6a | bbf8ab78d0ada5b479b3ff3faf34617c | 2,200 | PASSED |
// arock - 2019-02-18
#include "assert.h"
#include <algorithm>
#include <iostream>
#include <map>
template <class T> T round_up(T num, T den) {
return num / den + ((num % den != 0) & ((num < 0) ^ (den > 0)));
}
std::string query(std::string s) {
std::cout << "? " << s << std::endl;
std::string t;
std::cin >> t;
... | C++ | e9079292d6bb328d8fe355101028cc6a | 3dd32952d9720c395b276e8f54ac7f55 | 2,200 | PASSED |
// arock - 2019-02-18
#include <iostream>
#include <map>
template <class T> T round_up(T num, T den) {
return num / den + ((num % den != 0) & ((num < 0) ^ (den > 0)));
}
std::string query(std::string s) {
std::cout << "? " << s << std::endl;
std::string t;
std::cin >> t;
return t;
}
int main() {
std::string t... | C++ | e9079292d6bb328d8fe355101028cc6a | ccdbc177536478805575f28e1b5b58ee | 2,200 | PASSED |
#ifdef LOCAL
#include "pre_template.h"
#else // start_pch
#ifdef LOCAL
#define dbg(x) (++depth, debug(x, #x##s))
#else
#define NDEBUG
#define dbg(x) (x)
#endif
#if 1
#define BEGIN_NS namespace {
#define END_NS }
#else
#define BEGIN_NS
#define END_NS
#endif
#include <bits/extc++.h>
#include <experimental/source_location... | C++ | e9079292d6bb328d8fe355101028cc6a | e8935981ad56c05b8d67aafa6dd88432 | 2,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
//#define endl '\n'
#define ff first
#define ss second
#define sz(v) (int)v.size()
#define int long long
#define pb push_back
#define f(i,l,r) for(ll i=l;i<=r;i++)
#define ... | C++ | e9079292d6bb328d8fe355101028cc6a | 9f4d4cdce1eac53c90dec3e3b470d718 | 2,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
//#define endl '\n'
#define ff first
#define ss second
#define sz(v) (int)v.size()
#define int long long
#define pb push_back
#define f(i,l,r) for(ll i=l;i<=r;i++)
#define ... | C++ | e9079292d6bb328d8fe355101028cc6a | dc3f4a82e6b23f7916b54f16fb23bf7e | 2,200 | PASSED |
#include"bits/stdc++.h"
using namespace std;
struct node{
int l, r;
friend bool operator < (const node &a, const node &b){
return a.l < b.l;
}
};
node a[1010];
int main(void)
{
int n, r;
while(cin >> n>> r)
{
int j = 0;
for(int i =0 ;i < n;i++)
{
int x;
cin >> x;
if(x == 1)
{
a[j].l = i... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | ac4c05c65d24580efad4355281bcc5b6 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N=1100;
const int inf=0x3f3f3f3f;
int a[N],b[N];
int solve(int n,int r){
int cnt=0;
for(int i=1;i<=n;++i)
if(a[i]) b[cnt++]=i;//记录第cnt盏路灯的位置
int pre=0;
int ans=0;
for(int i=0;i<cnt;++i){
if(b[i]-pre<=r)continue;//能够将(pre,b[i]]全部覆盖
if(i==0)return -1;... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | f141be69e3fae055559f4fd6b7d6fad8 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N=1100;
const int inf=0x3f3f3f3f;
int a[N],b[N];
int main(){
int n,r;
scanf("%d%d",&n,&r);
for(int i=1;i<=n;++i)
scanf("%d",&a[i]);
int cnt=0;
for(int i=1;i<=n;++i)
if(a[i]==1)b[++cnt]=i;
b[0]=-r+1;//区域[,0]
b[cnt+1]=n+r;//区域[n+1,]
int ans=0;
int pre... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | 7528302b95b09cb3678710d3d4dd3655 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int N=1100;
const int inf=0x3f3f3f3f;
int a[N],b[N];
int main(){
int n,r;
scanf("%d%d",&n,&r);
for(int i=1;i<=n;++i)
scanf("%d",&a[i]);
int cnt=0;
for(int i=1;i<=n;++i)
if(a[i]==1)b[++cnt]=i;
b[0]=-r+1;//区域[,0]
b[cnt+1]=n+r;//区域[n+1,]
b[cnt+2]=inf;
int ... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | 0e74ec8f5240f79a3878c818d2516630 | 1,500 | PASSED |
#include <bits/stdc++.h>
#define Nmax 1003
using namespace std;
int n, r, res=0, cur=1, nxt;
bool a[Nmax];
int main()
{
cin>>n>>r;
for (int i=1; i<=n; i++)
cin>>a[i];
for (nxt=min(n,cur+r-1); nxt>=cur; nxt--)
if (a[nxt])
{
cur=nxt;
res++;
break;
... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | b4551a184d6b919179e27867781c38b2 | 1,500 | 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;
template < typename T > using oset = tree < T, null_type, less < T >, rb_tree_tag, tree_order_statistics_node_update >;
// find_by_order(k) (k+1)th largest element
// or... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | 1894793e9d026281d2a7dea707409530 | 1,500 | PASSED |
#include<bits/stdc++.h>
#include <unistd.h>
using namespace std;
#define nl cout<<"\n"
#define pb push_back
#define se second
#define fi first
#define int long long
#define pi pair<int,int>
#define vpi vector<pi>
#define vvpi vector<vpi>
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#defi... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | 2175ea5ed6e33068b44993f5e21d59ea | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base:: sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n, r;
cin >> n >> r;
ll a[n];
for (ll i = 0; i < n; i++) cin >> a[i];
ll b[n];
fill(b, b + n, INT_MIN);
for (ll i = 0; i < n; i++... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | 428f719c522712564304792d2603f828 | 1,500 | PASSED |
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
//#include <numeric> //iota
//#include <sstream>
//#include <cstring>
//#include <tuple>
//#include <random>
//#include <string>
//#include <unordered_set>
//#include <bitset>
//#include <unordered_map>
//#include <stack>
//#includ... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | fd25ce4860b8e2792657a7ef6d5a047f | 1,500 | PASSED |
#include <iostream>
using namespace std;
int main() {
int a, r, v, c = 0;
int h[1000] = {};
cin >> a >> r;
h[0] = -1;
for (int i = 0; i < a; i++) {
cin >> v;
if (v == 1) {h[c] = i; c++;}
}
int cf = 0, res = 0;
int cc = 0;
bool avail = false;
while (cf < a) {
... | C++ | 001d8aca7c8421c3e54863f3fb706f0d | 38e7bdd200db951a117b96d4c097d22f | 1,500 | PASSED |
/* */
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <bitset>
#include <map>
#include <set>
const int MAX_LEN = 1010;
#define GETLINE(x) fgets(x,MAX_LEN,stdin);
using namespace std;
typedef long long int ll;
typ... | C++ | c175d010d75c391d0b25391fecff007c | ed46b962532ac96be6e8f169bd3d826c | 1,700 | PASSED |
#include<bits/stdc++.h>
#define ll long long
#define fir first
#define sec second
#define pb push_back
#define ins insert
#define be begin
#define en end
#define fast ios::sync_with_stdio(0),cin.tie(NULL),cout.tie(NULL)
using namespace std;
const ll oo=2e9;
vector<string>v;
pair<ll,ll>p;
map<int,int>mp;
//map<string,in... | C++ | c175d010d75c391d0b25391fecff007c | 313bd1cef49915b9dc351dc004651915 | 1,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int N = 1e3 + 7 ;
string arr[ N ] ;
int toInt(string s)
{
int ret;
stringstream ss(s);
ss>>ret;
return ret;
}
string toString(int a)
{
stringstream ss ;
ss << a ;
string ret;
ss>>ret;
return ret;
}
int n;
int main(){
int n;
cin>... | C++ | c175d010d75c391d0b25391fecff007c | 7f7c45931e2519aa5a8bcb24a32e922c | 1,700 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pi acos(-1.0)
#define eps 1e-9
#define X first
#define Y second
using namespace std;
int n;
vector<int> v;
int main(){
scanf("%d",&n);
int now=0;
bool ok=1;
for(int i=0;i<n;i++){
int x;
scanf("%d",&x);
int mi=19999;
for(int j=1;j<1... | C++ | c175d010d75c391d0b25391fecff007c | 62327ab0584a6fd27a608bded66043c3 | 1,700 | 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 double D;
typedef long double LD;
typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
typedef tree<int, null_type, less<int>, rb_tree_tag,... | C++ | c175d010d75c391d0b25391fecff007c | 413503ddf7f687a7b9f788367ab30a00 | 1,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> arr;
int main (int argc, char *argv[])
{
scanf("%d", &n);
arr.resize(n);
int last = 999;
for(int i = 0; i < n; ++i) {
scanf("%d", &arr[i]);
int new_arr = 9999;
for(int j = 0; j < 10; ++j) {
for(int k = 1; k < int(1e4); k *= 10) {
if(j... | C++ | c175d010d75c391d0b25391fecff007c | d9f1dfa0df9cef7e4ffe5800c6971124 | 1,700 | PASSED |
#include <bits/stdc++.h>
#include<unordered_set>
#define IO ios_base::sync_with_stdio(0);\
cin.tie(0);\
cout.tie(0);
#define L(i,n) for(int i=0;i<n;i++)
#define ll long long
#define endl '\n'
using namespace std;
const int N = 1e3 + 5;
int n;
int arr[N];
int main() {
bool nosoll = 0;
cin >> n;
for (... | C++ | c175d010d75c391d0b25391fecff007c | 4ade166cc68826c1d6ec021cc7cd405d | 1,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int y[maxn];
int main() {
int n; cin >> n;
for (int i = 1; i <= n; ++i) cin >> y[i];
y[0] = 1000;
for (int i = 1; i <= n; ++i) {
int ty = y[i], ans = maxn;
for (int j = 0, t = 1; j < 4; ++j, t *= 10) {
... | C++ | c175d010d75c391d0b25391fecff007c | f051614057d5f083f6a672e134a3dc44 | 1,700 | PASSED |
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int dp[1005][10];
char mp[1005][10];
int cmp(int i)
{
int j;
for(j=0;j<4;j++)
{
if(dp[i][j]>dp[i-1][j])
return 1;
if(dp[i][j]<dp[i-1][j])
return -1;
}
return 0;
}
bool judge(int i)
{... | C++ | c175d010d75c391d0b25391fecff007c | 396dbe9d26e0d3bc648b250febfdaac5 | 1,700 | PASSED |
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define F first
#define S second
#define int long long
#define ull unsigned long long
#define pb push_back
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered... | C++ | c175d010d75c391d0b25391fecff007c | 0efd690c59a5d147f9556d6bbade1e6e | 1,700 | PASSED |
#include<iostream>
#include<cmath>
#include<sstream>
#include<vector>
#include<iomanip>
#include<string>
#include<fstream>
#include<algorithm>
//#define _USE_MATH_DEFINES
#define M_PI 3.14159265358979323846 /* pi */
using namespace std;
int main() {
int n, k = 0, max = 0, maxs = 0;
long long sum = 0;... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | f5731c8f728f0222c097dd79229d7bc6 | 1,300 | PASSED |
#define _USE_MATH_DEFINES
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <string>
#include <float.h>
#include <cmath>
#include <map>
#include <sstream>
using namespace std;
long long int n,k,summ,toWrite[1000000],all;
struct box{
... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 109d1a226d8bee739e1187945e931744 | 1,300 | PASSED |
#include <unordered_set>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
using namespace std;
#define ll long long
int main()
{
ll n, s... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 4d9f346081b620d609ffba4094d45cbc | 1,300 | PASSED |
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <string>
#include <set>
#include <vector>
#include <algorithm>
#define endl "\n"
using namespace std;
int n;
int a[2000005];
int b[2000005];
//int f[2000005];
//int vt[2000005];
long long sum = 0;
vector<int> kq;
int timmax(int x)
{
if(x!=a[n])
... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 17e513af866e384eca4db6d12749ea54 | 1,300 | PASSED |
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <math.h>
#include <queue>
#include <string>
#include <string.h>
#include <map>
#include <vector>
#include <fstream>
using namespace std;
#define N 202400
#define M 1001000
//#define MAXN 1125899906842624L
#define MAXVAL 1000000000
... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | e5d875b1f1e804676b0d540dee455e32 | 1,300 | PASSED |
#include<iostream>
#include<cstdio>
using namespace std;
long long t,a[500000],ass[500000],rp,n,now,sum,maxx,maxn,scx,scn;
int main()
{
cin>>t;
rp=0;
now=0;
maxx=0;
scx=0;
for(int i=1; i<=t; i++)
{
cin>>a[i];
sum+=a[i];
if(a[i]>maxx) scx=maxx,maxx=a[i],maxn=i;
else
if(a[i]>=scx) scx=a[i];
}
for(int ... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 714b49ae01782c101217ebfe323f6ecd | 1,300 | PASSED |
#include<stdio.h>
int main()
{char rec[1000005]={0};
int a[200005],n,ans=0,num[200005];
long long int sum=0,half;
scanf("%d",&n);
for(int i=0;i<n;i++)
{scanf("%d",&a[i]);sum+=a[i];if(rec[a[i]]==0) rec[a[i]]=1;else rec[a[i]]=2;}
for(int i=0;i<n;i++)
if((sum-a[i])%2==0)
{half=(sum-a[i])/2;
if(half>1000000) continue;
if(... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 1d0c8f4ee0ecbde28bfb38bd894ead37 | 1,300 | PASSED |
#include <iostream>
#include <vector>
#include <cstring>
#include <string.h>
#include <iterator>
#include<math.h>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <tuple>
#include <limits.h>
#include <string>
#include <bitset>
#include <map>
#define endl cout<<"\n"
#define lli long long... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 460cee686876ce61e072d171492f2d1a | 1,300 | PASSED |
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <unordered_map>
#include <stack>
#include <memory.h>
#define ll... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 8c5f1ff8e120ff2ddae39267999c2136 | 1,300 | PASSED |
#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
typedef long long ll;
const int maxn=1e6+5;
ll a[maxn],b[maxn],t[maxn];
int n;
struct px
{
int val;
int i;
}T[maxn];
bool cmp(px aa,px bb)
{
return aa.val<bb.val;
}
int main... | C++ | 4cf0fe49f7ebf058317ac848043031a5 | 2e343e6c7716487bd2b6cacacba2a68b | 1,300 | PASSED |
#include<iostream>
using namespace std;
int main(){
int n,x,a,b;
int low,up;
cin >> n >> x;
low = -1;
up = 100000;
for (int i = 0; i < n; ++i)
{
cin >> a >> b;
if (a > b)
{
a = a + b;
b = a - b;
a = a - b;
}
... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 7a7cc98361e9e479b9ce0663937091d4 | 1,000 | PASSED |
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <cstring>
using namespace std;
#define MAXN 5000
#define INF 1000000000
int used[MAXN];
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen(... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 3c27b04fe091680b0276084354b37a73 | 1,000 | PASSED |
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <memory>
using namespace std;
int main(void)
{
int n,x,a,b;
scanf("%d%d",&n,&x);
vector<pair<int,int> > v;
vector<int> xx;
for (int i = 0 ; i < n; i++)
{
scanf("%d%d",&a,&b);
if (... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 874e733da4eea6a53e0d73ae2c1a9666 | 1,000 | PASSED |
#include<iostream>
#include<vector>
#include<string>
#include<fstream>
#include<algorithm>
#include<map>
#include<iomanip>
using namespace std;
int main()
{
int n,x; cin>>n>>x;
int a,b;
vector<pair<int,int> >v(n);
for(int i=0; i<n; ++i)
{
cin>>v[i].first>>v[i].second;
if(v[i].fi... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | f4df17ab069b743fd1d1c763fcc91d74 | 1,000 | PASSED |
#define _CRT_SECURE_NO_DEPRECATE
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <iostream>
#include <cmath>
#include <sstream>
#include <map>
#include <set>
#include <stack>
#include <cstring>
#include <ctime>
#include <cstdio>
#include <memory>
using namespace std;
#define pb push_b... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 548684334b2d2d58c342e53926356c92 | 1,000 | PASSED |
# include "conio.h"
# include "stdio.h"
# include "iostream"
# include "vector"
# include "algorithm"
# include <string>
# include "time.h"
# include "map"
using namespace std;
int mass[250][250];
struct house
{
int x;
int r;
};
bool comp (pair<int, int> a, pair<int, int> b)
{
return a.first<b.first;
}
b... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 275802349e73c60574651fc1d32f0923 | 1,000 | PASSED |
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int n, m;
int main() {
int p, q, max, min;
cin >> n >> m >> min >> max;
if (min > max) {
int temp = min;
min = max;
max = temp;
}
for (int i = 1; i < n; i++) {
cin >>... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 632d4e52973e272cc074bd5da22a07f9 | 1,000 | PASSED |
#include <iostream>
using namespace std;
const int inf=0x7fffffff;
int buf[2000]={0};
int dist=inf;
int min(int a,int b) { return a<b?a:b;}
void Swap(int &a,int &b) { int t=a;a=b;b=t;}
int main(void)
{
int n,x0;
cin>>n>>x0;
for(int i=1;i<=n;i++)
{
int a,b;
scanf("%d%d",&a,&b);
if(a>b) Swap(a,b);
for(int ... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 368f3c4d8929d748459e51cc5b3376cf | 1,000 | PASSED |
#include<stdio.h>
//||
//1 <= depor <= 100; 0<=dbob,distancias<=1000
int depor,dbob,dmin[1001],dmax[1001],smin,smax,k,j,l,m,n,min,max,aux1,aux2;
int main()
{
scanf("%d%d", &depor,&dbob);
for(k=0;k<depor;k++)
{
scanf("%d%d",&dmin[k],&dmax[k]);
if(dmin[k]>dmax[k])
{
aux2=... | C++ | 3c066bad8ee6298b318bf0f4521c7c45 | 2407e524e3dd5f7c476b8005e506b25c | 1,000 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.