uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
927b3b16-bbe9-4467-9bcc-32a834964863
programmingduo/ACMsteps
动态规划/花样dp/poj 2533.cpp
#include<cstdio> int a[1005], ans[1005]; int main() { int n, p = 1; scanf("%d", &n); for(int i = 0; i < n; i ++) scanf("%d", &a[i]); ans[0] = 1; for(int i = 1; i < n; i ++) { ans[i] = 1; for(int j = i - 1; j >= 0; j --) if(a[i] > a[j]) ans[i] = a...
ALGO
0.999957
3.581652
7bdef407-bf07-4cd0-9e71-494fe7d2d4d3
Jangjinhyeok/CodingTest
프로그래머스/lv0/120887. k의 개수/k의 개수.cpp
#include <string> #include <vector> using namespace std; int solution(int i, int j, int k) { int answer = 0; string temp; for (int num = i; num <= j; num++) { temp = to_string(num); for (auto i : temp) { if (i == k + '0') answer++; } ...
ALGO
0.999029
4.754771
df40f155-087d-42b0-b9aa-1e62dd86b4ec
kurone02/competitive_programming
PrelimNOI2019/TASK3.cpp
#include <iostream> #include <cstdio> #include <vector> #define taskname "TEST" using namespace std; const int maxn=1e5+1; int n,m,charge[maxn],lab[maxn]; struct Edge{ int x,y,w; }e[maxn]; struct Query{ char type; int x,y; }; vector<int> adj[maxn]; vector<Query> q; inline void Enter(){ cin>>n>>m; ...
ALGO
0.999956
3.897839
dc51bdd6-0daf-4539-af6b-16cf3063aa93
xseifert/UE4-GameWorks
Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/GeomUtils/src/distance/GuDistanceSegmentSegment.cpp
#include "GuDistanceSegmentSegment.h" #include "GuDistanceSegmentSegmentSIMD.h" using namespace physx; using namespace Ps; using namespace aos; static const float ZERO_TOLERANCE = 1e-06f; // S0 = origin + extent * dir; // S1 = origin - extent * dir; PxReal Gu::distanceSegmentSegmentSquared( const PxVec3& origin0, co...
ALGO
0.999422
4.843471
8031c8c1-8a9c-49ac-8919-f1729b744fe0
metr-0/codeforces-solves
cf-893-d2/D.cpp
#include <cstdio> #define S 3005 char s[S]; int pref0[S][S], pref1[S][S], suff0[S][S], suff1[S][S]; int count1[S]; void solve() { int n, k; scanf("%d %d", &n, &k); scanf("%s", s); for (int i = 0; i <= n; i++) for (int j = 0; j <= k; j++) { if (i == 0) { pref0[i][j] = pref1[i][j] = 0; continue; } ...
ALGO
0.999803
3.613946
1f8ebcaa-bf3d-4919-991b-56c34ca02591
ishandutta2007/codeforces
m_99/normal/1611/E2.cpp
#include <stdio.h> #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define Inf 1000000001 int main(){ int _t; cin>>_t; rep(_,_t){ int n,k; scanf("%d %d",&n,&k); vector<int> x(k); queue<int> Q; vector<int> dis(n,Inf); rep(i,k){ scanf("%d",&x[i]); x[i]--;...
ALGO
0.999848
3.980854
51ee81d1-1d17-4755-b084-58a4d578aa60
rajanraj2/CodeForces
Contests/CF_Educational_Round_176/A.cpp
#include<bits/stdc++.h> using namespace std; #define fio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define int long long int #define vi vector<int> #define vs vector<string> #define ivec(arr) for (int i = 0; i < arr.size(); i++) cin >> arr[i]; #define w(x) int x; cin>>x; while(x--) #define pb push_back i...
ALGO
0.999928
4.049296
5a2d4b82-4569-456f-b6bd-510d4d7bff08
NaveedMalik91/Leet_Code
0103-binary-tree-zigzag-level-order-traversal/0103-binary-tree-zigzag-level-order-traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999995
6.048341
2288497f-d9a3-4426-9948-d4972ccf195c
SiddheshLamkhade/-CPP_Basics
function_basics.cpp
#include<iostream> using namespace std; /*int fun(int a,int b);*/ //This is fun declaration not need if defining is done above the main fun int fun(int a, int b){ int c; //Always define function outside the main function c=a+b; //Because it is already a function ...
TOOL
0.985195
4.108175
75489a12-4076-48a4-ad1e-76f34fd680f2
yitianhao/gpu_sched_new
gpu-sched-centralcontrol/minor/boost_1_61_0/libs/graph/test/dfs_cc.cpp
#include <boost/concept_archetype.hpp> #include <boost/graph/depth_first_search.hpp> #include <boost/graph/graph_archetypes.hpp> int main() { using namespace boost; typedef default_constructible_archetype< sgi_assignable_archetype< equality_comparable_archetype<> > > vertex_t; { typedef incidence_gr...
ALGO
0.950544
5.270398
ff874fd1-773a-4d9c-8078-b2efc24e300e
AkshatAggarwal14/Competitive-Programming
CodeForces/1106/d.cpp
#ifndef ONLINE_JUDGE // https://github.com/AkshatAggarwal14/Competetive-Programming/tree/master/CodeForces #include "Akshat.hpp" #else #include "bits/stdc++.h" using namespace std; #define dbg(...) 42 #endif using ll = int64_t; auto sz = [](const auto &container) -> ll { return container.size(); }; void Solution() { ...
ALGO
0.999996
4.965678
8d68fc26-167c-4c7b-9966-354bdb690a46
SharmaRithik/Profile-NewGVN
llvm-project/clang/lib/Driver/ToolChains/MSVC.cpp
#include "MSVC.h" #include "CommonArgs.h" #include "Darwin.h" #include "clang/Basic/CharInfo.h" #include "clang/Basic/Version.h" #include "clang/Config/config.h" #include "clang/Driver/Compilation.h" #include "clang/Driver/Driver.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/Options.h" #include "...
TOOL
0.964986
7.052652
376d604b-cf4b-459e-b048-eeaddedbcba5
spon94/CppPractice
cppPrimer/Chapter03/3_23.cpp
#include <iostream> #include <vector> using namespace std; using std::vector; int main(int argc, char *argv[]) { vector<int> numList{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; vector<int>::iterator it1 = numList.begin(); vector<int>::iterator it2 = numList.end(); for (; it1 != it2; ++it1) { (*it1) *= 2; } cout << ...
ALGO
0.967262
3.685807
cc5ccf16-afb6-4cee-b542-e87e020101d1
FrancescAguilo/IA_Pathfinding
SDL_Pathfinding/src/ScenePathFindingMouse.cpp
#include "ScenePathFindingMouse.h" #include "Windows.h" using namespace std; bool auxito = true; ScenePathFindingMouse::ScenePathFindingMouse() { draw_grid = false; maze = new Grid("../res/maze.csv"); loadTextures("../res/maze.png", "../res/coin.png"); srand((unsigned int)time(NULL)); Agent *agent = new Agent...
ALGO
0.942731
3.755577
7ebfdd33-3a33-4d7e-976e-5207f7e62404
NamDiagezzi/CPP_CodePtit
CPP0112 - Khoang cach.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main(){ int t; cin >> t; while (t--){ float a, b, c, d; cin >> a >> b >> c >> d; cout << setprecision(4) << fixed << (float)(sqrt( pow(c-a,2) + pow(d-b, 2) )) << endl; } return 0; }
ALGO
0.999019
3.683478
5fe60da2-a8e0-421b-a64b-247fa56e2b0b
adityaRajGit/Leetcode_problems
0518-coin-change-ii/0518-coin-change-ii.cpp
class Solution { public: int solve(vector<int> &coins, int amount, int i, vector<vector<int>> &dp){ if(i==0){ if(amount%coins[i]==0){ return 1; }else{ return 0; } } if(dp[i][amount] != -1){ return dp[i][amount];...
ALGO
0.999907
5.813585
20eeaeb8-5155-4410-880e-b5b6531cf38a
AakashN2k03/Companywise-DSA
AMAZON/KthlargestelementinBST.cpp
// GFG: Kth largest element in BST // Pattern: BST Specific Problems class Solution { public: void inorder(Node* root, int k, int& largest, int& count) { if (!root) return; inorder(root->right, k, largest, count); count++; if (count == k) { largest = root->data; return; ...
ALGO
0.99998
5.460399
e47a3ca9-a5f0-4874-8121-75de66e5bfa7
RiyankVaghasiya/DSA
array/unique_element.cpp
#include <iostream> using namespace std; int uniquenum(int arr[], int size) { int ans = 0; for (int i = 0; i < size; i++) { ans = ans ^ arr[i]; } return ans; } int main() { int arr[9] = {1, 2, 3, 1, 2, 4, 5, 4, 5}; int size = 9; cout << uniquenum(arr, size); }
ALGO
0.999809
4.441086
2b3b966a-aef1-4be6-a036-60e3a4b15807
dagangfang/leetcode
daily/20220517#953/Solution.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> #include <map> #include <utility> #include <algorithm> #include <cmath> #include <sstream> #include <deque> #include <limits.h> #include <string.h> #include <stack> #include <string> #include <list> #include <queue> using namespace...
ALGO
0.999997
5.526803
2e6f817f-5655-42d5-8b1e-14dde76df019
luyh20/VL-Grasp
GraspNet/pointnet2/_ext_src/src/interpolate.cpp
#include "interpolate.h" #include "utils.h" void three_nn_kernel_wrapper(int b, int n, int m, const float *unknown, const float *known, float *dist2, int *idx); void three_interpolate_kernel_wrapper(int b, int c, int m, int n, const float *points, cons...
ALGO
0.997736
6.55355
9a3bab94-b115-4f26-a4fd-3f27d95f8249
17nshul/Leetcode_submissions
2145-grid-game/2145-grid-game.cpp
class Solution { public: long long gridGame(vector<vector<int>>& grid) { long long min_result = LLONG_MAX; // Start with a large number for the minimum score. long long row1_sum = accumulate(grid[0].begin(), grid[0].end(), 0LL); // Top row sum long long row2_sum = 0; // Bottom row sum sta...
ALGO
0.999986
6.43903
5ed44d21-22be-4ace-ba7b-9a5799b5cbeb
1565433859/N-player-trust-game
app/game.cpp
#include<vector> #include<unordered_set> #include<iostream> #include"global.h" #include"game.h" #include"para.h" #include"RandFunc.h" using namespace std; //void interact() { // for (int i = 0; i < N; i++) { // vector<int>nums(players[i].weight+1, 0); // vector<unordered_set<int>>type_set(3); // vector<int>type_nu...
ALGO
0.999872
3.218214
3a9fb61c-f8d9-4a53-835e-421612cf437a
mmxsrup/procon
atcoder/traing/018/f.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vint; typedef pair<int,int> pint; typedef vector<pint> vpint; #define rep(i,n) for(int i=0;i<(n);i++) #define REP(i,n) for(int i=n-1;i>=(0);i--) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define each(it,v) for(__typeof((v).begin(...
ALGO
0.999967
4.549645
0314c634-f4f7-4c5f-83fa-d2b71f4a1ecb
namankk/note_keeper_flutter_app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
e0673ed5-c9ad-40b3-9343-56ca03f94b12
tony9402/baekjoon
solution/dynamic_programming_2/7579/main.cpp
// Authored by : tony9402 // Co-authored by : - // Link : http://boj.kr/7cc3cfd9bda64cfe8af9ff0a99c789a9 #include<bits/stdc++.h> using namespace std; int DP[10001], N, M, mem[101], cost[101]; int sum_cost; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin >> N >> M; for(int i=0;i<N;i++) cin >...
ALGO
0.999987
3.882682
5fb590b1-b3a4-4856-91e5-3a3bb7259c9e
letletmego/Rumi-Renderer
src/Volume/homogeneousvolume.cpp
#include "homogeneousvolume.h" #include "..\\Kernel\\phase.h" #include "..\\Kernel\\ray.h" #include "..\\Kernel\\intersection.h" #include "..\\Light\\light.h" #include "..\\Acceleration\\bvh.h" #include "..\\Integrator\\integrator.h" #include "..\\Integrator\\path.h" #include "..\\Scene\\scene.h" HomogeneousVolume::~H...
ALGO
0.953945
6.021227
13229375-62b1-4a26-a3a7-02c2aafc0e99
darpankattel/labsheet-cpp
qno-5.cpp
// Assume that employee will have to pay 10 percent income tax to the government. Ask user to enter the employee salary. Use inline function to display the net payment to the employee by the company. #include <iostream> using namespace std; inline void display(int salary) { float netPatment = salary - (salary * 10...
ALGO
0.939458
3.903529
9456a7ce-8c83-4efd-84e7-2258a7248e40
arzuizza/ALPRO-4213
TUGAS4/factorial&fibonacci.cpp
#include <iostream> using namespace std; // Fungsi rekursif untuk menghitung faktorial int faktorial(int n) { if (n == 0) { return 1; } else { return n * faktorial(n - 1); } } // Fungsi rekursif untuk mencetak deret Fibonacci int fibonacci(int n) { if (n <= 1) { return n; ...
ALGO
0.999282
6.191084
1379c194-96d2-49e3-b407-260bf310a739
Sampurankishoresrivastava/DSA
gfg/potd./Diagonal sum in binary tree.cpp
/*Complete the function below Node is as follows: struct Node{ int data; Node *left,*right; }; */ class Solution { public: void trav(Node* root,int d,map<int,int> &vals) { if(root==NULL) return ; vals[d]+=root->data; trav(root->left,d+1,vals); trav(root->right,d,val...
ALGO
0.999691
5.689178
2f9d3a7c-c3e8-420d-8e34-e252e8a54f66
tim-low/URECA-Robot-Project
URECA Project/learnOpenCV/opencv-master/modules/calib3d/test/test_cornerssubpix.cpp
#include "test_precomp.hpp" #include "opencv2/imgproc/imgproc_c.h" #include "test_chessboardgenerator.hpp" namespace opencv_test { namespace { class CV_ChessboardSubpixelTest : public cvtest::BaseTest { public: CV_ChessboardSubpixelTest(); protected: Mat intrinsic_matrix_; Mat distortion_coeffs_; Siz...
TEST
0.901305
6.288045
fc26be5e-f1c2-48c5-b044-8afb1337e023
Munbin-Lee/PS
BOJ/11650.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector <pair<int, int>> v(n); for (auto &i: v) { cin >> i.first >> i.second; } sort(v.begin(), v.end()); for (auto i: v) { cout << i.first << ' ' ...
ALGO
0.99983
4.55708
556ed23f-9c15-4872-9d1b-5492f43c366d
Yashwanth137/GFG-Potd
2024/08 - August/08. Sum Tree/Solution.cpp
class Solution { public: bool isLeaf(Node* node) { return (node == nullptr || (node->left == nullptr && node->right == nullptr)); } bool isSumTreeUtil(Node* node) { if (node == nullptr || isLeaf(node)) { return true; } int leftSum = 0, rightS...
ALGO
0.999904
6.274901
e3a65a30-aa98-4966-815d-3d364ac1c0c5
MarcosFelipeBC/competitive-programming
Gym Codeforces/SUFE ICPC Team Formation Test/F.cpp
#include <bits/stdc++.h> #define mod 1000000007 using namespace std; const int N = 105; const int M = 10005; long long dp[N][M]; int vet[N]; int main(){ int t; scanf("%d", &t); while (t-- > 0){ memset(dp, 0LL, sizeof dp); int n, m; scanf("%d %d", &n, &m); for (int i=0; i<n; i++){ scanf("%d", &vet[i]); ...
ALGO
0.999986
4.514839
6444ebac-4c6d-4cb5-8245-d465a6d5f1c8
BabushkinArtem/Arrays
Arrays_3_12/Arrays_3_12.cpp
#include <iostream> #include <string> #include <regex> using namespace std; const int n = 12; int m[n]; void set_array() { string tmp_array; //for stoi() for (int i = 0; i <= n - 1; i++) { tmp_array = (""); while (!regex_match(tmp_array, regex("(([1-9][0-9]{1,16})|([1-9])|([0]))([.][0-9]{0,16}[1-9]){0,1}"))) { ...
ALGO
0.851783
3.257645
214827f8-ba2d-4195-8916-b26c20a117f3
CadenCarlson/Kinect-Depth-Camera
opencv/sources/samples/gpu/pyrlk_optical_flow.cpp
#include <iostream> #include <vector> #include <opencv2/core.hpp> #include <opencv2/core/utility.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <opencv2/video.hpp> #include <opencv2/cudaoptflow.hpp> #include <opencv2/cudaimgproc.hpp> #include <opencv2/cudaarithm.hpp> using namespace std; ...
ALGO
0.912955
6.156531
3b79d130-66e0-4a98-ad8d-32f715a74fd6
Dheeraj-1999/competitive-programming
hackerank/Hackerrank past/HackerRank/array rotation using single array.cpp
#include<iostream> #include<conio.h> using namespace std; int main(){ int A[10],i,n; cin>>n; for(i=1;i<=n;i++){ cin>>A[i]; } for(i=1;i<=n/2;i++){ swap(A[i],A[n-i+1]); } cout<<"\n"<<"array after rotation\n"; for(i=1;i<=n;i++){ cout<<A[i]; } return 0; } void swap(int &a ,int &b){ int c; c=a; a=b; b=c...
ALGO
0.999879
3.4181
468b7247-57c4-43cb-961d-c06b0a3794e3
Seo-Faper/Data_Structure_with_C
ProblemSolve/5347.cpp
#include <iostream> using namespace std; long long N; long long gcd(long long a, long long b) { while (b != 0) { long long r = a % b; a = b; b = r; } return a; } long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); } int main() { cin >> N; while (N--...
ALGO
0.999875
4.581065
0335295d-3239-460a-a47e-ea430409cc78
tiny-flower/leetcode
1457.二叉树中的伪回文路径.cpp
/* * @lc app=leetcode.cn id=1457 lang=cpp * * [1457] 二叉树中的伪回文路径 */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullp...
ALGO
0.999961
6.208696
ac127d50-5112-417a-8f89-c7e01f690f2c
Leonkoithara/sem5_SS
scheduling_algorithms/sjf.cpp
#include <iostream> using namespace std; int main() { int i,j,n,total=0,pos,temp; float avg_waiting_time,avg_tat; cout << "Enter number of process: "; cin >> n; int burst_time[n],p[n],waiting_time[n],tat[n]; cout << "Enter Burst Time:\n"; for(int i = 0;i < n;i++) { cin >> bur...
ALGO
0.999973
3.04053
8bca7c95-a647-442c-96c9-ec0ac2132884
rique369/gigacoins
src/base58.cpp
#include "base58.h" #include "hash.h" #include "uint256.h" #include <assert.h> #include <stdint.h> #include <string.h> #include <vector> #include <string> #include <boost/variant/apply_visitor.hpp> #include <boost/variant/static_visitor.hpp> /** All alphanumeric characters except for "0", "I", "O", and "l" */ static...
TOOL
0.853643
7.398941
479e2126-6238-4608-8a24-3a1834b137dc
M-Kousei/practice0
MinOfThree/MinOfThree/MinOfThree.cpp
//========================================================== // 3l̍ŏl //========================================================== #include <stdio.h> #include <stdlib.h> // srand(),rand() #include <time.h> // time() // ֐vg^Cv int MinOfThree(int a, int b, int c); int main() { srand(time(nullptr)); int a = rand() ...
ALGO
0.999549
4.537857
cc3c0b50-6745-4b7d-bd82-32b66b9e512f
satyajeetramnit/Codechef-Solutions
CPP/PERMXORSUM.cpp
//Ramnit here #include<bits/stdc++.h> using namespace std; typedef long long lolo; #define faster ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); // #define all(v) v.begin,v.end() #define puba push_back // #define F .first // #define S .second int main() { faster; int t; cin>>t; while(t--){ ...
ALGO
0.999803
4.703858
fb461732-8f06-4229-adb1-62f01027be70
ishandutta2007/codeforces
estinka/normal/1214/H.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <iomanip> #include <set> #include <map> #include <queue> #include <bitset> #include <random> #include <chrono> typedef long long ll; typedef long double ld; using namespace std; const int maxn = 2e5 + 79; vector<vect...
ALGO
0.999988
4.004476
c7fe7fe1-767c-432b-98e8-df7d116fb59a
codewithhuzaifa/geo-fencing-ams
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
f0a782a0-559c-4389-90a1-0049425c6019
prashantjinwal/CPP__Bin
FuncPrototype.cpp
#include <iostream> using namespace std; // Prototype of function int sum (int a , int b) ; //int sum (int , int); // Also write this way but not recommeded ---- void g(); int main() { int num1, num2; cout<<"Enter The value of First number "<< num1<<endl; cin>>num1; cout<<"Enter The value of Second number "<<...
ALGO
0.985433
4.613908
81800f64-8c53-47f6-baf5-d8d26b0e8978
SaudCh/CC-Lab-Task
week 13/infinixToPostFix.cpp
#include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> #define SIZE 100 char stack[SIZE]; int top = -1; void push(char item) { if(top >= SIZE-1) { printf("\nStack Overflow."); } else { top = top+1; stack[top] = item; } } char pop() { char item ; if(top <0) { printf("sta...
ALGO
0.999891
4.086372
a74afe76-cd02-4e66-94d1-c05b303b749b
stubma/WiEngine
Windows/PocoFoundation/src/MD4Engine.cpp
#include "Poco/MD4Engine.h" #include <cstring> namespace Poco { MD4Engine::MD4Engine() { _digest.reserve(16); reset(); } MD4Engine::~MD4Engine() { reset(); } void MD4Engine::updateImpl(const void* input_, unsigned inputLen) { const unsigned char* input = (const unsigned char*) input_; unsigned int i, index, pa...
ALGO
0.962383
7.165688
e3bde8ba-0bff-4e5e-94ce-6e3f374bf849
JorgeArevaloEchevarria/Estructura-de-Datos
arboles/pruebaContinua/Prueba1/main.cpp
//Pedro Llamas Do Espritu Santo //71710287J #include "Arbin.h" #include <iostream> #include <string> using namespace std; /** Indica aqu, razonadamente, la complejidad de numero_adivinos La complejidad de la funcion ser del O(n) siendo n el numero de nodos (tiene un coste lineal) ya que para poder resolver el problem...
ALGO
0.997592
4.552452
7cdc367d-37d2-4c18-b10a-8613c3e4bffa
KaiDD27/IOI2024
cses/SortingAndSearch/Missing Coin Sum.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; #define endl '\n' vector<ll> x; int main() { ll ans = 0, n; cin >> n; for (auto &i : x) cin >> i; sort(x.begin(), x.end()); ans = 1; for (int i = 0; i < n; i++) { if (x[i] > ans) break; e...
ALGO
0.999941
4.038469
0d23030c-1342-400c-9959-149e5fb61ee5
0danylo/charted
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
d1ea970f-c674-40c7-8640-f2188182ecfd
nihadallahveranov/strong_fingers
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998693
6.797273
0cabf1bb-0825-44ef-b617-efbd74a2859c
jxx-sx/BOJ_Study
solved/14425.cpp
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string arr[10000], cmp; int n, m; int ans = 0; cin >> n >> m; for (int i = 0; i < n; i++) cin >> arr[i]; sort(arr, arr + n); for (...
ALGO
0.999947
4.708122
e2b81f3a-f061-4e3f-aa11-f38a5c8df6bc
HARIOM317/Learn-Programming-Languages
C++/14 STL/list/sorting_of_list.cpp
#include <iostream> #include<list> using namespace std; int main() { list<int> li={6,4,10,2,4,1}; list<int>:: iterator itr; cout<<"Elements of list are : "; for(itr=li.begin();itr!=li.end();++itr) std::cout << *itr<<","; li.sort(); cout<<'\n'; cout<<"Sorted elements are :...
ALGO
0.999094
4.262367
e4ced9d1-e5cd-41be-8456-3a7c58a756af
StudyingFather/my-code
Codeforces/1805B.cpp
// Problem: B. The String Has a Target // Contest: Codeforces - Codeforces Round 862 (Div. 2) // URL: https://codeforces.com/contest/1805/problem/B // Author : StudyingFather // Site : https://studyingfather.com // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) #include <...
ALGO
0.999744
5.003376
52590852-d8cb-41c5-8db1-20a0d75429a0
MeowBoy326/FRIES
FRIES_core/src/llvm-project/llvm/lib/CodeGen/LatencyPriorityQueue.cpp
#include "llvm/CodeGen/LatencyPriorityQueue.h" #include "llvm/Config/llvm-config.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; #define DEBUG_TYPE "scheduler" bool latency_sort::operator()(const SUnit *LHS, const SUnit *RHS) const { // The isScheduleHigh flag allows n...
ALGO
0.987979
7.574263
5762da18-8ee3-47c4-8cff-c6b354f0536e
Bindles/leetcode-auto
1400-construct-k-palindrome-strings/1400-construct-k-palindrome-strings.cpp
int init=[]{ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);return 0;}(); class Solution { public: bool canConstruct(std::string s, int k) { if (k > s.length()) return false; unordered_map<char,int> freq; for (char c : s) freq[c]++; int odd_count=0; for (auto& [_, co...
ALGO
0.99999
5.996216
6cb78ed9-5bec-43b9-a1cb-eb27fed699ca
Corvus-AOSP/android_frameworks_base
tools/aapt2/split/TableSplitter.cpp
#include "split/TableSplitter.h" #include <algorithm> #include <map> #include <set> #include <unordered_set> #include <unordered_map> #include <vector> #include "android-base/logging.h" #include "androidfw/ConfigDescription.h" #include "ResourceTable.h" #include "trace/TraceBuffer.h" #include "util/Util.h" using ::...
TOOL
0.906096
7.197423
0b66bf28-8c39-4b66-ae2d-af5322b9e3a7
kmjp/procon
leetcode/201-250/210/1616.cpp
typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) me...
ALGO
0.999985
4.561076
250302ff-9515-4dfd-bc43-cce3a6444391
yogeshnarendratiwari/Placement
Competitive programming/Mathematics/Gcd.cpp
#include <iostream> using namespace std; int gcd(int a, int b) { if (a <= 0) { return b; } else if (b <= 0) { return a; } if (a < b) gcd(b - a, a); else if (b < a) gcd(b, a - b); } int main() { int a, b; cin >> a >> b; cout << gcd(a, b); }
ALGO
0.999609
5.202072
8f62ad21-fb86-4ea8-9bc2-0c0d5b633385
peeboo/smplayer
src/helper.cpp
#include "helper.h" #include <QApplication> #include <QFileInfo> #include <QColor> #include <QDir> #include <QTextCodec> #include <QWidget> #include <QDebug> #include "config.h" #include "extensions.h" #ifdef Q_OS_WIN #include <windows.h> // For the screensaver stuff #endif #if EXTERNAL_SLEEP #include <unistd.h> #el...
TOOL
0.911063
5.313796
6bde78fd-3694-44ec-acc3-ec05c5a7a754
ApocalypseCalculator/SumoBot
samplecalc.cpp
#include <iostream> #include <cmath> short partition(float arr[], short start, short end) { short pivot = arr[start]; short count = 0; for (short i = start + 1; i <= end; i++) { if (arr[i] <= pivot) count++; } short pivotIndex = start + count; float tmp = arr[start]; ...
ALGO
0.999995
4.379814
0dfc8f7f-3ac8-4f40-b107-cf875b108b4f
gulmini/olinfo
ois/ois_kabbalah2/file.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vi; const string quack = "quack"; ll n, m; vector<vi> g; vi freq; char c; inline int inv(int x) { return 1000*(x%10) + 100*(x%100/10) + 10*(x%1000/100) + 1*(x/1000); } void vert_swap() { for (int i = 0; i < n/2; i++) swap(g[i]...
ALGO
0.999973
3.285489
fc9e4170-1696-4c07-8f27-231e750402fa
revyos-rocm/rocm-llvm
llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
#include "llvm/CodeGen/DeadMachineInstructionElim.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/LiveRegUnits.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/Ini...
ALGO
0.949166
7.935539
647e1cca-d2c3-4878-975b-f1931f20c18c
BinomialSheep/Competitive
AtcoderContest/もすーんバチャ640/B.cpp
#pragma region header #include <bits/stdc++.h> // デバッグ用マクロ:https://naskya.net/post/0002/ #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif using namespace std; using ll = long long; using vi = vector<int>...
ALGO
0.999922
4.794023
09fb3b11-927c-450b-a924-65ba10f01610
maskakid/Spoj
TRICOUNT-Counting Triangles.cpp
#include<bits/stdc++.h> #define LL unsigned long long int LL n,t; int main() { scanf("%llu",&t); while(t--) { scanf("%llu",&n); printf("%llu\n",((n*(n+2)*(2*n+1))/8)); } return 0; }
ALGO
0.999443
4.302804
7bfb3eb4-dc88-4199-a39b-ac9b1e4f3420
cyndel1/src
engine/server/library/serverGame/src/shared/ai/AiMovementWanderInterior.cpp
#include "serverGame/FirstServerGame.h" #include "serverGame/AiMovementWanderInterior.h" #include "serverGame/AiCreatureController.h" #include "serverGame/BuildingObject.h" #include "serverGame/CellObject.h" #include "serverGame/CreatureObject.h" #include "serverPathfinding/ServerPathBuilder.h" #include "sharedColli...
ALGO
0.977019
4.099121
f37cefa2-dceb-4155-bd6c-f31035d6e397
tianhaogu/Database-Management-System
Project4/GHJ/Record.cpp
#include "Record.hpp" #include "constants.hpp" #include <iostream> #include <algorithm> #include <string> using namespace std; #define MODULAR 1000000 Record::Record(string joinKey, string data){ this->key = joinKey; this->data = data; } Record::Record(const Record &r2){ key = r2.key; data = r2.data; } /...
TOOL
0.989496
3.772321
8382cb9b-832e-4f28-ac5a-8b09e8210399
hhsr98/OI
TrainingGuide/aoapc-bac2nd-master/ch8/UVa1451.cpp
// UVa1451 Average // Rujia Liu #include<cstdio> using namespace std; const int maxn = 100000 + 5; int n, L; char s[maxn]; int sum[maxn], p[maxn]; // average of i~j is (sum[j]-sum[i-1])/(j-i+1) // compare average of x1~x2 and x3~x4 int compare_average(int x1, int x2, int x3, int x4) { return (sum[x2]-sum[x1-1]) * ...
ALGO
0.999907
3.639004
ebc5c025-8063-4b85-acdc-e3904bea0f10
ishandutta2007/codeforces
vercingetorix/normal/536/C.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <set> #include <map> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef std::vector<int> vi; typedef std::vector<bool> vb; typedef std::vector<long long> vll; typedef st...
ALGO
0.999938
3.910519
f223cdd3-436c-4ca5-9d97-88262ce3c654
zafor4/Algorithm
Greedy_Algorithms/nextFit.cpp
#include<bits/stdc++.h> using namespace std; int nextfit(int weights[],int n,int capacity){ int res=0; int bin_rem=capacity; for (int i=0;i<n;i++){ if (weights[i]>bin_rem){ res++; bin_rem=capacity-weights[i]; } else { bin_rem-=weights[i]; }...
ALGO
0.999828
4.579363
8eea35c8-e12c-4fe3-8270-13407ffdbe04
rlfscin/PCC
PCC2/src/LZW.cpp
#include <fstream> #include <sstream> #include <iostream> #include <map> #include <unordered_map> #include <vector> #include <string> using namespace std; class LZW { public: LZW() { } vector<short> encode(string text) { unordered_map<string, short> dictionary; string a; for(short i = 0; i < 256; i++) { ...
TOOL
0.983577
3.912022
cfcc5b52-64c4-4878-a745-6fe2138414be
DiegoBriaares/Contest-Archive
COCI/2024/2024_Contest_3/Karte.cpp
#include <bits/stdc++.h> /* This one is a collaboration with Bryan Hernandez. */ using namespace std; void optimize() { cin.tie(0)->sync_with_stdio(0); } int main() { optimize(); int n, m, x, y; cin >> n >> m >> x >> y; vector<int> grid(n, 0); for (int i = 0; i < n; ++i) { stri...
ALGO
0.999432
4.296937
abf626fb-4f24-499c-bc21-a1613a1014f0
PrernaSingh587/Leetcode-questions
123-best-time-to-buy-and-sell-stock-iii/123-best-time-to-buy-and-sell-stock-iii.cpp
class Solution { public: // map<vector<int>,int>mp; // int p(vector<int>& pr,int k,int f,int tr) { // if(k==pr.size() || tr==0) return 0; // if(mp.count({k,f,tr})) return mp[{k,f,tr}]; // if(f==0) { // return mp[{k,f,tr}]= max(p(pr,k+1,1,tr)-pr[k],p(pr,k+1,0,tr)); // ...
ALGO
0.999921
4.932102
0f51e436-c956-48d8-8727-c1cdfd5ce8a5
CHIH-WHI/Probabilistic-Latent-Semantic-Analysis
src/plsa.cpp
#include "IR-General-Library.hpp" int main() { constexpr std::string_view DocumentsDirectory = ".\\ntust-ir-2020_hw4_v2\\docs"; constexpr std::string_view QueriesDirectory = ".\\ntust-ir-2020_hw4_v2\\queries"; constexpr std::string_view OutputHeader = "Query,RetrievedDocuments"; constexpr std::string_v...
ALGO
0.982928
5.895489
48f85363-295f-44d2-8386-ab6f0d3dedca
DywangIT/PTIT-Programing
PTIT-DSA/th1/13.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define faster() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); const int MAXN = 1e6 + 5; const int MOD = 1e9 + 7; int n, u, v; vector<ll> a; void input() { cin >> n >> ...
ALGO
0.999807
5.191245
f95a3829-e76f-4ad2-8fe1-b7020155aec4
thegamer1907/Code_Analysis
contest/1542593720.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <map> #include <cmath> #define pb push_back #define mp make_pair using namespace std; int main() { ios_base::sync_with_stdio(false); string p, temp; bool prvi = false, drugi= false; cin >> p; int n; cin ...
ALGO
0.999981
3.657079
e241c1aa-c01f-4537-990d-eafe1537cf00
strovertz/Codes-lab12021.2
Códigos/Medianos/imposto.cpp
#include <stdio.h> int main() { float salario, salariolimpo, imposto, imposto2, imposto3; double aux; scanf("%f", &salario); aux = salario; switch(aux >= 0.00 && aux <= 2000.00){ case 1: printf("Isento\n"); } switch (salario >= 2000.01 && salario <= 3000.00) { ...
ALGO
0.996645
3.848773
4731fa42-ab3c-4447-aeec-e524fd46baa0
sakshampurohitt/45challenge
searchBST.cpp
class Solution { public: TreeNode* searchBST(TreeNode* root, int val) { if(root == nullptr) return nullptr; if(root->val == val) return root; if(root->val > val) return searchBST(root->left, val); return searchBST(root->right, val); } };
ALGO
0.999987
6.156092
142e2c81-5938-4346-b386-a85e57921902
miiitomi/atcoder
miiitomi/20241111/6.cpp
// https://atcoder.jp/contests/abc243/tasks/abc243_f #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; const ll INF = 2e+18; const ll MOD = 998244353; vector<mint> F(51, 1), I(51, 1); void solve() { ll N, M, K; min...
ALGO
0.999993
4.724479
725575e3-d16b-469f-8d48-540d035a8565
aide-qc/qcor
mlir/parsers/qasm3/visitor_handlers/conditional_handler.cpp
#include "expression_handler.hpp" #include "mlir/Dialect/SCF/SCF.h" #include "qasm3_visitor.hpp" namespace { // ATM, we don't try to convert everything to the // special Quantum If-Then-Else Op. // Rather, we aim for very narrow use-case that we're sure // that this can be done. // i.e., this serve mainly as a stop-gap...
ALGO
0.90187
7.735098
04e0f2d3-73b8-4709-be0e-cbc3818353dd
raincross7/code-similarity
codes/train_code/problem444/problem444_234.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define mod 1000000000 #define endl "\n" #define PI 3.14159265358979323846264338327950288 using namespace std ; using bigint = long long int ; using ...
ALGO
0.999912
4.702493
22f99eaf-1a1d-4789-b0da-0a971ab54a9b
batzor/AlgorithmsForEverything
hackerrank.com/ACSGTM2020/processes.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define ar array #define vt vector #define pb push_ba...
ALGO
0.999886
4.122446
20422841-582f-4da0-b74c-42658b8fc417
SofiaKyriakiMachaira/SoftwareDevforAlgorithmicProblems
project2/MRNG.cpp
#include "MRNG.h" MRNG::MRNG(double **all_p1, int how_many1, int dimensions1 = 784, int k1 = 50, int N1 = 1, int R1 = 1, int E1 = 30, int L1 = 20){ this->all_p = new double*[how_many1]; for(int i = 0; i < how_many1; i++) this->all_p[i] = new double[dimensions1]; for (int i = 0; i < how_many1; i++) memcp...
ALGO
0.999718
3.091489
f3783c7f-5d64-46a5-9e1b-f785fe98e9f0
souravsaha/GeodesicObjectProposal
gop_1.3/examples/example_learned.cpp
#include "contour/sketchtokens.h" #include "contour/structuredforest.h" #include "proposals/proposal.h" #include "segmentation/segmentation.h" #include "imgproc/image.h" int main( int argc, const char * argv[] ) { /* Setup the proposals settings */ // Play with those numbers to increase the number of proposals // ...
ALGO
0.969458
5.688823
ff2de7b2-c4fe-4026-876a-1dbe7f7c23af
Suvraneel/LeetCode
0520-detect-capital/0520-detect-capital.cpp
class Solution { public: bool detectCapitalUse(string word) { auto isCaps = [](char c)->bool{return (c>='A' && c<='Z');}; if(!isCaps(word[0])){ // case 2 -> leetcode for(auto c:word) if (isCaps(c)) return false; }else{ if(isCaps(...
ALGO
0.999753
6.168744
61886071-c19b-4089-bb0d-4fd5c9c38e4e
fjzls2000/MyOICodes
lydsy/1594.cpp
/************************************************************** Problem: 1594 User: ZLSer_2015 Language: C++ Result: Accepted Time:460 ms Memory:28168 kb ****************************************************************/ #include <stdio.h> #include <algorithm> inline int max(int a , int b) { re...
ALGO
0.999969
4.4781
4e560f60-6a35-47b6-bfe9-56a31cbadda6
AdityaPrakash-26/Leetcode-Solutions
Aditya/1000-9999/1041.robot-bounded-in-circle.cpp
/* Accepted 116/116 cases passed (0 ms) Your runtime beats 100 % of cpp submissions Your memory usage beats 94.43 % of cpp submissions (5.9 MB) */ /* * @lc app=leetcode id=1041 lang=cpp * * [1041] Robot Bounded In Circle */ // @lc code=start class Solution { public: bool isRobotBounded(string instructions) { ...
ALGO
0.999297
6.286847
2ff90d20-c589-43d7-8018-fb86d6f87ed1
ishandutta2007/codeforces
teapotd/normal/1284/E.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #ifdef LOC #include "debuglib.h" #else #define deb(...) #define DBP(...) #endif using namespace std; using ll = long long; using Vi = vector<int>; using Pii = pair<int, int>; #define pb push_back #define mp make_pair #de...
ALGO
0.999928
4.318171
97b916f0-bf82-41a5-83ac-70cfb494cc1b
mosaic-group/openfpm
example/Vector/3_molecular_dynamic_gpu_opt/main_cpu.cpp
#include "Vector/vector_dist.hpp" #include "Plot/GoogleChart.hpp" #include "Plot/util.hpp" #include "timer.hpp" #ifdef TEST_RUN size_t nstep = 100; #else size_t nstep = 1000; #endif typedef float real_number; constexpr int velocity = 0; constexpr int force = 1; template<typename CellList> void calc_forces(vector_di...
ALGO
0.999706
5.741268
1112d805-3259-4a39-9686-524d9e88a93f
LeKhanhToan1509/C-PTIT
CPP0416.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n, k; cin>>n>>k; int a[n]; for(int &x : a){ cin>>x; } int cnt = 0; for(int i = 0; i < n-1; i++){ for(int j = i+1; j < n; j++){ ...
ALGO
0.999862
4.470451
c84f2455-5f7f-47a8-8ab5-723078aa673d
RangerOnMars/TUP-NN-Train
demo/MegEngine/cpp/yolox.cpp
#include "megbrain/gopt/inference.h" #include "megbrain/opr/search_policy/algo_chooser_helper.h" #include "megbrain/serialization/serializer.h" #include <iostream> #include <iterator> #include <memory> #include <opencv2/opencv.hpp> #include <stdlib.h> #include <string> #include <vector> /** * @brief Define names base...
DATA
0.938839
5.639521
d38dff0b-dd1f-4637-9615-293de4313f5c
HuYuzhang/TOMM-2022-Deep-Inter-Prediction
codecs/HEVC/source/Lib/TLibCommon/TComLoopFilter.cpp
/** \file TComLoopFilter.cpp \brief deblocking filter */ #include "TComLoopFilter.h" #include "TComSlice.h" #include "TComMv.h" #include "TComTU.h" //! \ingroup TLibCommon //! \{ // ==================================================================================================================== // Cons...
ALGO
0.911982
3.261347
77f46b61-bd7c-460a-b929-b97c361a8378
calmacdonald/Leetcode
C++/Check if all the integers in a range are covered.cpp
class Solution { public: bool isCovered(vector<vector<int>>& ranges, int left, int right) { for(int i = left; i <= right; i++) { bool seen = false; for(int j = 0; j < size(ranges) && !seen; j++) if(i >= ranges[j][0] && i <= ranges[j][1]) seen = true; if(!seen) return false...
ALGO
0.999679
5.923793
3a777756-a8ae-49fb-88a0-5203de2ef5ef
AlaaSharshera/ProblemSolving_codewars_cpp
Convert a String to a Number!.cpp
/* DESCRIPTION: Note: This kata is inspired by Convert a Number to a String!. Try that one too. Description We need a function that can transform a string into a number. What ways of achieving this do you know? Note: Don't worry, all inputs will be strings, and every string is a perfectly valid representation of an i...
ALGO
0.923581
5.088843
b7d91702-bfa7-40d5-9013-fdf50994250e
SJMA11723/Problem-solving
codeforces/Codeforces Round 922 (Div. 2)/A.cpp
/** * Author: Jorge Raul Tzab Lopez * Github: https://github.com/SJMA11723 */ #include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while(t--){ int n, m; cin >> n >> m; cout << m / 2 * n << '\n'; } }
ALGO
0.999901
4.532156
888311c8-acb0-44ff-8f53-1ec1a05d0d57
QuanQiuTong/algorithm-contest
算法竞赛入门经典_训练指南/2_eg19.cpp
#include <cstdio> #include <cstring> int main() { char B[30]; int vis[30], cnt[30], T; scanf("%d", &T); while (T--) { scanf("%s", B); memset(vis, 0, sizeof(vis)); memset(cnt, 0, sizeof(cnt)); for (int i = 0; i < 26; i++) if (!vis[i]) { // 找一个从i...
ALGO
0.999974
3.953493
d266b292-68ef-4b40-8bef-58cb4f052c67
Kimokcheon/SCU-CPP
Textbook/C++ Primer Plus/附录文件和源代码/Chapter 7/structfun.cpp
// strctfun.cpp -- functions with a structure argument #include <iostream> #include <cmath> // structure declarations struct polar { double distance; // distance from origin double angle; // direction from origin }; struct rect { double x; // horizontal distance from origin dou...
TOOL
0.981905
6.087492
58f8b8e1-8a2a-4314-8ad8-a6d169e5051d
PanDubovskij/BSU
Algorithms/graph07/main.cpp
#include <iostream> #include <vector> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int n; std::cin >> n; std::vector<int> a(n); int k; for (int i = 0; i < n; ++i) { for (int ...
ALGO
0.999504
3.283017
7904b19a-d3a4-4c35-8b84-56514c12ae17
ishandutta2007/codeforces
realfzzzz/normal/713/E.cpp
#include<bits/stdc++.h> using namespace std; using ll=long long; inline ll read(){ ll x=0; bool f=0; char c=getchar(); while(!isdigit(c)){ if(c=='-') f=1; c=getchar(); } while(isdigit(c)){ x=x*10+c-'0'; c=getchar(); } return f?-x:x; } const int maxn=1e5+5; int n,m,a[maxn],a2[maxn],f[maxn]; const int inf...
ALGO
0.999986
3.747494
6ff0fcaa-659e-4af1-a117-79b4c0123ed1
rayhan50001/Code_Library
Codeforces & Codechef/cf-1042C.cpp
#include<bits/stdc++.h> using namespace std; int arr[1000001]; vector<pair<int,int> >zero,pos,neg; int main() { int n; cin>>n; for(int i=0; i<n; i++)cin>>arr[i]; for(int i=0; i<n; i++) { if(arr[i]==0)zero.push_back({0,i}); if(arr[i]>0)pos.push_back({arr[i],i}); if(arr[i]<0)ne...
ALGO
0.999949
3.24363