uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d453c18b-2c86-4e50-a901-9f551b8c4756
kensuke-harada/graspPlugin
ObjectPlacePlanner/CollisionPair.cpp
// -*- mode: c++; indent-tabs-mode: t; tab-width: 4; c-basic-offset: 8; -*- /** c) Kensuke Harada (AIST) */ #include <iostream> #include "CollisionPair.h" #define m_pi 3.141592 #define minDistance 0.001 using namespace std; using namespace cnoid; using namespace boost; using namespace grasp; using namespace grasp:...
TOOL
0.996475
5.318893
2419da3a-6da4-4eac-98d8-fc88f56da063
mahendra18github/Basic-Programming-Codes
function1.cpp
#include<iostream> using namespace std; int add(int n1, int n2){ int m=n1+n2; return m; } int main() { // function to add two numbers int a=5, b=6; int sum= add(a,b); cout<<sum; return 0; }
TOOL
0.932671
4.682025
b4293c52-3ddd-48fd-bbcf-361daab4e49b
meizhitu/pojExec
interview/First Missing Positive.cpp
//题目的意思应该这样理解的,数组长度为n,存储的数据从1到n,但是是乱序排的,需要找到第一个错误的数据,如[2,1,0],缺少的数据就是3. #include <iostream> using namespace std; void swap(int *A,int a,int b){ int tmp = A[a]; A[a] = A[b]; A[b] = tmp; } int firstMissingPositive(int A[], int n) { // Start typing your C/C++ solution below // DO NOT write int main() fu...
ALGO
0.999804
3.597788
6a5c2e41-4b16-4dff-95a3-c8e8613e548b
ishandutta2007/codeforces
pashka/normal/1242/B.cpp
#include <bits/stdc++.h> #define long long long int using namespace std; // @author: pashka vector<vector<int>> g; vector<int> all; void dfs(int x) { vector<int> nall; vector<int> t; int j = 0; for (int y : all) { while (j < g[x].size() && g[x][j] < y) { j++; } if ...
ALGO
0.999872
4.292048
43af7008-54d0-44d6-9e93-be88da2a2961
OpenSees/OpenSees
SRC/element/PFEMElement/PFEMMesher3D.cpp
// $Revision: 1.0 $ // $Date: 2013-2-25 11:25:05 $ // $Source: SRC/element/PFEMElement/PFEMMesher3D.h,v $ // Written: Minjie Zhu // Created: Feb. 25 // // Description: The class PFEMMesher3D encapsulates all necessary // routines for PFEM analysis...
ALGO
0.923244
4.540041
b451dc4f-8436-4ac0-8e69-66fa746df544
cagatayalici/auto_helios
src/scanner/detector/MarquardtFitter.cpp
#include "MarquardtFitter.h" #include "logging.hpp" #include <algorithm> #include <cmath> #include <sstream> using namespace std; double MarquardtFitter::evaluate(const vector<double> & values, const vector<double> & params) { double A = params[0]; double B = params[1]; double C = params[2]; double D = params[3...
ALGO
0.999727
5.762716
899de2fd-d2f0-46cc-9a1b-4b692df6ca0c
JuyiZhang/ORB_SLAM_ARM
Thirdparty/boost_1_87_0/libs/geometry/doc/src/examples/algorithms/azimuth.cpp
// Boost.Geometry // QuickBook Example //[azimuth //` Shows how to calculate azimuth #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> int main() { using point_type = boost::geometry::model::d2::point_xy<double>; point_type p1(0, 0); point_type p2(1, 1)...
TOOL
0.985895
5.471982
8f6fdb93-5e84-4bae-8e27-0457c5df0746
s1121756/data-structure-hw1
question_2.cpp
#include <iostream> #include <stack> #include <vector> using namespace std; void printNGE(vector<int>& arr) { stack<int> s; int n = arr.size(); vector<int> nge(n, -1); // 預設所有元素的 NGE 為 -1 // 從後往前遍歷陣列 for (int i = n - 1; i >= 0; i--) { // 移除所有比當前元素小的堆疊元素 while (!s.empty() && s.top(...
ALGO
0.99998
5.37259
aaef8abb-c6fe-49e3-8434-2ef58d54681d
marco-gallegos/cpp-codeblocks
programacion/herencia8/geometria.cpp
#include<iostream> using namespace std; class poligonoregular { protected: int n_lados; float tamano[10],perimetro,area,apotema; bool l_iguales; public: poligonoregular() { l_iguales=1; } virtual void area() { } void perimetro() { perimetro=tamano[0]*n_la...
TOOL
0.906884
3.278319
f084e172-7de9-43d7-847c-8f0613953e29
kaityo256/fdps_sample
step3/test.cpp
//------------------------------------------------------------------------ #include <stdio.h> #include <math.h> #include <sstream> #include <string> #include <fstream> #include <random> #include <particle_simulator.hpp> //------------------------------------------------------------------------ class FPLJ { public: PS...
ALGO
0.999712
3.949486
e36aa10a-3d7d-42df-a3b0-d8dbcb942adb
odinvpoleneolya/TheBasicsOfProgrammingCppCourse
lab_3/Guess Magic Number/GMN/GMN/GMN.cpp
#include <iostream> int main() { // Giving instructions to the user std::cout << "Think of a number."; std::cout << "Multiply it by 10."; std::cout << "Divide the result by 2."; std::cout << "Add the original number to the result."; // Asking for the result from the user int result; st...
ALGO
0.991454
4.132374
495b114d-4ee6-4d12-be3d-ba63da662d22
ddyeon/IT-DA-4rd
study/C++/week07/BOJ_1965_양윤희.cpp
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<queue> using namespace std; int n, answer, getMax, tmp; vector<int> v; int main(void) { cin >> n; int k = 0; for (int i = 0; i < n; i++) { cin >> k; v.push_back(k); } for (int i = 1; i < n; i++) { if (v[i] < v[i - 1]) { tm...
ALGO
0.999911
3.847087
01c9e385-a55e-4283-a80b-020afbe67c27
kmjp/procon
codeforce/241-260/cf248/b2.cpp
#include <cstdlib> #include <cstring> #include <memory> #include <cstdio> #include <iostream> #include <cmath> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <algorithm> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)print...
ALGO
0.999563
3.969244
cbc9915c-31d9-42ab-8d27-c77bcfb8c939
GonzaloPereira/CompetitiveProgramming
p/BipartiteMatching/K.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb(x) push_back(x) #define all(x) x.begin(),x.end() #define FIO ios_base::sync_with_stdio(false), cin.tie(NULL); #define N 505 #define INF INT_MAX int n,m; vector<int> adj[N]; vector<int> L,R; bool visit[N]; int pl[N], pr[N], d[N]; bool bfs() {...
ALGO
0.999908
4.360332
c127db54-4d3c-462e-821f-7afff9595205
airgames/vuforia-gamekit-integration
Gamekit/Ogre-1.8/OgreMain/src/OgrePixelCountLodStrategy.cpp
#include "OgreStableHeaders.h" #include "OgrePixelCountLodStrategy.h" #include "OgreViewport.h" #include <limits> namespace Ogre { //----------------------------------------------------------------------- template<> PixelCountLodStrategy* Singleton<PixelCountLodStrategy>::ms_Singleton = 0; PixelCountLodS...
TOOL
0.981923
7.419643
669db3fe-10bd-4fce-9e42-7f411090e148
monman53/online_judge
CSA/0051/a.cpp
// header {{{ #include <bits/stdc++.h> using namespace std; // {U}{INT,LONG,LLONG}_{MAX,MIN} #define ALPHABET (26) #define INF INT_MAX #define MOD (1000000007LL) #define EPS (1e-10) #define EQ(a, b) (abs((a)-(b)) < EPS) using P = pair<int, int>; using LL = long long; int di[] = {0, -...
ALGO
0.999953
4.746561
b167b906-afd1-4fb8-be46-0b3723a88194
horriedhenry/CPP
archive/strings/m1.cpp
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(void) { string nbr="291843"; sort(nbr.begin(),nbr.end(), greater<int>()); cout<<nbr; return 0; }
ALGO
0.999207
4.734453
0e4f386d-36ca-4ab2-b587-6c5651b561a8
sumondebnath/Problems-Solutions
geeksforgeeks/Arrays/Sort 0s, 1s and 2s.cpp
/* https://www.geeksforgeeks.org/problems/sort-an-array-of-0s-1s-and-2s4231/1 */ class Solution { public: void sort012(vector<int> &arr) { int left = 0, mid = 0, right = arr.size() - 1; while (mid <= right) { if (arr[mid] == 0) { swap(arr[lef...
ALGO
0.999856
5.360821
657fa6dc-e8b0-4545-b5c2-0ab88c668c5a
yulonglong/UVa-Solutions
11393.cpp
// Steven Kester Yuwono - UVa 11393 #include <cstdio> int main() { int n; while ((scanf("%d",&n)==1) && (n>0)) { if (n<3) printf("NO\n"); else if (((n-1) % 3 == 0) || (n%3 == 0)) printf("YES\n"); else printf("NO\n"); } return 0; }
ALGO
0.999872
3.663529
8503dae4-9360-4f62-bfc5-79ad46aaade1
anandauliya/Praktikum-Pemrograman-KOMB
Pertemuan 5/Soal12/Soal12.cpp
#include <iostream> #include <vector> #include <string> // Function to print FizzBuzz and store the results in a vector std::vector<std::string> fizzBuzz() { std::vector<std::string> result; for (int i = 1; i <= 100; ++i) { if (i % 3 == 0 && i % 5 == 0) { result.push_back("FizzBuzz"); ...
ALGO
0.997164
6.288119
e1e56671-c061-4717-b338-16d0a59c7ec2
nlpming/leetcode
玩转算法面试/代码/06-Stack-and-Queue/Course Code (C++)/Optional-04-Binary-Tree-Morris-Traversal/postorder.cpp
/// Source : https://leetcode.com/problems/binary-tree-postorder-traversal/description/ /// Author : liuyubobobo /// Time : 2018-05-31 #include <iostream> #include <vector> #include <stack> using namespace std; /// Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *...
ALGO
0.999984
6.178271
16ae2256-6d38-4acb-b5ef-0aa613dba518
oatflake/aquaq_challenges
4/puzzle4.cpp
#include <iostream> #include <string> #include <numeric> #include "../helper.h" auto readInput() { int result; auto lambda = [&](auto line){ result = std::stoi(line); }; readInputFile(lambda); return result; } int main() { auto input = readInput(); uint64_t sum = 0; for (int i ...
ALGO
0.999845
5.825994
bff47554-d85d-438e-b3e5-efee3a3a9d28
liuhb86/uva
11572.cpp
#include <iostream> #include <unordered_set> #include <deque> #include <algorithm> using namespace std; int main() { int nkase; cin>>nkase; for (int kase=0;kase<nkase;++kase) { int n; cin>>n; int start = 0; int longest = 0; unordered_set<long long> hash; deque<long long> numbers; for (int i=0;i<n;++i)...
ALGO
0.999193
4.318941
4c47c54d-f249-4af9-bf9c-2d1e5ec9dbe6
BigkoalaZhu/StBl
Reconstruction/Src/Factor.cpp
////////////////////// // Polynomial Roots // ////////////////////// #include <math.h> #include "Factor.h" int Factor(double a1,double a0,double roots[1][2],double EPS){ if(fabs(a1)<=EPS){return 0;} roots[0][0]=-a0/a1; roots[0][1]=0; return 1; } int Factor(double a2,double a1,double a0,double roots[2][2],double EPS...
ALGO
0.999928
3.301164
1db09b99-d2b2-49a6-89e9-f54784df5a6c
7mA/EGT-in-MAS
scale_free.cpp
// Creation of a scale-free graph: a new node is attached to two old nodes, the probability of attachment // is proportional to the number of links of the old node. // written by 王震 March, 2011 // standard include #include <iostream> #include <fstream> #include <stdlib.h> #include <stdio.h> #include <math.h> #in...
ALGO
0.999854
3.002004
afba2c48-7939-459a-a83a-36c349c6c973
devil-r/Competitive-coding
codechef/june -lunch_time 2019/sillyprs.cpp
#include <bits/stdc++.h> #define mp make_pair #define ll long long using namespace std; int main() { ll t; cin>>t; while(t--) { int n; ll x; cin>>n; vector<ll>e1,e2,o1,o2; ll sum=0; for(int i=0;i<n;i++) { cin>>x; if(x%2==0) { e...
ALGO
0.999977
3.11722
8d6167f7-f585-4813-bfbe-a794d5bdb2a0
Ankushryuga/DS_programs
Searchig_algorighms/linear_search.cpp
#include<iostream> #include<vector> int linear_search(std::vector<int>& array, int key){ int l=array.size(); for(int i=0;i<l;i++){ if(array[i]==key){ return i; } } return -1; } int main(){ std::vector<int>array{32,24,132,14,595,99,885}; int k=885; std::cout<<linear_search(array, k)<<" \n";...
ALGO
0.999294
5.399424
d48dbdf7-a092-49c5-8fb9-66f19c60e292
Rudraksh-Upadhyay/DATA-STRUCTURES-CPP
GEEKS_FOR_GEEKS_DAILY/rough.cpp
#include<bits/stdc++.h> using namespace std; int main(){ stack<int> num; string a = "1kash"; for(int i=0; i<a.length(); i++){ if(isdigit(a[i])){ num.push(a[i] - '0'); } } int temp = num.top(); num.pop(); cout << temp <<endl; return 0; }
ALGO
0.997049
3.176613
6c47c0ef-2990-4def-b1c1-6ab61407340f
lsrosa/myLegUp
bak/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
#include "llvm/Transforms/Scalar.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/CFG.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Type.h" #inc...
TOOL
0.999215
7.512444
d158ff0d-0dc5-4149-8293-7556b331ad65
antkillerfarm/antkillerfarm_crazy
cpp/boost/graph/main.cpp
#include <algorithm> #include <boost/config.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/connected_components.hpp> #include <boost/graph/topological_sort.hpp> #include <iostream> #include <utility> #include <vector> using namespace std; void test1() { using namespace boost; { typedef a...
ALGO
0.995095
6.065783
298cd65f-89b5-4f9e-a88b-fab8a4539eff
toskip/leetcode
39_Combination Sum _dfs.cpp
class Solution { public: vector<vector<int>> result; vector<int> candidates; vector<int> current; int len; vector<vector<int>> combinationSum(vector<int>& candidates, int target) { sort(candidates.begin(),candidates.end()); this->candidates = candidates; len = candidates.size...
ALGO
0.999988
6.325226
1b05b6d4-a2b4-48aa-8d89-f6093d0a0dc6
vivek14581/Sheet_Solve
Day-1/S1_Q7.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=0;i<n;i++) { int k = n; for(int j=0;j<=i;j++) cout<<(k--); cout<<"\n"; } for(int i=0;i<n;i++) { int k = n; for(int j=0;j<n-i;j++) cout<<(k--...
ALGO
0.999977
3.526466
ba9b474a-bfcb-493b-878f-c4119bd42bfa
b-jatin/Leetcode
215-kth-largest-element-in-an-array/kth-largest-element-in-an-array.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { priority_queue<int, vector<int>, greater<int>> pq; for( int i: nums){ pq.push(i); if(pq.size()>k){ pq.pop(); } } return pq.top(); } };
ALGO
0.99994
5.192022
06dfa165-ea07-43cb-a3de-7a40fb2021f8
GitCodeBoy/unreal-editor-dev
Engine/Source/Editor/UnrealEd/Private/ConvexDecompTool.cpp
/*============================================================================= ConvexDecompTool.cpp: Utility for turning graphics mesh into convex hulls. =============================================================================*/ #include "ConvexDecompTool.h" #include "Misc/FeedbackContext.h" #include "Settings...
ALGO
0.958496
6.826922
2e00c871-cfe5-4715-8a1b-2108c2406af8
guoyu07/CPPAlgo
KMP/kmp.cpp
// using c++11 #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <array> #include <bitset> #include <deque> #include <forward_list> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> #includ...
ALGO
0.999225
4.457434
a9903116-abde-4e66-ad90-a1fd14ea4f68
susantabiswas/Software-Interview-Essentials
Leetcode/Arrays/minimum-amount-of-time-to-collect-garbage.cpp
/* https://leetcode.com/problems/minimum-amount-of-time-to-collect-garbage/ This is more of a simulation problem. The tricky part is to add the travel time for each of the trucks for the houses where the pickup is needed. We save the cummulative travel time of going to each house and use this...
ALGO
0.999855
6.665458
bc9168ee-6915-4ebd-85ea-c423023a9f62
Sagar-Singh24/Placement_Series_-DSA-
Conditional_Statement/if_Else04.cpp
#include<iostream> using namespace std; int main(){ int a; cout<<"Enter the value of a: "; cin>>a; if(a>0){ cout<<"A is positive"<<endl; } else{ cout<<"A is negative"<<endl; } }
TOOL
0.988451
3.078385
7af040fa-0205-4789-9124-657497727bdd
V-nsh/DSA
leetcode/easy/stack/496_Next_Greater_Element_1.cpp
#include<vector> #include<iostream> #include<unordered_map> using namespace std; class Solution { public: vector<int> nextGreaterElementBrute(vector<int>& nums1, vector<int>& nums2) { vector<int> ans(nums1.size(), -1); unordered_map<int, int> map; /* create a lookup table sort of t...
ALGO
0.999701
5.594604
1092dc1f-41f6-4212-8bf1-472aa4a71830
rlichtenwalter/LPmade
netlib/mains/shortest_path_distribution.cpp
#include <iostream> #include <unistd.h> #include "../WeightedNetwork.h" using std::cin; using std::cout; using std::cerr; void usage( const char* binary ) { cerr << "Usage: " << binary << " [options]\n"; cerr << "Options: -h Print this usage message and exit\n"; } int main( int argc, char* argv[] ) { ...
ALGO
0.964359
3.528611
a61c8003-9868-464e-a7a6-e999aee8b753
adityabintang/dasarc-
Kasus6_PDP8_A18.2024.00150/main.cpp
#include <iostream> using namespace std; int main() { int n; // Meminta input ukuran array dari pengguna cout << "Input n: "; cin >> n; // Membuat array dengan ukuran n int arr[n]; // Menampilkan bilangan genap cout << "Hasil Array: "; for (int i = 0; i < n; i++) { if (i ...
ALGO
0.997091
5.69927
4b98024c-a3a5-41b9-b507-7f1af1dfc9ab
mapoferri/biobb_netprop
biobb_netprop/disc4all-data-fra/guild/src/boost/libs/sort/test/test_pdqsort.cpp
// Boost Sort library test_pdqsort.cpp file ----------------------------// // See http://www.boost.org/libs/sort for library home page. #include <vector> #include <string> #include <random> #include <boost/sort/pdqsort/pdqsort.hpp> // Include unit test framework #include <boost/test/included/test_exec_monitor.hpp...
TEST
0.924707
6.867496
af8c36b3-a62f-4a93-ba8b-ce507321dbec
venkyvt7/competitive-programming-1
SPOJ/Graph Traversal/Dijkstra/CHICAGO - 106 miles to Chicago.cpp
#include<bits/stdc++.h> #define mp make_pair #define fi first #define sec second #pragma GCC Optimize("O3") using namespace std; const int n = 105; typedef pair<double, int> ii; int N, M; double dist[n]; bool vis[n]; vector<ii> adj[n]; bool read () { cin >> N; if (N == 0) return false; cin >> M; for (int i =...
ALGO
0.999777
3.927469
f67f2a24-f856-49ff-8684-aadfb542e49e
simionsoft/SimionZoo
3rd-party/bullet3-2.86/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
#include "btConvexConcaveCollisionAlgorithm.h" #include "..//..//LinearMath//btQuickprof.h" #include "..//..//BulletCollision//CollisionDispatch//btCollisionObject.h" #include "..//..//BulletCollision//CollisionShapes//btMultiSphereShape.h" #include "..//..//BulletCollision//BroadphaseCollision//btBroadphaseProxy.h" #i...
ALGO
0.998957
7.141659
a2400c5a-9e59-44fa-a03f-c84c62506ab3
sherman-tang/PAT
BASIC_LEVEL_PRACTICE/1003.cpp
#include <iostream> #include <string> #include <vector> using namespace std; /* 1003 我要通过 describe: 得到正确答案的条件是: 1. 字符串中必须仅有 P、 A、 T这三种字符,不可以包含其它字符 2. 任意形如 xPATx 的字符串都可以获得“答案正确”,其中 x 或者是空字符串,或者是仅由字母 A 组成的字符串 3. 如果 aPbTc 是正确的,那么 aPbATca 也是正确的,其中 a、 b、 c 均或者是空字符串,或者是仅由字母 A 组成的字符串 input format: 每个测试输入包含...
ALGO
0.999697
4.438238
9d1845b6-a74a-44a7-8326-bb8e8d461c94
codemistic/Data-Structures-and-Algorithms
graph/code19.cpp
// Articulation Point // In this code, we will see articulation point .. articulation point is point .. removal of which makes 2 or more components // one easiest way to handle this would be removing each vertex and count connected components for it.. it takes O(E * (v+E)) time // now our approach is discovery time a...
ALGO
0.999697
5.293797
f219a772-8c25-4359-b5c4-5e4e4e55bd5d
Monal-Patel/amrsolver
lib/boost/libs/mpi/src/cartesian_communicator.cpp
// Authors: Alain Miniussi #include <algorithm> #include <cassert> #include <boost/mpi/cartesian_communicator.hpp> #include <boost/mpi/detail/antiques.hpp> namespace boost { namespace mpi { std::ostream& operator<<(std::ostream& out, cartesian_dimension const& d) { out << '(' << d.size << ','; if (d.periodic) {...
TOOL
0.935654
6.360961
838e44d9-1d4d-40e1-b064-c5028d4cab0c
QuantumRevenant/ProgOrientadaObj_I
[01-4] Guia 03- POO I/Problema3/project/model/Grupo.cpp
#include <iostream> #include <string> #include "Grupo.h" using namespace std; Grupo::Grupo() { } Grupo::Grupo(float *notas, int cantidad) { Alumnos = new float[cantidad]; for (int i = 0; i < cantidad; i++) *(Alumnos + i) = *(notas + i); cantidadAlumnos=cantidad; } Grupo::~Grupo() { delete[] ...
TOOL
0.931437
3.751302
2fa6a26f-d6fb-4b35-aa51-acbd3df56edf
Mulab11/cntt2016-hw1
TC-SRM-566-div1-500/WrongAnswer.cpp
#define MOD 1000000007 class PenguinEmperor{ public: // 循环卷积 int c[360]; void mul(int*a,int*b,int n){ for(int i=0;i<n;i++)c[i]=0; for(int i=0;i<n;i++) for(int j=0;j<n;j++)c[(i+j)%n]=(c[(i+j)%n]+1ll*a[i]*b[j])%MOD; for(int i=0;i<n;i++)a[i]=c[i]; } // f[i][j]:前i天位移为j的方案数 g[j]:daysPassed/numCities天位移为j的方案数 ...
ALGO
0.99995
4.023072
513fbd7b-3fe0-46d9-bf55-6a199c9c935b
Ryanray13/NYU_COURSE_OS
lab2/version_2/Simulator.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <string> #include "Simulator.h" using namespace std; extern string Scheduler_Type[]; string transition[4]={ "READY -> READY", "RUNNG -> BLOCK", "RUNNG -> READY", "BLOCK -> READY" }; enum State_Transition{ Ready_to_Ready=0, Running_to_Blocked...
TOOL
0.982618
3.074838
77af42f4-39d3-4a84-a014-c2f2c971fa36
zhuwenxi/PFNN-TVM
third_party/eigen3/bench/bench_norm.cpp
#include <typeinfo> #include <iostream> #include <Eigen/Core> #include "BenchTimer.h" using namespace Eigen; using namespace std; template<typename T> EIGEN_DONT_INLINE typename T::Scalar sqsumNorm(T& v) { return v.norm(); } template<typename T> EIGEN_DONT_INLINE typename T::Scalar stableNorm(T& v) { return v.sta...
TEST
0.983207
6.666052
9f039c83-7ebb-420e-b01f-0e89cd637bac
vickyguptaa7/CrackYourPlacement
6Companies30days/Microsoft/Number_of_Pairs_Satisfying_Inequality.cpp
/* _______________Policy Based DS______________*/ #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <class T> using ordered_set = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update >; // provides find_by_order, order_of_key /...
ALGO
0.999992
5.591672
6685f433-d766-479a-9e2c-9a382ab19b8c
amgrcia97/Projeto_Flutter
conversor_curso/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.998459
6.797273
8b679c6c-f993-460e-aff1-d23588ce328e
sayymeoww/coding
OPT/tasks (demian)/block 5/day 24/task 1.cpp
string s = ""; string get(string &s, int from, int len) { string ans = ""; int cnt = 0; for (int i = from; cnt < len; i++, cnt++) { ans += s[i]; } return ans; } void process(int p, int l) { string t = ""; int cnt = 0; for (int i = p - 1; cnt < l; i++, cnt++) { t += s[i ...
ALGO
0.999151
4.127398
a705a227-7d93-450b-943f-337566f61932
bbhulani/sdc_p11_path_planning
src/Eigen-3.3/demos/opengl/quaternion_demo.cpp
#include "quaternion_demo.h" #include "icosphere.h" #include <Eigen/Geometry> #include <Eigen/QR> #include <Eigen/LU> #include <iostream> #include <QEvent> #include <QMouseEvent> #include <QInputDialog> #include <QGridLayout> #include <QButtonGroup> #include <QRadioButton> #include <QDockWidget> #include <QPushButton...
ALGO
0.858081
5.849781
3218fdda-0a6d-4a1a-9623-696e849dd741
fushime2/competitive
atcoder/abc/abc047/test/b.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define FOR(i,a,b) for(int i=(a);i<(int)(b);i++) #define rep(i,n) FOR(i,0,n) #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define SZ(x) (int)(x).size() #define mset(a,x) memset(a,x,sizeof...
ALGO
0.999577
3.599361
08f6ea9b-ed70-4226-8678-08d3481f7bcc
ShivamDhamija/leetcodeQuestions
1207-unique-number-of-occurrences/1207-unique-number-of-occurrences.cpp
class Solution { public: bool uniqueOccurrences(vector<int>& a) { unordered_map<int,int>m; for(auto i:a) m[i]++; unordered_set<int>s; for(auto i:m) { if(s.find(i.second)!=s.end())return false; s.insert(i.second); } return tr...
ALGO
0.999953
5.7354
a76052bb-9253-44d6-bdbe-6c2dfda249fb
rupav/cp
competitive_coding/contests/612/612C2.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n+1]; for(int i=1; i<=n; i++) cin>>a[i]; int dp[n+1][2]; // 0 for even, 1, for odd, cost till i dp[0][0] = dp[0][1] = 0; for(int i=1; i<=n; i++){ } return 0; }
ALGO
0.999946
3.6479
c80e89e2-3828-4b16-91fd-637cf0212f4e
0210stark/HackerRank
WarmUp/SimpleArraySum.cpp
#include <iostream> #include <algorithm> int main() { int x; std::cin >> x; int arr[x]; for (int i = 0; i < x; i++) { int temp; std::cin >> temp; arr[i] = temp; } int sum = 0; for (int i : arr) { sum += i; } std::cout << sum << std::endl; }
ALGO
0.997522
4.27004
e627f49d-9690-4656-9185-679531eeb510
NQBH/advanced_STEM_beyond
OLP_ICPC/C++/DNDK_increasing_array.cpp
#include<iostream> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } long long tang = 0; for (int i = 1; i < n; i++) { if (a[i] < a[i - 1]) { tang += a[i - 1] - a[i]; a[i] = a[i - 1]; } } cout << tang; }
ALGO
0.999979
3.607613
1765fed8-999f-4140-971c-a3411363a1bc
nguyennhuhung37/Competitive-Programming-Contest
cf round 874 div3/cf round 874 div 3 Problem E.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; #define ii pair<int, int> #define iii pair<int, ii> int t; int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } set<int> S[200001]; int deg[200001]; bool visited[200001]; void solve() { int n; cin >> n; for(int i = 1; i ...
ALGO
0.998356
4.071556
db62c402-6381-4482-921b-09afe8bdf423
lee-honey/Baekjoon
C++/자료구조/큐/7662.cpp
#include <iostream> #include <set> using namespace std; int T(0), k(0); int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> T; while(T--) { multiset<int> st; cin >> k; while(k--) { char c; int i(0); cin >> c...
ALGO
0.998088
4.269118
4865f2b7-56aa-4988-a1de-3c583987bd7d
Hecodes98/Competitive_Programming
Regional Latam 2017/H.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define REPL(i,a,b) for(int i=a;i<b;++i) #define REPLE(i,a,b) for(int i=a;i<=b;++i) #define f first #define s second #define ALL(v) v.begin(), v.end() typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int,int>...
ALGO
0.999771
3.835261
c555cc45-efb1-41e1-9075-314de2722767
thealchemistguild/Box2DC
Box2D/Rope/b2Rope.cpp
#include <Box2D/Rope/b2Rope.h> #include <Box2D/Common/b2Draw.h> b2Rope::b2Rope() { m_count = 0; m_ps = NULL; m_p0s = NULL; m_vs = NULL; m_ims = NULL; m_Ls = NULL; m_as = NULL; m_gravity.SetZero(); m_k2 = 1.0f; m_k3 = 0.1f; } b2Rope::~b2Rope() { b2Free(m_ps); b2Free(m_p0s); b2Free(m_vs); b2Free(m_ims); ...
ALGO
0.996312
6.29539
8c2547a4-28b0-4305-ad1f-da838f64f9fb
AntoineTalaat/Leetcode-Problems
my-solutions/problems/course_schedule/solution.cpp
class Solution { vector<vector<int>> graph; bool done[]; public: bool canFinish(int numCourses, vector<vector<int>>& prerequisites) { bool starting[numCourses]; bool done[numCourses]; for(int i=0;i<numCourses;i++) { vector<int> temp; graph.push_back(temp); ...
ALGO
0.999932
6.111165
defbdcc6-47ed-414f-aa54-8d8ca5ce8389
Ajay9999krishna/DESIGN_AND_ANALYSIS_OF_ALGORITHMS-CSA0697
prime or not.cpp
#include<stdio.h> int main() { int n,i,c=0; printf("enter any number"); scanf("%d",&n); for(i=1;i<=n;i++) { if(n%i==0) c++; } if(c==2) { printf(" it is a prime number"); } else { printf("it is not a prime number"); } return 0; }
ALGO
0.999915
3.036662
e5ab2c92-8f9e-4138-bf02-c4b37fdcf2ca
divyansh1511/CPP
Striver sheet/DAY 19/5.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class treenode { public: int data; treenode *left; treenode *right; treenode(int data) { this->data = data; left = NULL; right = NULL; } ~treenode() { delete left; delete right; ...
ALGO
0.999865
4.283267
ffde4d81-e17e-4519-8ee3-bfc34bf21f76
grg124/wallbreakers-training
week 1/singleNumber.cpp
class Solution { public: int singleNumber(vector<int>& nums) { int l=nums.size(),x=0; for(int i=0;i<l;i++) { x=x^nums[i]; } return x; } };
ALGO
0.999959
5.484551
b1b306cf-31a2-4009-873c-84dbd002e483
Detectivebowon/Solved-problem
toi17_noodle.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; const int N=1e5+7; ll n,m,k,num[N]; ll mx=0; int main() { ios_base::sync_with_stdio(0);cin.tie(0); cin>>n>>m>>k; ll r=0; for(int i=1;i<=n;i++) { cin>>num[i]; r+=num[i]; } ll l=1; while(l<r) { ll...
ALGO
0.999987
3.936564
b255bd77-ccda-4cd2-bd33-2d17b79460a6
andymisu/AtCoderSolutions
AtCoder Beginner Contest 353/D.cpp
#include <bits/stdc++.h> using namespace std; ifstream fin("file.in"); int mod = 998244353; int num_cif(unsigned long long int x){ int ret = 0; while(x) { x /= 10; ret++; } return ret; } int main() { int n; cin>>n; vector<unsigned long long int> v(n); unsigned long long ...
ALGO
0.999955
4.904087
9fa5a3e4-e4d5-4247-9adc-a375eab2c18f
janani23-3/CSA5145-Cryptography
3. Playfair algorithm is based on the use of a 5 X 5 matrix C.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> #define SIZE 5 void generateMatrix(char key[], char matrix[SIZE][SIZE]) { int used[26] = {0}, k = 0; for (int i = 0; key[i] != '\0'; i++) { char ch = toupper(key[i]) == 'J' ? 'I' : toupper(key[i]); if (!used[ch - 'A'] && isalpha(ch)) { ...
ALGO
0.999995
5.285223
e4a32b00-5346-4a81-9dd7-61e90a5bda41
eric2003/OneFLOW
example/partition/struct/2d/stage1/01g/Partition.cpp
#include "Partition.h" #include "CgnsGrid.h" #include "SplitZone.h" #include "cgnslib.h" #include <string> double CalSumOfProcSpeed( std::vector<double> & procSpeed ); double CalSumOfProcSpeed( std::vector<double> & procSpeed ) { int nProc = procSpeed.size(); double sumOfProcSpeed = 0; for ( int iProc = 0;...
ALGO
0.99971
3.359752
030123a3-ff77-4020-96ba-2b64e05ef9ec
mcagriaksoy/advanced_modern_cpp_examples
addiational_example_4.cpp
// Mehmet Cagri Aksoy #include <algorithm> #include <iostream> #include <vector> using namespace std; /** * Calculates the minimum and maximum sums of a vector of integers. * * This function takes a vector of integers as input, and calculates the minimum and maximum sums of the vector. It does this by iterating o...
ALGO
0.999943
6.391776
8f8d601b-746e-420a-bf1c-feb16dbe6484
redm-pro/mLang
compiler/pass-rl.cpp
#include "pass-rl.h" #include "stage.h" #include "data.h" void rl_none_calc (VertexPtr root, int except) { int ii = 0; FOREACH_VERTEX (root, i) { if (ii != except) { rl_calc (*i, val_none); } else { rl_calc (*i, val_r); } ii++; } } void rl_r_calc (VertexPtr root, int except) { int...
TOOL
0.995723
3.472402
617d1c82-436e-43e8-ae34-245c69ce5244
jasojone/Cis17c2021
cis17cMtP1.1/main.cpp
//Libraries #include <iostream> #include <cstdlib> #include <ctime> #include <chrono> using namespace std; //Function Prototypes void fillAry(int [],int,int,int); int binSrch(int [],int, int); int main(int argc, char** argv) { //Set the random number seed srand(static_cast<unsigned int>(time(0))); ...
ALGO
0.996713
6.090906
46b7b754-dae5-4b30-b963-513a6c553f15
maqingyang-niil/concurrency
shared_queue.cpp
#include <iostream> #include "thread" #include <list> #include <algorithm> #include <functional> #include <mutex> #include <queue> #include <condition_variable> template<typename T> class queue { private: mutable std::mutex mut; std::queue<T> data_queue; std::condition_variable data_cond; public: queue(...
TOOL
0.863742
4.017326
d98ebc55-f8f0-4ca5-90fd-5885f2ae5e53
lawy623/Algorithm_Interview_Prep
Algo/Leetcode/062UniquePath.cpp
// dp class Solution { public: int uniquePaths(int m, int n) { vector<vector<int>> dp(m, vector<int>(n)); for(int i=0; i<m; i++){ for(int j=0; j<n; j++){ if(i==0 && j==0) dp[i][j] = 1; else if(i==0) dp[i][j] = dp[i][j-1]; else if(j==0) dp[i...
ALGO
0.99998
6.50286
f3b85846-516a-4c16-b0e5-b276f758b4a3
LifeofAGeek/cpp-DS-Algo
numbers_in_range.cpp
#include<bits/stdc++.h> using namespace std; #define int long long void solve(){ //code goes here int n,k; cin>>n; int arr[n]; for(auto &a:arr) cin>>a; //sort(arr,arr+n); cin>>k; while(k--){ // k queries int x,y; int ans=0; cin>>x>>y; for(int i=0;i<n;i++)...
ALGO
0.999918
4.549762
46f90845-5c56-413b-b667-f51f7b120843
ToDreamr/Cpp-Algorithm
DataStructure/ListNode/reverse_list.cpp
#include "../../cunion.h" class Solution { public: //翻转链表 //输入:head = [1,2,3,4,5] //输出:[5,4,3,2,1] //双指针法 ListNode *reverseList(ListNode *head) { ListNode *cur = head; ListNode *pre = NULL; ListNode *tmp = cur;//保存变量 while (cur) { tmp = cur->next;//保存原来的...
ALGO
0.99978
5.278226
ccac014e-76cb-4c92-b1bb-4d55b69c6b40
sublingbling/coding-everyday
11_04_2016_Invert_Binary_Tree/sousou.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* invertTree(TreeNode* root) { if (!root) return root; TreeNode* temp =...
ALGO
0.99997
6.237818
217779e0-7e19-4537-8db5-62986af5f657
Gogus12/informatyka
Lekcja 8 Funkcje/Zadanie 2 - Kalkulator funkcji matematycznych z opcją wielokrotnego wyboru.cpp
#include <iostream> using namespace std; int main() { int wybor; double num1, num2; do { cout << "Wybierz funkcje matematyczna:" << endl; cout << "1 - Suma" << endl; cout << "2 - Roznica" << endl; cout << "3 - Iloczyn" << endl; cout << "4 - Iloraz" << endl; ...
TOOL
0.91444
3.857338
b068f94b-b534-4c0d-9470-7411d37d9960
xrayFan/xray_history
xr_3da/xrGame/dRay/dRay_Plane.cpp
#include "stdafx.h"// Ripped from Paul Bourke #include "Include\dRay.h" #include "dxRay.h" int dCollidePR(dxGeom* RayGeom, dxGeom* PlaneGeom, int Flags, dContactGeom* Contact, int Stride){ dVector3 Plane; dGeomPlaneGetParams(PlaneGeom, Plane); dVector3 Origin, Direction; dGeomRayGet(RayGeom, Origin, Direct...
ALGO
0.92579
4.82566
83aece3a-f7b3-4ef7-ba1b-95903040d7aa
Samm07/Code-Library
longest_increasing_subsequence.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { FILE *fp; fp=fopen("input.txt", "r"); int n; fscanf(fp, "%d\n", &n); int arr[n]; int i,j; for(i=0;i<n;i++) fscanf(fp,"%d ",&arr[i]); int lis[n]; for(i=0;i<n;i++) lis[i]=1; for(i...
ALGO
0.999652
3.628355
319aed8b-1d42-4c9c-b0db-5ab7865622d3
Lintang-up/UTS-StrukturData
Bahan percobaan/percobaan 2..cpp
#include <iostream> #include <conio.h> #include <iomanip> #include <stdlib.h> using namespace std; struct mhs { int i, nim; string nama, prodi, kelas, asal; string Grade; float nilai1, nilai2, nilai3, nilai4, nilai5, hasil; }; int main() { int tmp; int i, J, pilih; char input; mhs jumlah[50];...
TOOL
0.960466
3.06728
e052389b-d4ba-4729-b571-55e70c8e33d1
201341/AlgorithmSol
jobdu/jobdu1078.cpp
//#include <iostream> //#include <string> // // // //using namespace std; // //struct Node{ // Node *lchild; // Node *rchild; // char c; //}Tree[50]; //int loc; // //Node *createTree(){ // Tree[loc].lchild = Tree[loc].rchild = NULL; // return &Tree[loc++]; //} // //void postOrder(Node *T){ // if(T->lchild != NULL){ // ...
ALGO
0.99999
3.946338
e6939a4d-4a95-4c73-ae07-2eadb19c650b
surajmate007/700_Topicwise_DSA_Solved_Problems
12_Graph/Extra_09_Find_Closest_Node_to_given_2_Nodes.cpp
// using Dijkstra Algo from both the nodes and then traversing over the distance aray to find the closest distance from both these nodes. class Solution { public: void dijks(int src, int n, vector<pair<int, int>> adj[], vector<int>& dist){ dist[src] = 0; priority_queue<pair<int, int>> pq; ...
ALGO
0.999998
5.864797
cc2a53ae-c3fb-4d58-af56-0e97b2e02794
SBULeeLab/node-cure-prototype
deps/icu-small/source/common/bytestriebuilder.cpp
#include "unicode/utypes.h" #include "unicode/bytestrie.h" #include "unicode/bytestriebuilder.h" #include "unicode/stringpiece.h" #include "charstr.h" #include "cmemory.h" #include "uhash.h" #include "uarrsort.h" #include "uassert.h" #include "ustr_imp.h" U_NAMESPACE_BEGIN /* * Note: This builder implementation stor...
TOOL
0.959
7.581193
1eebbe63-03c6-48d0-9b29-188d3210417a
bundangbunngu/ss10
ss10/Untitled5.cpp
#include <stdio.h> int insertionSort(int arr[], int n) { int i, key, j; for (i = 1; i < n; i++) { key = arr[i]; j = i - 1; while (j >= 0 && arr[j] > key) { arr[j + 1] = arr[j]; j = j - 1; } arr[j + 1] = key; } return 0; } int binarySearc...
ALGO
0.999992
5.321567
5c7aaad3-862d-4993-9cb6-72aa91a5cc37
Wentao2017/PSI-Boil
Src/Equation/Centered/LevelSet/levelset_front_minmax.cpp
#include "levelset.h" real frontPosition(real xyz1, real xyz2, real phi1, real phi2); /******************************************************************************/ void LevelSet::front_minmax() { /***************************************************************************//** * \brief Detect maximu and minimum of...
ALGO
0.999884
4.265648
097ee76a-c15d-4df4-9779-3d6611a2ca92
BZBY/NOI-linux
Data Structures/Linked List/SinglyLinkedList.cpp
/*A simple C++ program for singly linked list*/ #include <iostream> using namespace std; class Node{ public: int data; Node* next; Node(int value){ data=value; next=NULL; } }; Node* takeInput(){ //size of the linked list int size; cin>>size; //head and tail of the linked list intialised to NULL Node* hea...
ALGO
0.999444
5.019897
ea3c8158-75cf-4f8e-adca-7a7eecee724b
eskoruppa/PolyMC
BPStep/old_design/BPStep.cpp
#include "BPStep.h" /* * This Class stores the information about a certain base pair step. * * Contains informations about groundstate deformation Theta0. Access by pointer to arma::colvec * access T0: * - get_T0() * * Other members: * int id - id along chain * s...
ALGO
0.97416
4.362179
f07b14fc-f839-4dd7-9438-41c302fc1103
souta-pqr/Program_Practice
c++/15/enzn.cpp
#include<iostream> using namespace std; class Point{ private: int x; int y; public: Point(int a=0, int b=0){x=a; y=b;} void setX(int a){x=a;} void setY(int b){y=b;} void show(){cout << " x:" << x << " y:" << y << endl;} Point operator--(); Point operator--(int d); friend Point operator-(Point p1, P...
ALGO
0.941334
4.588202
3b514dc6-c06f-4a00-aeae-276cef447867
ellikamishra/Data-Structures-and-Files
Datastructures/FilesAndAlgo/expression4/src/expression4.cpp
#include <iostream> #include "stack.cpp" #include "stack.h" using namespace std; class tnode{ char data; tnode *lchild; tnode *rchild; friend class tree; }; class tree{ tnode *root; public: tnode *create() { stack<tnode*>s; char a[20];int i=0; tnode *t; cout<<"Enter expression"<<endl...
ALGO
0.998931
3.996275
012398cc-5321-4c3c-8470-6a1dcbf2d4d9
NahulRahman/C-_For_Noob_Steps
4.3.3 cbrt using pow.cpp
#include<iostream> #include<cmath> using namespace std; int main(){ double a,b,c; cin>>a>>b>>c; cout<<pow(a,1.0/3.0)<<endl<<pow(b,1.0/3.0)<<endl<<pow(c,1.0/3.0); return 0; }
ALGO
0.992242
3.517471
99f0d4ce-f99f-4b28-b825-6d2dbe024c82
plusyuyu/eigen
doc/special_examples/Tutorial_sparse_example_details.cpp
#include <Eigen/Sparse> #include <vector> #include <QImage> typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double typedef Eigen::Triplet<double> T; void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs, Eigen::VectorXd& b, con...
ALGO
0.999349
5.388735
13d91540-7d03-44aa-aaa7-aced8b851299
rerobika/jerryscript-optimizer
src/dominator-analysis.cpp
#include "dominator-analysis.h" #include "basic-block.h" #include "optimizer.h" namespace optimizer { DominatorAnalysis::DominatorAnalysis() : Pass() {} DominatorAnalysis::~DominatorAnalysis() {} bool DominatorAnalysis::run(Optimizer *optimizer, Bytecode *byte_code) { assert(optimizer->isSucceeded(PassKind::CONTR...
ALGO
0.999882
6.548419
e654daa8-0101-4ce8-bc84-49b480e50fda
yaseen1234567890/datastructures-CSA0374
factorial using recursion.cpp
#include <stdio.h> unsigned long long factorial(int n) { if (n == 0 || n == 1) { return 1; } else { return n * factorial(n - 1); } } int main() { int num; printf("Enter a positive integer: "); scanf("%d", &num); if (num < 0) { printf("Factorial is not defi...
ALGO
0.999713
5.943213
65d2ff34-5a6a-4d52-b883-42e65f312827
guangquanwang/gp_autoware
ros/src/computing/perception/detection/vision_detector/libs/dpm_ttic/gpu/tracking.cpp
/////tracking.cpp calculate_time-variation information ////////////////////////////////////////////////////////// #include <cstdio> #include <cstdlib> #include <cmath> #include <time.h> #include <opencv/cv.h> #include <opencv/highgui.h> #include <opencv/cxcore.h> //Header files #include "MODEL_info.h" //Model-str...
ALGO
0.995868
3.548566
0f03b9f1-0093-46ee-9708-11a99b0c9cf9
isaaclkh/SchoolStudy
2019/DataStructure/isaac/Labs/Lab06/selection.cpp
/** This brute force version of Selection Sort that takes O(n^2). * Instructor: Youngsup Kim * * 02/01/2019: Created * 02/10/2019: Compilation and DEBUG/DPRINT option added * * Compilation: * g++ selection.cpp -o sort * g++ selection.cpp -o sort -DDEBUG * To use DEBUG or test it, compile with -D o...
ALGO
0.999033
4.871753
5cb01a24-05f1-4fb1-9814-97b8cbdb6606
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/11/1128/personal_submission/cf398b_lyxxys.cpp
#include <bits/stdc++.h> using namespace std; template <class T> void fmax(T &a, const T &b){ if (b > a) a = b; } template <class T> void fmin(T &a, T b){ if (b < a) a = b; } void solve(){ using ld = long double; int n, m; cin >> n >> m; vector <int> row(n+1), col(n+1); int c1 = n, c2 = n;...
ALGO
0.999335
4.105221
18475006-1178-4c0c-8bac-680904fcbd0f
barbibrussa/algoritmos
cpp/casos_covid19/main.cpp
/** * Se desea tener estadísticas acerca de los casos de COVID-19 en las provincias del país (se incluye a la Ciudad * Autónoma de Buenos Aires como si fuera una provincia más). En primera instancia se ingresan los datos * del código (numerado del 1 al 24) de cada provincia y su nombre. Luego se ingresan los datos d...
DATA
0.95887
3.615375