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()
{
int t;
cin >> t;
while(t--)
{
int n,m,cnt=0; cin >> n >> m;
char s[n+2][m+2];
for(int i=0; i<n ; ++i)
{
for(int j=0; j< m; ++j)
{
cin >> s[i][j];
... | C++ | 3bf5d493813c5582200eca9248b357d3 | 698736b67776b6b38d15c6b36c4b2083 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,count ,counti,countj;
int t;
cin>>t;
while(t--){
count=0;counti=0;countj=0;
cin>>n>>m;
int k=n*m;
char arr[n*m];
for(int i=0;i<n*m;i++){
cin>>arr[i];
... | C++ | 3bf5d493813c5582200eca9248b357d3 | 0e7f51cc0ad7e14dd22317449c592349 | 1,200 | PASSED |
#include <bits/stdc++.h>
#define ll long long int
#define ld long int
#define nl "\n"
#define ss second
#define ff first
#define pb push_back
#define pp pop_back
#define mp make_pair
#define all(x) x.begin(), x.end()
using namespace std;
/*---------------------------------------------------------------... | C++ | 3bf5d493813c5582200eca9248b357d3 | e233225afabee219e3861cf62a7a2f70 | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
# define nl cout<<endl;
using ll = long long int;
using db =long double;
using str = string;
using pi = pair<int,int>;
using pl = pair<ll,ll>;
using pd = pair<db,db>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = ve... | C++ | 3bf5d493813c5582200eca9248b357d3 | 7e15816e7c36b5b394f0ff21786e769c | 1,200 | PASSED |
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#define endl '\n'
using namespace std;
const int MAXN = 510;
int n,m;
int a[MAXN][MAXN];
int get1(int i,int j){
return a[i][j]+a[i+1][j]+a[i+1][j+1]+a[i][j+1];
}
void solve(){
scanf("%d%d",&n,&m);
int cnt=0;
int mi1cnt=4;
for(int i=1;i<=n;i++){
for(... | C++ | 3bf5d493813c5582200eca9248b357d3 | d4bcab6f481246e34e7ccc261acf3499 | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int a[510][510];
int n,m;
struct ann{
int posi,posj;
}b[10];
int main()
{
int t;
cin>>t;
while(t--)
{
int n,m;
cin>>n>>m;
string s[n+10];
for(int i=0;i<n;i++)
cin>>s[i];
int tot=... | C++ | 3bf5d493813c5582200eca9248b357d3 | f8523842ae4a4e7ddd8845acef0887a1 | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#pragma GCC target ("avx2")
#pragma GCC optimization ("03")
#pragma GCC optimization ("unroll-loops")
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef unsigned char uc;
typedef string str;
// #define pb(a) push_back(a);... | C++ | 3bf5d493813c5582200eca9248b357d3 | 8dc5e6a303248364360cef4b46feaffa | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define PI (2.0*acos(0.0))
#define PB push_back
#define MP make_pair
#define all(x) x.begin(),x.end()
#define asort(x) sort(all(x));
#define dsort(x) sort(all(x), greater<int>())
#de... | C++ | 3bf5d493813c5582200eca9248b357d3 | 618b52374e7c430271f93c1613b28ff7 | 1,200 | PASSED |
#include <bits/stdc++.h>
using namespace std;
char g[505][505];
void solve () {
int n, m;
cin >> n >> m;
int tot = 0;
for (int i = 0; i < n; i ++) {
for (int j = 0; j < m; j ++) {
cin >> g[i][j];
if (g[i][j] == '1') tot ++;
}
}
int Mx = 0;
for (int i = 0; i < n; i ++) {
for ... | C++ | 3bf5d493813c5582200eca9248b357d3 | f33158ccb7345a9c406094e22a5bd0fc | 1,200 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int a[100010];
int main(){
int t;cin>>t;while(t--){
int n;cin>>n;
for(int i=1;i<=n;i++)cin>>a[i];
sort(a+1,a+1+n);
cout<<a[n]+a[n-1]-a[1]-a[2]<<endl;
}
}
| C++ | 1e54530bc8cff81199b9cc1a6e51d638 | 4fc527bb7dd572727a37f81ab9339023 | 800 | PASSED |
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <iomanip>
#include <bit>
int main()
{
std::ios_base::sync_with_stdio(0);
std::cin.tie(0);
std::cout.tie(0);
int T{};
std::cin >> T;
f... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | 1212578b9b811d986b8ea20b5aac8156 | 800 | PASSED |
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <iomanip>
#include <bit>
int main()
{
std::ios_base::sync_with_stdio(0);
std::cin.tie(0);
std::cout.tie(0);
int T{};
std::cin >> T;
f... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | 9ba3be7cdb76f13ef61414c99053f7f1 | 800 | PASSED |
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <iomanip>
#include <bit>
int main()
{
std::ios_base::sync_with_stdio(0);
std::cin.tie(0);
std::cout.tie(0);
int T{};
std::cin >> T;
f... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | 33ab9ac36fb8be560a9984f1460d3105 | 800 | PASSED |
#include <bits/stdc++.h>
#include <vector>
#include <set>
using namespace std;
#define ll long long
#define MAX 10000000000
#define vll vector<ll>
#define deb cout<<"FU"<<endl
#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#define ff first
#define ss second
#define pb push_back
#define pf push_front... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | dd6718f96a46b13af297b2f6ddedf442 | 800 | PASSED |
#include "bits/stdc++.h"
using namespace std;
#define infinity 1<<30 //2^30
#define ll long long
#define pb push_back
#define FastIO ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)
#define pi 3.14159265358979323846
#define INF 99999999
#define ff first
#define ss second
#define nnn 100000007
#define MAX_N 20
#de... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | 0b31b3a7918e559ddec84205f196df26 | 800 | PASSED |
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[100086];
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
sort(a, a + n);
int num = a[n - 1] + a[n - 2] - a[0] - a[1];
... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | 38956605ac628049c9a208acc8a34cc0 | 800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
typedef long ll;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int q;cin>>q;
while(q--)
{
ll w;cin>>w;
vector<ll>v(w);
for(ll i=0;i<w;i++)
cin>>v[i];
sort(v.begin(),v.end());
cout<<v[w-1]-v[0... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | a5373d5687432c5a422ec30e8f1525bd | 800 | PASSED |
#include <iostream>
using namespace std;
int main()
{
int t,max1,max2,min1,min2,n,i,j,a,s;
cin>>t;
for(i=0;i<t;i++)
{
cin>>n;
cin>>a;
max1=a;
min1=a;
cin>>a;
max2=a;
min2=a;
if(max1>max2)
{
s=max1;
max1=max2;
max2=s;
}
if(min1<min2)
{
s=min1;
min1=min2;
min2=s;
}
for(j=... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | dc7fac009ae5dfc4e9eb9112f182987f | 800 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef long double ld;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
vector<ll> vec;
ll n;
int main() {
fastInp;
ll t;
cin >> t;
while (t--) {
cin >> n;
vec.resize(n);
for (a... | C++ | 1e54530bc8cff81199b9cc1a6e51d638 | 35d87ce11069e8efc1e63520b5dc574a | 800 | PASSED |
/*
Author:your mom
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod=1e9+7;
#define IOS ios::sync_with_stdio(0); cin.tie(0);
void solve()
{
int a,b,c,d;
cin >> a >> b >> c >> d;
if(a==0)
{
if(c==0)
{
cout << 0 << '\n'... | C++ | c2a506d58a80a0fb6a16785605b075ca | c159e94be8d2f3349bce1187c573623b | 900 | PASSED |
#define _CRT_SECURE_NO_WARNINGS // for scanf and printf
#include <bits/stdc++.h>
using namespace std;
/*Policy based Data structures*/
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies... | C++ | c2a506d58a80a0fb6a16785605b075ca | f0065056f4dc185f9f9f8b025ad598b6 | 900 | PASSED |
// #include<bits/stdc++.h>
// #define ll long long
// #define ull unsigned long long
// #define pb push_back
// const int MAXN = 1e6 + 10;
// // int a[MAXN];
// using namespace std;
// void JiuCherish(){
// int a,b,c,d;
// cin >> a >> b >> c >> d;
// if(a/gcd(a,b) == c/gcd(c,d) && b/gcd(a,b) == ... | C++ | c2a506d58a80a0fb6a16785605b075ca | 47d9a7aaad9bddd331299e50a220e20d | 900 | PASSED |
// #include<bits/stdc++.h>
// #define ll long long
// #define ull unsigned long long
// #define pb push_back
// const int MAXN = 1e6 + 10;
// // int a[MAXN];
// using namespace std;
// void JiuCherish(){
// int a,b,c,d;
// cin >> a >> b >> c >> d;
// if(a/gcd(a,b) == c/gcd(c,d) && b/gcd(a,b) == ... | C++ | c2a506d58a80a0fb6a16785605b075ca | a6d8dbe5279a8d8029f21f8879c0b05d | 900 | PASSED |
#include<bits/stdc++.h>
using namespace std;
void evaluate(){
long long a,b,c,d;
cin>>a>>b>>c>>d;
long long x=a*d, y = b*c;
if(x==y)cout<<0<<endl;
else if((x!=0 && y%x==0)||(y!=0 && x%y==0))cout<<1<<endl;
else cout<<2<<endl;
}
int main(){
int t; cin>>t;
while(t--)evaluate();
... | C++ | c2a506d58a80a0fb6a16785605b075ca | efc9965a68dac0864719b346a6ea13f0 | 900 | PASSED |
#include <bits/stdc++.h>
#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define endl '\n'
using namespace std;
int mod = 1000000007;
/*
استعن بالله ولا تعجز
*/
ll lcm(ll a, ll b)
{
return (((a/ __gcd(a,b))*b));
}
int main()
{
fast;
int t;cin>... | C++ | c2a506d58a80a0fb6a16785605b075ca | 0fd8ef200e60b0f7f805eee750fc3b62 | 900 | PASSED |
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
typedef long long int ll;
typedef double db;
#define vi std::vector<int>
#define vll std::vector<ll>
#define mii std::map<int, int>
#define si std::set<int>
#define al(v) v.begin(), v.end()
#define out(val) {cout << val << endl;}
#define outs(val) {cout ... | C++ | c2a506d58a80a0fb6a16785605b075ca | ea8269f5508d1deb41caecb8e58ae678 | 900 | PASSED |
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <iomanip>
#include <bit>
int main()
{
std::ios_base::sync_with_stdio(0);
std::cin.tie(0);
std::cout.tie(0);
int T{};
std::cin >> T;
f... | C++ | c2a506d58a80a0fb6a16785605b075ca | 132298f1dae01d5a3c3b3f71e76d3f18 | 900 | PASSED |
#include <iostream>
#define fast std::ios_base::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0)
#define sfor(i, l, r) for (int i = l; i <= r; ++i)
#define bfor(i, r, l) for (int i = r; i >= l; --i)
#define all(a) a.begin(), a.end()
using ll = long long;
void solve() {
ll a, b, c, d;
std::cin... | C++ | c2a506d58a80a0fb6a16785605b075ca | 2bd13055e3957378baecd065bef16e00 | 900 | PASSED |
#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <iomanip>
#include <bit>
int main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
int T{};
std::cin >> T;
for (int k{ 0 ... | C++ | c2a506d58a80a0fb6a16785605b075ca | 9987afa5749e685f003260093a650420 | 900 | PASSED |
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
#define popcount(i) __builtin_popcount(i)
template<typename X, typename Y> bool umin(X& x, const Y& y) { return (y < x) ? (x = y, 1) : 0; }
template<typename X, typename Y> bool umax(X& x, const Y& y) { return (x < y) ? (x = y, 1) : 0; }
const int ... | C++ | 41359a6dbfb0bf0887fef84ac748983a | 515eb63cb96eebbe5066f29486b92c4c | 2,400 | PASSED |
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
#define popcount(i) __builtin_popcount(i)
template<typename X, typename Y> bool umin(X& x, const Y& y) { return (y < x) ? (x = y, 1) : 0; }
template<typename X, typename Y> bool umax(X& x, const Y& y) { return (x < y) ? (x = y, 1) : 0; }
const int ... | C++ | 41359a6dbfb0bf0887fef84ac748983a | 6c6287972d5cd89268853030d81fffc3 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
#define popcount(i) __builtin_popcount(i)
template<typename X, typename Y> bool umin(X& x, const Y& y) { return (y < x) ? (x = y, 1) : 0; }
template<typename X, typename Y> bool umax(X& x, const Y& y) { return (x < y) ? (x = y, 1) : 0; }
const int ... | C++ | 41359a6dbfb0bf0887fef84ac748983a | 34d22dc5b9722f2dcf715f8945898e99 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
#define popcount(i) __builtin_popcount(i)
template<typename X, typename Y> bool umin(X& x, const Y& y) { return (y < x) ? (x = y, 1) : 0; }
template<typename X, typename Y> bool umax(X& x, const Y& y) { return (x < y) ? (x = y, 1) : 0; }
const int ... | C++ | 41359a6dbfb0bf0887fef84ac748983a | 2f3b993022f851b6cf0ca767b3210661 | 2,400 | PASSED |
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
#define popcount(i) __builtin_popcount(i)
// template<typename X, typename Y> bool umin(X& x, const Y& y) { return (y < x) ? (x = y, 1) : 0; }
// template<typename X, typename Y> bool umax(X& x, const Y& y) { return (x < y) ? (x = y, 1) : 0; }
cons... | C++ | 41359a6dbfb0bf0887fef84ac748983a | 93397467ef0d7f386930092296ba0944 | 2,400 | PASSED |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int maxlog = 30;
const int maxn = 300000;
int nodes[maxn * maxlog + maxlog][2];
int nodev[maxn * maxlog + maxlog][2];
int last;
inline int f() {
nodes[last][0] = 0;
nodes[last][1] = 0;
nodev[last][0] = 0;
nodev[las... | C++ | 41359a6dbfb0bf0887fef84ac748983a | a0be656729c76ac49337349f57e6a4c9 | 2,400 | PASSED |
#include<bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
typedef pair<ll,ll>... | C++ | 41359a6dbfb0bf0887fef84ac748983a | e7f331b8a6a8b1f4e3afa3e51a4ef547 | 2,400 | PASSED |
// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#inc... | C++ | 41359a6dbfb0bf0887fef84ac748983a | fdcf261c9e3512d796c60f144b91bdd8 | 2,400 | PASSED |
#include <iostream>
#include <cmath>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <utility>
#include <map>
#include <unordered_map>
#include <vector>
#include <climits>
#include <string>
#include <queue>
#include <stack>
#include <iomanip>
#include <numeric>
#include <chrono>
#i... | C++ | 41359a6dbfb0bf0887fef84ac748983a | 4d867a6c6d9808e787249e58d055e1a9 | 2,400 | PASSED |
#include <iostream>
#include <cmath>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <utility>
#include <map>
#include <unordered_map>
#include <vector>
#include <climits>
#include <string>
#include <queue>
#include <stack>
#include <iomanip>
#include <numeric>
#include <chrono>
#i... | C++ | 41359a6dbfb0bf0887fef84ac748983a | 86ef85380517e055cb62d03a90dbdfa7 | 2,400 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 500 + 7;
const int INF = (int) 1e9 + 7;
int n, k, a[N][N], dp[N][N], y, gd[N][N];
int mn_row[N * N], mn_col[N * N];
int mx_row[N * N], mx_col[N * N];
set<int> s;
void print() {
for (int i = 1; i <= n; i++) {
for (... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | 9ac10c45e6f800bdaf2d629229a6b6f8 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
signed main() {
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifdef ONPC
freopen("in.txt", "r", stdin);
#endif
int n, k;
cin >> n >> k;
vector<vector<int>> a(n, ve... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | e754e005711a271d4dcac79e59665dd7 | 2,700 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
signed main() {
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifdef ONPC
freopen("in.txt", "r", stdin);
#endif
int n, k;
cin >> n >> k;
vector<vector<int>> a(n, ve... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | 91bb21ed16a82166fb2c6aaf9c1e5c65 | 2,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
void solve() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector A(n, vector<int>(n));
vector<vector<pair<int, int>>> F(n * n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> A[i][j];
A[i][j]--;
F[A[i]... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | 8c8c47bc5c2efd3e7f97ec1acb260b77 | 2,700 | PASSED |
#include <bits/stdc++.h>
int main() {
using namespace std;
int N, K;
cin >> N >> K;
vector A(N, vector<int>(N));
vector<vector<pair<int, int>>> F(N * N);
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> A[i][j];
A[i][j]--;
F[A[i][j]].emplace_back(i, j);
}
}
int... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | b8f4cbd9727e6e65805a3762336ac87e | 2,700 | PASSED |
#pragma GCC optimize "tree-vectorize"
#pragma GCC target "movbe,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,aes,pclmul,fsgsbase,rdrnd,fma,bmi,bmi2,f16c,rdseed,clflushopt,xsavec,xsaves,adx,prfchw,lzcnt,abm"
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include <array>
#i... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | fd6ebbd4b42ca578aa14e621265d1664 | 2,700 | PASSED |
// #pragma GCC optimize "tree-vectorize"
// #pragma GCC target "movbe,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,aes,pclmul,fsgsbase,rdrnd,fma,bmi,bmi2,f16c,rdseed,clflushopt,xsavec,xsaves,adx,prfchw,lzcnt,abm"
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include <arra... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | f7ba2e1705dbd8776fc212bb1380b110 | 2,700 | PASSED |
//#pragma GCC optimize "tree-vectorize"
//#pragma GCC target "movbe,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,aes,pclmul,fsgsbase,rdrnd,fma,bmi,bmi2,f16c,rdseed,clflushopt,xsavec,xsaves,adx,prfchw,lzcnt,abm"
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include <array>... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | 544a869bfd1a4b51a1b64e36e9e4d132 | 2,700 | PASSED |
//#pragma GCC optimize "tree-vectorize"
//#pragma GCC target "movbe,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,aes,pclmul,fsgsbase,rdrnd,fma,bmi,bmi2,f16c,rdseed,clflushopt,xsavec,xsaves,adx,prfchw,lzcnt,abm"
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include <array>... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | c9f2124cdd70b05ab82c9ccc328438cf | 2,700 | PASSED |
//#pragma GCC optimize "tree-vectorize"
//#pragma GCC target "movbe,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,aes,pclmul,fsgsbase,rdrnd,fma,bmi,bmi2,f16c,rdseed,clflushopt,xsavec,xsaves,adx,prfchw,lzcnt,abm"
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include <array>... | C++ | 54977111c4d27acd57ee563a5ddfecf2 | 137dc85dcb53c9df1c386f6d14777ae9 | 2,700 | PASSED |
#include<bits/stdc++.h>
using namespace std;
constexpr int N = 55;
int a[N];
int main()
{
int t; cin >> t;
while (t--)
{
int n; string s;
cin >> n >> s;
string s1 = s;
sort(s.begin(), s.end());
int ans = 0;
for (int i = 0; i < n; i++)
{
if (s[i] != s1[i])ans++;
}
cout << ans << endl;
}
}
... | C++ | 58ee86d4913787582ccdb54073656dc0 | 4dd101967adc80098c38dc0d4c0a3dbf | 800 | PASSED |
#include<bits/stdc++.h>
#include<string.h>
using namespace std;
int main()
{
char a[50],b[50];
int n,m;
cin>>n;
for(int i=1;i<=n;i++)
{
int ans=0;
cin>>m;
for(int j=0;j<m;j++)
{
cin>>a[j];
b[j]=a[j];
}
sort(a,a+m);
for(int j=0;j<m;j++)
if(a[j]!=b[j])
ans++;
cout<<ans<<endl;... | C++ | 58ee86d4913787582ccdb54073656dc0 | 2415020d71157607311d2759c3d8b579 | 800 | PASSED |
#include<iostream>
#include<algorithm>
#include<string.h>
#include<math.h>
using namespace std;
int main()
{
int n;
scanf("%d",&n);
while(n--)
{
int len,num=0;
string a,b;
scanf("%d",&len);
cin>>a;
b=a;
sort(a.begin(),a.end());
for(int i=0;i<len;i++){
if(a[i]!=b[i]){
num++;
}
}
printf("%... | C++ | 58ee86d4913787582ccdb54073656dc0 | 41ba3bf50ad041c61ce1946e8e049d89 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int32_t main()
{
int t; cin >> t; while(t--) {
int n ; cin >> n;
string s ,ans; cin >> s;
ans = s;
sort(s.begin() , s.end());
int cnt = 0;
for(int i = 0 ; i < n; i++) {
if(s[i] != ans[i]) cnt++;
}
cout << cnt << endl;
}
return 0;
}
... | C++ | 58ee86d4913787582ccdb54073656dc0 | 42a7a8661f0e8a4e5648ee1d4e4b764e | 800 | PASSED |
#include<iostream>
//#include<bits/stdc++.h>
#include<string>
#include<cmath>
#include<math.h>
#include<algorithm>
using namespace std;
void fast() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
}
long long frq[2000005];
int main() {
fast();
int t;
char c;
cin >> t;
while (t--) {
int n, x... | C++ | 58ee86d4913787582ccdb54073656dc0 | 6073a8c671a7cf395de332ea63b2fb04 | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
# define pb push_back
const int MAX_IN = 1e6 + 5;
int frq1[MAX_IN];
bool cmp (string a, string b)
{
return a.size() < b.size();
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;cin>>t;
while(t--)
{
... | C++ | 58ee86d4913787582ccdb54073656dc0 | 75fe9bbfa9c1846d8abb1710461c5351 | 800 | PASSED |
#include <bits/stdc++.h>
#define fastio ios::sync_with_stdio(false);
#define MAXN 10000000
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define LOOP(i, n, s) for (; (i) < (n); (i) += (s))
#define endl '\n'
using namespace std;
using ii = pair<int, int>;
using ll = long long int;
int solve(string s) {
string t = ... | C++ | 58ee86d4913787582ccdb54073656dc0 | 384ab58a5fc348c4284d869f530d592b | 800 | PASSED |
#include <iostream>
#include <algorithm>
using namespace std;
int solve(int size, string s)
{
string original = s;
int contador = 0;
sort(s.begin(), s.end());
for (int i = 0; i < size; i++)
if (original[i] != s[i])
contador++;
return contador;
}
int main()
{
int te... | C++ | 58ee86d4913787582ccdb54073656dc0 | 336dd6a63ce5119d1c58cfcb56039191 | 800 | PASSED |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ll t,n;
cin>>t;
while(t--){
cin>>n;
string s,x;
cin>>s;
x=s;
sort(x.begin(),x.end());
ll ans=0;
for(int i=0;i<s.size();i++)
if(s[i]!=x[i])
ans++;
cout<<ans<<"\n";
}
return ... | C++ | 58ee86d4913787582ccdb54073656dc0 | f42dc47597c269eed9f2b9021a1ad6ac | 800 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int size;
cin>>size;
while(size--)
{
int cnt=0;
vector<int>v;
int y;
cin>>y;
string p;
cin>>p;
for(int i=0;i<p.size();i++)
{
v.push_back(p[i]); ... | C++ | 58ee86d4913787582ccdb54073656dc0 | e6bc936b0a4b95b886aa801a48ac2d4d | 800 | PASSED |
// clang-format off
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define LOG(n) 31 - __builtin_clz(n)
#define nl "\n"
#define ok cout << "OK\n"
#define ios \
ios_base::sync_with_stdio(fal... | C++ | 8d9fc054fb1541b70991661592ae70b1 | 6270f2272735b3c8b8e3dc884946029d | 1,500 | PASSED |
#include<bits/stdc++.h>
#pragma GCC optimize "trapv"
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define endl '\n'
#define ll long long
//const ll N = 2e5 + 2;
const int N = 1e6 + 2;
template<typename T>
#define eff ios_base::sync_with_... | C++ | 8d9fc054fb1541b70991661592ae70b1 | fb40b94943f624104ba2e6d21fdc7723 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 3e5 + 5,mod =1e9+7;
const ll oo =1e18;
ll arr[N];
struct Ath{
int index;
int races[5];
bool operator < (const Ath &oth)const{
int cnt=0;
for (int i = 0; i < 5; ++i) {
cnt+=(races[i]>oth.races[i]);
... | C++ | 8d9fc054fb1541b70991661592ae70b1 | b774f7710539ce4ecc1447519c9748bd | 1,500 | PASSED |
//:::: Alien :::://
// Muhammad Eid //
#include <bits/stdc++.h>
using namespace std;
void Alien35() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
#ifndef ONLINE_JUDGE
freopen("test.in", "rt", stdin);
freopen("test.out", "wt", stdout);
#endif
}
const int N = 1e6 + 5, OO ... | C++ | 8d9fc054fb1541b70991661592ae70b1 | 3e937f0bdfdcff2435ba0661a2614d37 | 1,500 | PASSED |
#include <bits/stdc++.h>
const int n = 100005;
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n, ar[50005][5];
cin >> n;
for (int i = 1; i <= n; i++)
{
for (int j = 0; j < 5; j++)
cin >> ar[i][j];
}
int w ... | C++ | 8d9fc054fb1541b70991661592ae70b1 | 7d3def0c783beebaf5fb10f0619126e9 | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
const int MAXINT = 5e5+5;
int fr[MAXINT];
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using deq = deque<int> ;
using sti = stack <int> ;
using stc = stack <char> ;
#define all(x) begin(x), end(x)... | C++ | 8d9fc054fb1541b70991661592ae70b1 | b99f759f921089c9b73d95b2a111d926 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0),cin.tie(NULL),cout.tie(NULL);
#define endl "\n"
#define ll long long
struct sor {
string f;
int s ;
};
bool comp1(sor&f,sor&s ){return f.s > s.s; }
bool comp(pair<int , int > &a , pair<int , int > & b ){return a.second < b.second;... | C++ | 8d9fc054fb1541b70991661592ae70b1 | a15816bebc46b725ba5f7ec49ae93140 | 1,500 | PASSED |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define forni(x, n) for(int i = x; i<(n); i++)
#define fornj(x, n) for(int j = x; j<(n); j++)
#define inarr(n, arr) for(int i = 0; i<(n); i++)cin>>arr[i]
#define outarr(arr, sep) for(auto i : arr)cout<<i<<sep
#defin... | C++ | 8d9fc054fb1541b70991661592ae70b1 | c47847da805034abb93cf9ddc98c1dc9 | 1,500 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int main() {
int t ;
cin >>t ;
while ( t-- )
{
int n ;
cin >> n ;
int athleate [n+1][5+1];
for ( int i =1 ; i <=n ; i ++ )
{
for(int j =1 ; j<=5 ; j++ )
{
cin... | C++ | 8d9fc054fb1541b70991661592ae70b1 | 3c51f5c781d1cb6c116e01b1533f7f2e | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef bitset<70> Mask; // for bit mask operations
#define FORI(s, e) for(int i = s; i < e; i++)
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int N = 2e6 + 7; // means 1 million + 1 == 1000001;
const ll prime_mod = 1e9... | C++ | 8d9fc054fb1541b70991661592ae70b1 | 20c99a69106279da3e7dae00b1c17bae | 1,500 | PASSED |
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define fast ios::sync_with_stdio(false);cin.tie(0);
typedef long long ll;
short n;
const int nax = 2e6 + 10;
short hv[11][nax];
short at = 0;
int a[11];
void solve(){
cin>>n;
bool fnd = false;
for(i... | C++ | e8e32f179080f9d12bb1e4df303ea124 | db2d99baa0bfcdc6c9104a899a898ce2 | 1,800 | PASSED |
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <list>
#include <fstream>
#include <deque>
#include <set>
#include <unordered_map>
#include <queue>
#include <functional>
#include <numeric>
#include <cmath>
#include <bitset>
#include <map>
#include <stack>
#incl... | C++ | e8e32f179080f9d12bb1e4df303ea124 | 25f88ef481f979b0ec63d807a4e78b63 | 1,800 | PASSED |
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <list>
#include <fstream>
#include <deque>
#include <set>
#include <unordered_map>
#include <queue>
#include <functional>
#include <numeric>
#include <cmath>
#include <bitset>
#include <map>
#include <stack>
#incl... | C++ | e8e32f179080f9d12bb1e4df303ea124 | cb90b82bb0b76034ca5c58383a13e904 | 1,800 | PASSED |
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <list>
#include <fstream>
#include <deque>
#include <set>
#include <unordered_map>
#include <queue>
#include <functional>
#include <numeric>
#include <cmath>
#include <bitset>
#include <map>
#include <stack>
#incl... | C++ | e8e32f179080f9d12bb1e4df303ea124 | adb5235d4f4d8b059ac14f4d2d33d7a0 | 1,800 | PASSED |
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <list>
#include <fstream>
#include <deque>
#include <set>
#include <unordered_map>
#include <queue>
#include <functional>
#include <numeric>
#include <cmath>
#include <bitset>
#include <map>
#include <stack>
#incl... | C++ | e8e32f179080f9d12bb1e4df303ea124 | 0afbc9b0366dab89daf7dfca94f19778 | 1,800 | PASSED |
#ifndef ONLINE_JUDGE
#include "r.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define debug(x...)
#define endl '\n'
#define pii pair<int,int>
#endif
const int MAX_N = 1e6 + 1;
int dp[11][MAX_N+2] = {0};
void solve() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++... | C++ | e8e32f179080f9d12bb1e4df303ea124 | a5f93a5a6c084116a34d8bea09516606 | 1,800 | PASSED |
#ifndef ONLINE_JUDGE
#include "r.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define debug(x...)
#define endl '\n'
#define pii pair<int,int>
#endif
const int MAX = 1e6 + 1;
int dp[11][MAX] = {0};
void solve() {
int n;
cin >> n;
vector<int> a(n);
int MAX_N = 0;
for (int i =... | C++ | e8e32f179080f9d12bb1e4df303ea124 | 8a44354348b61c773847c309a899ff15 | 1,800 | PASSED |
#ifndef ONLINE_JUDGE
#include "r.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define debug(x...)
#define endl '\n'
#define pii pair<int,int>
#endif
const int MAX_N = 1e6 + 1;
int dp[11][MAX_N] = {0};
void solve() {
int n;
cin >> n;
vector<int> a(n);
int MAX_N = 0;
for (int... | C++ | e8e32f179080f9d12bb1e4df303ea124 | ab1f290de1d97c88c0b2de3fba473b92 | 1,800 | PASSED |
#ifndef ONLINE_JUDGE
#include "r.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define debug(x...)
#define endl '\n'
#define pii pair<int,int>
#endif
void solve() {
int n;
cin >> n;
vector<int> a(n);
int MAX_N = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
a... | C++ | e8e32f179080f9d12bb1e4df303ea124 | 376c28c65d767158aa62f56f2584c69d | 1,800 | PASSED |
//My big big moon , I love you so much that I feel lonely.
#pragma GCC optimize(3,"Ofast","inline")
#include<bits/stdc++.h>
#define SIZ(a) (long long)a.size()
#define endl '\n'
#define AC return
#define fr first
#define sc second
#define mem(a,x) memset(a,x,sizeof(a))
#define multi long long _; cin >> _;... | C++ | e8e32f179080f9d12bb1e4df303ea124 | b11b33f823bf5e90696535f174604ef0 | 1,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
const int local = 0;
int lx, rx, ly, ry;
int ask(int A, int B) {
vector<array<int, 2>> pts;
for(int x = 1; x <= 200; x++)
for(int y = 1; y <= 200; y++) if(x%A == 0 && y%B == 0)
pts.push_back({x, y});
if(pts.empty()) return 0;
if(!local) {
cout << "? " <... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | 10811ed593a3011e92e32d3014211ac2 | 3,300 | PASSED |
// 从未在意的名字永远不会被提起 - 雪葉/鹤见江野
/*
+
++
+++
++++
+++++
++++++
+++++++
++++++++
+++++++++
++++++++++
+++++++++++
++++++++++++
+++++++++++++
++++++++++++++
+++++++++++++++
++++++++++++++++
+++++++++++++++++
++++++++++++++++++
+ +++++++++++++++++
+ ++++++++++++++ ++
+ +++++++++++++ ++
+ +++++++... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | b0081d7a724f730c6f3e4b3392534bdd | 3,300 | PASSED |
#pragma GCC Optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long ld;
typedef unsigned long long ull;
//#define endl '\n'
#define all(var) var.begin(),var.end()
#define mp make_pair
const int DIM = 200;
int l1,r1,l2,r2;
int ask(int div){
cout<<"? "<<(... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | 93a3d9cfecaee6052cc915735c7cc05d | 3,300 | PASSED |
/* I can do this all day */
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair < int, int > pii;
typedef pair < ll, ll > pll;
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define Mp make_pair
#define point complex... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | fe4fe57137b6b347cb50d0f1afb80188 | 3,300 | PASSED |
#include<bits/stdc++.h>
using namespace std;
int T,S,l,r,x,y,ans;
inline int read(){
int s=0,w=1;char ch=getchar();
while((ch<'0')||(ch>'9')){if(ch=='-'){w=-1;}ch=getchar();}
while((ch>='0')&&(ch<='9')){s=(s<<3)+(s<<1)+ch-'0';ch=getchar();}
return s*w;
}
inline int Query(int x){
printf("? %d\n",200/x*200... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | 6a4cf76f321ec0818530294921955ae9 | 3,300 | PASSED |
#include <bits/stdc++.h>
using namespace std;
int av2[9],r=7,l;
int main(){
cout << "? " << 40000 << endl;
for (int i=1; i<=200; i++){
for (int j=1; j<=200; j++){
cout << i << " " << j << " ";
}
}
cout << endl; cin >> av2[0];
while(r>l){
int m = (l+r+1)/2;
... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | 6a9dfcba57bd54cbe5e3dab12d0912b1 | 3,300 | PASSED |
//Code By CXY07 - It's My Fiesta.
#include<bits/stdc++.h>
using namespace std;
//#define FILE
//#define int long long
#define randint(l, r) (rand() % ((r) - (l) + 1) + (l))
#define abs(x) ((x) < 0 ? (-(x)) : (x))
#define popc(x) __builtin_popcount(x)
#define inv(x) qpow((x), mod - 2)
#define lowbit(x) ((x) &... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | 4e97049bd3f3866451f3d051a65fe4ab | 3,300 | PASSED |
#include<bits/stdc++.h>
#define fi first
#define se second
using namespace std;
typedef pair<int, int> pii;
int qry(const vector<pii> &v){
cout << "? " << v.size() << '\n';
for(const pii &a : v) cout << a.fi << ' ' << a.se << ' ';
cout << endl;
int res; cin >> res;
return res;
}
int main(){
ios::sync... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | 1deb117ede5021a6f612a3a092042221 | 3,300 | PASSED |
#include<bits/stdc++.h>
#define Cn const
#define CI Cn int&
#define N 200
using namespace std;
int n,m;
int qx[N*N+5],qy[N*N+5];int Q(int x,int y)
{
int c=0;for(int i=1;i<=N;++i) for(int j=1;j<=N;++j) !(i%x)&&!(j%y)&&(qx[++c]=i,qy[c]=j);
printf("? %d\n",c);for(int i=1;i<=c;++i) printf("%d %d\n",qx[i],qy[i]);... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | bba5d07ef1e258348aa1c01bd23ebd3c | 3,300 | PASSED |
// LUOGU_RID: 95205412
#pragma GCC optimize(3)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define For(i, j, k) for ( int i = j ; i <= k ; i++ )
#define Fol(i, j, k) for ( int i = j ; i >= k ; i-- )
inline void read(auto &x)
{
char c = getchar(); for ( ; c < '0' || c > '9' ; c = getchar()... | C++ | dcc9e12768bad9bfe66b16fb5ba7a6cd | 1d50477704af9035064faafb7b3a36b6 | 3,300 | PASSED |
// 11
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k;... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 41d3c54923cfb6831c376205123846cb | 1,800 | PASSED |
// 10
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k;... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | c160d91358494153acdd779f47963170 | 1,800 | PASSED |
// 9
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 2dc445c344ab793a15fe0bd6c488dc63 | 1,800 | PASSED |
// 8
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 0e94f23c16dbfee359f4ccbfb4287d94 | 1,800 | PASSED |
// 7
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 458377645b062a841c2b98f384966853 | 1,800 | PASSED |
// 6
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 08b4fb8b5bc6ad0339d14c4b1ff5c4ad | 1,800 | PASSED |
// 5
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 61d58bb64bccc8574153d216e725a032 | 1,800 | PASSED |
// 4
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 1af948d5c811c704b055454ecee971c1 | 1,800 | PASSED |
// 3
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | d81b686e2d4ddb30c8941dc38c2fbc6c | 1,800 | PASSED |
// 2
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct chord {
int x, y;
};
bool cross(chord a, chord b) {
if (a.x > b.x) swap(a, b);
return b.x < a.y && a.y < b.y;
}
void solve() {
int n, k;
cin >> n >> k;
chord s[n];
vector<bool> vis(2 * n, 0);
for (int i = 0, x, y; i < k; ... | C++ | 9ca9df1ab3760edb8e7adc3be533c576 | 3cb4421aee2a2d858642af83cdac3c43 | 1,800 | PASSED |
#include<bits/stdc++.h>
using namespace std;
#define int long long
inline int read(){
int t=0, f=0; char v=getchar();
while(v<'0') f|=(v=='-'), v=getchar();
while(v>='0') t=(t<<3)+(t<<1)+v-48, v=getchar();
return f?-t:t;
}
const int N=3e5+5, mod=998244353;
int n,ans,x[N],f[N],sum[N],s;
int add(int x,... | C++ | 6dd3839826320795fa29702331a15744 | 849199b8ab5030cec10f7dcca417353c | 2,200 | PASSED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.