uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
862ebcf9-3b74-4679-a4f6-cdaebd5e9c83
neilsong/USACO
gold/compatibilty/Source.cpp
#include <bits/stdc++.h> using namespace std; int inc_exc[] = { -1,1,-1,1,-1,1 }; struct S5 { int n; int v[5]; }; bool operator< (const S5 &a, const S5 &b) { for (int i = 0; i < 5; i++) { if (a.v[i] < b.v[i]) return true; if (a.v[i] > b.v[i]) return false; } return false; } S5 get_subset(S5& a, int x) { S...
ALGO
0.999959
4.384014
a709ceae-a2d9-4030-8565-da2b88009f6a
gonsolo/blender
extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp
#include "btCapsuleShape.h" #include "LinearMath/btQuaternion.h" btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) : btConvexInternalShape() { m_collisionMargin = radius; m_shapeType = CAPSULE_SHAPE_PROXYTYPE; m_upAxis = 1; m_implicitShapeDimensions.setValue(radius, 0.5f * height, radius); } btVec...
TOOL
0.882974
7.474803
29c9359b-75ac-4b8d-bb81-7a033e8c30c6
omonimus1/competitive-programming
codechef/process-a-string.cpp
// https://www.codechef.com/problems/KOL15A #include <bits/stdc++.h> using namespace std; int get_sum_digits(string word) { // Case 1 : string is empty if(word.size() == 0) return 0; // Case 2: string is NOT empty int sum = 0; for(int i=0; i < word.size(); i++) { cout << "sum...
ALGO
0.999497
6.136926
92e5e53c-db8d-4849-be11-24969ba66d18
murtazanarwar/Data-Structure-Algorithms-Competitive-Programming
CP31/1300/C_Deep_Down_Below.cpp
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <list> #include <set> #include <queue> #include <bits/stdc++.h> // Includes most standard libraries // Macro definitions and type aliases #define ll long long #define int long long // Use 64-bit integers by default #defin...
ALGO
0.999787
5.144305
8bb5f907-6444-4274-b3af-0b0025a32a49
minhthuan86/CTDL_GT
Queue_HangDoi_FIFO/Test_Dac_TruyenThong.cpp
#include<iostream> using namespace std; #define Max 10 struct Queue{ int A[Max]; int f,r; //front: ฤ‘แบงu, rear: ฤ‘uรดi }; void Init(Queue &Q){ Q.r=-1; Q.f=0; } bool IsEmpty(Queue Q){ return Q.f>Q.r; } bool IsFull(Queue Q){ return Q.r==Max-1; } void Push(Queue &Q,int a){ if(IsFull) { cout...
ALGO
0.997953
3.435923
4d0d2813-9e8d-4051-8b25-bfccb16685af
Gauravsharma-2002/LTCodes
966. Binary Subarrays With Sum/Solution.cpp
class Solution { public: int countSumEqualAndLess(vector<int>& arr,int goal){ if(goal<0) return 0; int size = arr.size(); int i=0;int j=0; int cnt=0; int sum =0; while(j<size){ sum+=arr[j]; if(sum<=goal){ cnt +=(j-i+1); ...
ALGO
0.999995
6.218619
bf4b396c-8efe-44aa-8273-660b4de50c8a
solareenlo/atcoder
06_AtCoder-Regular-Contest/arc115/C/C_002.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i=1; i<=n; i++) cout << 32-__builtin_clz(i) << " "; return 0; }
ALGO
0.999654
3.252105
028ef755-31bb-47a1-8b43-b633ad1a8203
cjbohlman/algorithm_review
c/Dijkstras.cpp
// Dijkstras.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> #include <queue> #include <limits> #include <set> class Dijkstras { public: struct Node { int weight; int index; }; friend bool operator> (Node const& a, Node const& b) {...
ALGO
0.999968
5.573515
a36c7f9e-a0a4-414c-a213-a5fc3b1c96ab
vmmc2/Competitive-Programming
Cracking The Code/Chapter 1 (Arrays and Strings)/1_1(is unique)(2).cpp
#include <bits/stdc++.h> using namespace std; bool hasUnique(string s1){ int tam = (int)s1.length(); for(int i = 0; i <= tam - 2; i++){ if(s1[i] == s1[i + 1]) return false; } return true; } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); string s = "abcde"; sort(s...
ALGO
0.999394
4.975006
5ca8dfee-2204-44ab-b6b1-66041026cc5a
eff3ct/Baekjoon-Online-Judge-Problem-Solving
16463/16463.cpp
#include <iostream> using namespace std; typedef struct _date { int day, month, year; bool isLeap() { if(year % 400 == 0) return true; if(year % 100 != 0 && year % 4 == 0) return true; return false; } bool operator<(const _date& a) { if(this->year < a.year) return...
ALGO
0.999847
4.089319
57984d99-f292-4207-acc5-019d6323c23f
simonepri/competitive-programming
IOI/[2006]writing/writing3.cpp
/** * Competitive Programming - Collection of solved problems. * * @author Simone Primarosa,(http://simoneprimarosa.com) * @link (https://github.com/simonepri/competitive-programming) * @license MIT License (https://opensource.org/licenses/MIT) */ #include <fstream> #include <queue> #incl...
ALGO
0.999824
3.644717
751e589a-58d5-490c-9c52-f0a82f68cc73
4C-multiphysics/4C
src/particle_interaction/4C_particle_interaction_dem_contact_rolling.cpp
#include "4C_particle_interaction_dem_contact_rolling.hpp" #include "4C_inpar_particle.hpp" #include "4C_particle_interaction_utils.hpp" #include "4C_utils_exceptions.hpp" #include <Teuchos_ParameterList.hpp> FOUR_C_NAMESPACE_OPEN /*---------------------------------------------------------------------------* | def...
ALGO
0.998357
5.946627
74fba288-9ebf-4c47-8dac-200e801ee8de
PhQuangMinh/PTIT
Kรฌ 4/Code PTIT DSA/DSA03011 - NแปI Dร‚Y 2.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long const int mod = 1e9+7; int n, k; void solve(){ cin >> n; priority_queue<ll, vector<ll>, greater<ll>> pq; for (int i=1;i<=n;i++){ ll x; cin >> x; pq.push(x); } ll ans = 0; while (pq.size()>1){ ll tmp...
ALGO
0.999847
4.305718
cb828117-20f9-4e97-82b7-bad25d548d9d
SciammarellaB/MK1_3D_Printer
buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.cpp
#include "pins_arduino.h" #ifdef __cplusplus extern "C" { #endif // Digital PinName array const PinName digitalPin[] = { PA_0, // Digital pin 0 PA_1, // Digital pin 1 PA_2, // Digital pin 2 PA_3, // Digital pin 3 PA_4, // Digital pin 4 PA_5, // Digital pin 5 PA_6, // Digital pin 6 PA_7, // Dig...
CONFIG
0.921355
6.375713
8601669b-a77f-4939-b024-c76747576d9d
bestcreator01/asia-travel-guide
AsiaTravelGuide/Box2D/Collision/Shapes/b2ChainShape.cpp
#include <Box2D/Collision/Shapes/b2ChainShape.h> #include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <new> #include <memory.h> b2ChainShape::~b2ChainShape() { b2Free(m_vertices); m_vertices = NULL; m_count = 0; } void b2ChainShape::CreateLoop(const b2Vec2* vertices, int32 count) { b2Assert(m_vertices == NULL...
ALGO
0.967182
6.876169
366b6915-9ca9-4335-9b8a-42b0ae6190a1
SMiles02/CompetitiveProgramming
Codeforces/CF 1400 - 1499/CF1426/CF1426B.cpp
#include <bits/stdc++.h> #define ll long long #define sz(x) (int)(x).size() #define pii pair<int,int> using namespace std; void solve() { int n,m,a,b,c,d; bool diag=0,side=0; cin>>n>>m; set<pair<pii,pii>> s; while (n--) { cin>>a>>b; cin>>c>>d; s.insert({{a,b},{c,d}}); ...
ALGO
0.999957
3.757693
bb340850-8f6e-46be-b896-b9b43345907b
Vegas-Guy/XDE2
src/instantx.cpp
#include "uint256.h" #include "sync.h" #include "net.h" #include "key.h" #include "util.h" #include "base58.h" #include "main.h" #include "protocol.h" #include "instantx.h" #include "activemasternode.h" #include "masternodeman.h" #include "darksend.h" #include "spork.h" #include "txdb.h" #include <boost/lexical_cast.hp...
TOOL
0.990698
5.0859
456f4307-f516-4646-94ba-806f3b495da8
Leofierus/Games
07 Racing (Top Down)/main.cpp
#include <SFML/Graphics.hpp> using namespace sf; const int num=8; //checkpoints int points[num][2] = {300, 610, 1270,430, 1380,2380, 1900,2460, 1970,1700, 2550,1680, 2560,3150, ...
ALGO
0.996073
4.383274
48441230-ec8b-4b41-a968-31e75e80610e
naymur92/CompetitiveProgramming_or_DSA_CPP
81_multi_source_bfs.cpp
/* https://www.codechef.com/SNCKPB17/problems/SNSOCIAL/?tab=statement */ #include <bits/stdc++.h> using namespace std; const int N = 1e3 + 10; const int INF = 1e9 + 10; int val[N][N]; int visited[N][N]; int level[N][N]; int n, m; void reset() { for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { visi...
ALGO
0.999933
5.629024
77c2da31-d83d-436b-9277-f447db9dc574
Apurba94/10-Years-of_Competitive-Programming-Resources-Collection
Codeforces From 2011-2023/1512A-SpyDetected.cpp
#include <cstdio> #include <vector> #include <algorithm> int main(){ long t; scanf("%ld", &t); while(t--){ long n; scanf("%ld", &n); std::vector<std::pair<long, long> > v(n); for(long p = 0; p < n; p++){scanf("%ld", &v[p].first); v[p].second = p + 1;} sort(v.begin(), v.end()); ...
ALGO
0.99984
3.766343
1e7161e2-fe46-4428-a803-d994688c52fb
ryo-manba/AtCoder
ABC/ABC181/c/main.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const int INF = (int)1e9; const ll INFL = (ll)1e15; const int MOD = 1e9 + 7; int dy[]={0, 0, 1, -1, 0}; int dx[]={1, -1, 0, 0, 0}; int main() { int n; cin >> n; vecto...
ALGO
0.999966
4.39331
219a1fdc-b6f0-49ff-990e-febac6efe0c7
kmadhav907/CP-Tutorials
findMaximum1.cpp
class Solution { public: int findMaxConsecutiveOnes(vector<int>& nums) { int count = 0; int maxi = 0; for(int i = 0 ; i < nums.size(); i++){ if(nums[i] == 1){ count++; } else { maxi = max(maxi , count); count...
ALGO
0.999983
6.077695
23aaffc9-99f9-4a52-9131-87bc9e59a3eb
ShivanshRajput/LeetCode_Solutions
1818-maximum-score-from-removing-substrings/maximum-score-from-removing-substrings.cpp
class Solution { public: int maximumGain(string s, int x, int y) { string top = "ab"; string bot = "ba"; int top_score = x; int bot_score = y; if(y>x){ swap(top , bot); swap(top_score , bot_score); } int res = 0; vector<char>stk...
ALGO
0.999944
5.699685
da2bfd56-f107-4e7e-bfc8-95bc5afc9d2f
SourVoice/c-leetcode-Experiment
leetcode/1725. Number Of Rectangles That Can Form The Largest Square.cpp
// 1725. ฮณฮตฤพฤฟ #include <vector> #include <algorithm> using namespace std; //ๆทจ class Solution { public: int countGoodRectangles(vector<vector<int>> &rectangles) { int maxLen = 0; vector<int> minSide(rectangles.size(), 0); for (auto &rect : rectangles) { minSide.push_...
ALGO
0.999894
5.873488
c500c89f-4b58-41d2-b09b-f751d9def1b4
XianweiCheng01/gem5_SALAM
src/systemc/tests/systemc/misc/synth/blast/blast3/blast3.cpp
/***************************************************************************** blast3.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*****************************************************************************...
TOOL
0.971642
4.157978
355cc3ea-f54f-4852-85af-b90fa94897a3
ejiseok/problem-solving
Baekjoon/2753/2753.cpp
#include <iostream> using namespace std; int main() { int y; scanf("%d", &y); if (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0)) printf("1\n"); else printf("0\n"); return 0; }
ALGO
0.999991
4.607283
5b434656-f6d5-4cc0-bb3d-48891de9b1b4
ishandutta2007/codeforces
danya.smelskiy/normal/433/A.cpp
#include <bits/stdc++.h> using namespace std; long long n,x,now,t,k; int main(){ cin>>n; for (int i=1;i<=n;++i){ cin>>x; if (x==100) ++t; else ++k; now+=x; } if (now%200!=0){ cout<<"NO"; return 0; } now/=2; bool ok=false; for (int i=0;i<=t...
ALGO
0.999747
3.470133
6050e2be-ebe0-4aff-bf9a-a460112ce054
IslamAmr155/Problem-Solving
LeetCode/Hard/25. Reverese Nodes in k-Group.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: void rev(ListNode* &p...
ALGO
0.999998
5.505435
f8cbb1d5-883f-4bfe-a9f1-226e1236f7e1
GrootTheDeveloper/OLP-ICPC
800+BAI_CODE_HAY/Code/CIRCLE.CPP
#include <bits/stdc++.h> using namespace std; const int N = (1 << 21) + 35; int dp[N][21]; bool prime[50]; void init(){ prime[0] = prime[1] = true; for (int i = 2; i * i <= 40; i++) if (!prime[i]) for (int j = i * i; j <= 40; j += i) prime[j] = true; } signed main(){ ios_base::sync_with_stdio(false); cin.tie(0)...
ALGO
0.999906
4.244688
9c399638-5f94-4f2c-bed2-348572add8b4
baagi-rebel/Hackeearth
countingsort.cpp
#include<bits/stdc++.h> #include<string.h> #include<tuple> #define all(c) c.begin(),c.end() #define em emplace_back #define pb push_back #define mt make_tuple #define mp makle_pair #define ll long long int using namespace std; typedef vector<ll>vi; typedef vector<vi>vii; typedef pair<ll,ll>pi; typedef tuple<ll,ll,ll>ti...
ALGO
0.999983
3.861033
7f07fa64-6950-4cc8-9df7-8f59c2fa5890
Armen-Kh/CONTAINER_CLASSES
Sources/myset.cpp
#include <myset.hpp> #include <iostream> MySet::MySet() : root(nullptr), size(0) { std::cout << "MySet object created\n"; } MySet::~MySet() { std::cout <<"MySet object deleted!\n"; delete root; } bool MySet::insert(int d) { if(0 == size) { root = new set_Node(d); ++size; return true; } set_Node *curr...
TOOL
0.971075
3.815553
2c9cb528-2c5c-465d-abdc-ef74b586c141
raincross7/code-similarity
codes/train_code/problem435/problem435_70.cpp
#include<bits/stdc++.h> using namespace std; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i,a,b) for(inti=a;i<=b;i++) typedef long long int ll; typedef vector<int>vi; typedef pair<int,int>pi; int main() { int n; cin>>n; int ans = 0; int i =1; for(int index =0;index<n;index...
ALGO
0.99987
3.112195
0d1f0d4d-f15a-4d58-815c-221e066dce72
ishandutta2007/codeforces
dreamoon_love_aa/normal/553/B.cpp
#include <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%d", &(X), &(Y)) #define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y...
ALGO
0.999969
3.15958
ed9b24c7-127b-4124-9515-3def23e72fe9
firewood/topcoder
srm_6xx/srm_674/RelationClassifier.cpp
// BEGIN CUT HERE /* SRM 674 Div2 Easy (250) ๅ•้กŒ -้›†ๅˆXใจYใŒไธŽใˆใ‚‰ใ‚Œใ‚‹ -Xใฎ่ฆ็ด ใจYใฎ่ฆ็ด ใ‚’ไธ€ใคใšใคใƒšใ‚ขใซใ™ใ‚‹ -ไปปๆ„ใฎXใฎ่ฆ็ด ใŒYใฎ่ฆ็ด ใฎไธ€ใคใ ใ‘ใจใƒšใ‚ขใงใ€ไปปๆ„ใฎYใฎ่ฆ็ด ใŒXใฎ่ฆ็ด ใฎไธ€ใคใ ใ‘ใจใƒšใ‚ขใ‹ใฉใ†ใ‹ใ‚’ๆฑ‚ใ‚ใ‚‹ */ // END CUT HERE #include <algorithm> #include <string> #include <set> #include <vector> #include <iostream> #include <sstream> #include <cstring> using namespace std; class Relati...
ALGO
0.999643
4.673212
264e6170-3955-468b-8f6b-9c54e588f3d9
ElSombrero2/px4-fork
src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp
/** * @file FlightTaskOrbit.cpp */ #include "FlightTaskOrbit.hpp" #include <lib/systemlib/mavlink_log.h> #include <mathlib/mathlib.h> #include <px4_platform_common/events.h> #include <lib/geo/geo.h> using namespace matrix; FlightTaskOrbit::FlightTaskOrbit() { _sticks_data_required = false; } bool FlightTaskOrbi...
TOOL
0.989348
7.144315
336f5f63-0ac9-4155-8903-e6353d0fe4e1
Bharatkgupta/leetcode-bkg
1331-rank-transform-of-an-array/1331-rank-transform-of-an-array.cpp
class Solution { public: vector<int> arrayRankTransform(vector<int>& arr) { // Create a copy of the array to avoid modifying the original vector<int> sortedArr = arr; sort(sortedArr.begin(), sortedArr.end()); // Use an unordered map for efficient rank lookup unordered_map<in...
ALGO
0.999992
6.924884
0ea1ae25-576d-45f0-84e0-dc4f5163acd5
Arshadak04/coding-ninja
coding ninjas/linked_list/LL_basic_print.cpp
#include<iostream> using namespace std; class node{ public: int data; node *next; node(int data){ this->data=data; next=NULL; } }; void print(node *head){ node *temp=head; while(temp!=NULL){ cout<<temp -> data<<" "; temp=temp -> next; } } int main(){ node n1(10); node *head=&n1; node n2...
ALGO
0.988953
4.035713
a32ae65d-d6f9-4caf-86e4-e9cd482bf54e
hjiang13/LLMs-in-IR
POJ-104/27/115.cpp
#include <iostream> using namespace std; int main() { int i,n; float a,b,c,d; double disc,x1,x2,rpart,ipart; cin >> "%d",&n); for(i=1; i<=n; i++) { cin >> "%f %f %f",&a,&b,&c); disc=b*b-4*a*c; d=-b/(2*a); if(fabs(disc)<=1e-6) { cout << "x1=x2=%.5lf\n",d); } else if(disc>1e-6) { x1=(-b+sqrt(disc))/(2*a); x2=(-b-sqrt(dis...
ALGO
0.999648
3.49708
38df0143-5b2e-40ec-b875-f9fcf89ed8b7
Dharnesh67/decode-cpp
searching/binary_seearch/question.cpp
// find first occcurence of x in sorted array #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> v; v = {1,2,2,3,3,3,3,3,4,4,5,8,9}; int low = 0, high = v.size() - 1; int target = 4; while (low <= high) // low<= high tak chalayenge { ...
ALGO
0.999938
4.754737
81858f9c-02c0-4ba9-9153-80d92e087986
petergartland/jumping-into-C-
chapter28/prob1.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; int main() { fstream myfile("highscoresbinary.bin", ios::binary | ios::in | ios::out); if(! myfile.is_open()) cout<<"error opening file\n"; int score; cout<<"enter a score\n"; cin >> score; streampos pre_score_pos ...
TOOL
0.863759
3.213346
0ae5dc27-b7ff-438f-8bd2-5874a6b29750
itzPEKOS/CU-Grader
ComProg/Recurrences_1.cpp
#include <bits/stdc++.h> #define f first #define s second #define ll long long #define pii pair<int, int> using namespace std; int F(int n); int M(int n); int H(int n) { // Tower of Hanoi if(n == 0) return 0; return 2*H(n-1)+1; } int C(int n) { // Catalan Number if(n == 0) return 1; ll res = 0; ...
ALGO
0.999463
4.708578
df12bd46-91f8-441e-b345-a1faaead7bed
raincross7/code-similarity
codes/train_code/problem412/problem412_299.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (int i = 0; i < (n); ++i) #define INF (1LL<<50) #define MOD 1000000007 int main(){ ll x,y; cin >> x >> y; ll ans; // 1ๅ›ž็›ฎใซ็ฌฆๅทใ‚’ๅ่ปขใ•ใ›ใ‚‹ๅ ดๅˆ ll A = 1 + y - (-x); // ๆœ€ๅพŒใซ็ฌฆๅทใ‚’ๅ่ปขใ•ใ›ใ‚‹ๅ ดๅˆ ll B = (-y) - x + 1; // ๆœ€ๅˆใจๆœ€...
ALGO
0.999992
3.601218
32ae7d13-0db1-4416-9881-837810c8c508
Sciss/Almat-Guests
Almat-LD/ugens/kuramoto_backup.cpp
#include "SC_PlugIn.h" // number of inputs before array of control signals #define INPUTOFFSET 2 static InterfaceTable *ft; struct Kuramoto : public Unit { double* phases_prev; int n_oscs; }; extern "C" { void load(InterfaceTable *inTable); void Kuramoto_Ctor(Kuramoto* unit); void Kuramoto_next_a(Kuramot...
ALGO
0.956996
4.309121
db873ea9-b504-44fa-ae50-95cbde10c509
DDmosUriel/09-CursoCPlusPlus
c135_displayStringRecursive.cpp
/* Ejercicios de C++ c135 - displayStringRecursive funciรณn recursiva que despliega recursivamente una cadena */ // Incluรญmos las librerรญas #include <iostream> // Definiciรณn de espacios de nombre using namespace std; // FnImprime("cat") = imprimir c y llamar a FnImprime("at"); // FnImprime("at") = imprimir a ...
ALGO
0.99589
6.14724
85b0df52-0dcd-458c-9304-f0ec24b37a93
TheMusicBoy/osLabs
task4/src/temperature_storage.cpp
#include <temperature_storage.h> #include <common/public.h> #include <string.h> #include <algorithm> namespace TemperatureStorage { namespace { std::pair<time_t, double> ParseLine(const char* line) { std::tm tm{}; double value; sscanf(line, "%2i/%2i/%4i - %2i:%2i:%2i %lf", &tm.tm_mday, ...
TOOL
0.864026
6.777325
6c389b3d-1c56-49a6-8aed-c7c213ad47d4
YAINGNGAH/cpp_examples
sort_students/test.cpp
#include <catch.hpp> #include "sort_students.h" namespace { struct TestData { std::vector<Student> students; SortKind sort_kind = SortKind::Name; std::vector<Student> result; }; const std::vector<TestData> TESTS = { { .students = { { .name = "Petr", .last_name = "Petrov", .birth_d...
TEST
0.978189
7.201419
c6921f9f-a468-448b-883e-6556e3e961e4
Foreverhighness/MyLeetcode
140. Word Break II/main.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<string> wordBreak(string s, vector<string>& wordDict) { unordered_set<string_view> S; unordered_map<int, vector<string>> dp; string_view ss{s}; int n = ss.length(); dp[n].emplace_back(""); ...
ALGO
0.999608
6.138816
8f7f9b09-c633-49de-8b38-16b9376f84b2
kmjp/procon
codeforce/801-850/833/f2.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #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 FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999877
3.462259
08cb36d8-2b54-4cda-b840-8963d18e73a5
krisshsabareesh/cppStarter
eList.cpp
#include "event.h" // create a simple node class Node { public: class Event event; class Node *next; }*head = NULL; static int listSize = 0; // initialize list size //----CREATE FUNCTION TO INSERT INTO LIST---- int insert(int lSize) { int t,n; class Node *newNode; std::cout <<("Enter time : "); std::cin >> ...
TOOL
0.993607
3.899154
64782432-919f-4515-8513-a251553657a8
Narendra-Jadhav/DSA-Practice
08_Cpp_STL.cpp/09_Map.cpp
#include <iostream> #include <map> #include <unordered_map> using namespace std; //* MAP //? data is stored in key-value format //? keys are unique //? one key will point to one value //? map gives keys in sorted manner; while unordered_map gives keys in random manner //! map -> Red-Black trees / Balanced Trees impl...
ALGO
0.971624
4.091669
41f412c3-b0c7-44cd-83ef-831de0a5290a
PauloMiranda98/Grupo-Preparatorio-para-OBI-2019
Contest 04ยบ semana/C.cpp
#include <iostream> using namespace std; int main() { int l, c; cin >> l >> c; cout << l*c + (l-1)*(c-1) << "\n"; cout << (l-1)*2 + (c-1)*2 << "\n"; return 0; }
ALGO
0.996795
3.501131
6e8d5fbe-5136-4908-a1fa-57ea5099e7ea
akash-gupta0/DSA
pattern/pattern10.cpp
#include <iostream> using namespace std; int main() { int n; cout << "enter the value of n "; cin >> n; for (int row = 1; row <= n; row++) { for (int space = 0; space < n - row; space++) { cout << " "; } //int c = row > n ? (2 * n - row) : row; f...
ALGO
0.999364
3.604268
089290c3-4df0-4de2-9c5b-fe26f443d16a
coolpi-george/panfork
src/intel/compiler/brw_fs_cmod_propagation.cpp
#include "brw_fs.h" #include "brw_cfg.h" #include "brw_eu.h" /** @file brw_fs_cmod_propagation.cpp * * Implements a pass that propagates the conditional modifier from a CMP x 0.0 * instruction into the instruction that generated x. For instance, in this * sequence * * add(8) g70<1>F g69<8,8,1>F ...
ALGO
0.881294
6.956767
d39096f5-e5d1-4f37-ad9f-96023d8580f5
XhAfAn1/Data-Structure-Course-Material-with-Problem-and-Solve-Using-CPP-Language
lab/lab 5/main.cpp
#include<iostream> #include "queue.h" using namespace std; int main(){ Q *q=new Q(); stack *s=new stack(); int m=-1; while(m!=0){ cout<<"MENU"<<endl; cout<<"1.enqueue"<<endl; cout<<"2.dequeue"<<endl; cout<<"3.Size"<<endl; cout<<"4.Isempty"<<endl; cout<<"5.Distroy "<<endl; ...
TOOL
0.95334
3.367101
e0dd3b61-9af2-433d-8c93-fcff37b05fb2
GodaPranathi/AP20110010070-CS306L
Week7/First&Follow.cpp
#include<bits/stdc++.h> using namespace std; set<char> ss; bool dfs(char i, char org, char last, map<char,vector<vector<char>>> &mp){ bool rtake = false; for(auto r : mp[i]){ bool take = true; for(auto s : r){ if(s == i) break; if(!take) break; if(!(s>='A'&&s...
ALGO
0.999868
3.981199
babbad51-4dea-4b6c-a1fa-101f1df5f1ce
priya2001/gfg_potd_AC
Easy/Parenthesis Checker/parenthesis-checker.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to check if brackets are balanced or not. bool ispar(string x) { stack<char> s; for(int i = 0; i < x.length(); i++){ char ch = x[i]; ...
ALGO
0.998322
6.138707
df58a34f-db69-412c-b989-9ff4f13dcb30
Shekhu04/DSA-LoveBabbar
Patterns.cpp/patterns22.cpp
#include<iostream> using namespace std; int main(){ int n; cin >> n; int row = 1; while(row<=n){ //Printing Space int space = row - 1; while(space){ cout << " "; space = space - 1; } //printing Stars int col = 1; while(...
ALGO
0.999965
4.158603
52f28f47-d38e-4dfa-8eff-35a112c7c81f
play-co/gcif
decoder/Filters.cpp
#include "Filters.hpp" #include "Enforcer.hpp" using namespace cat; // Default zero static const u8 FPZ[3] = {0}; //// Simple Spatial Filters static const u8 *SFF_A(const u8 * CAT_RESTRICT p, u8 * CAT_RESTRICT temp, int x, int y, int xsize) { if (x > 0) { return p - 4; // A } else if (y > 0) { return p - xsize...
TOOL
0.966912
5.323542
948a8065-0de7-46fd-ace4-7447543f8c44
thuva4/Algorithms
algorithms/C++/LongestIncreasingSubsequence/LIS.cpp
/* BUILD : g++ FisherYatesShuffle.cpp -std=c++11*/ #include <iostream> #include <vector> using namespace std; void LIS(vector<int> input) { int input_length = input.size(); int longest_length = 1; int longest_index = 0; vector<int> dp(input_length, 1); vector<int> trace(input_length, -1); ve...
ALGO
0.999982
5.017089
59ff882f-305a-4d3a-a302-fbd5a8f49b5e
ishandutta2007/codeforces
deemo/normal/19/A.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<vector> #include<stack> #include<queue> #include<deque> #include<set> #include<map> #include<string> #include<utility> #include<iomanip> #include<fstream> #include<list> #include<sstream> #include<cstring> #include<bitset> #include<functi...
ALGO
0.999841
3.84305
cf07f760-8f08-4db4-8e3f-ebcddba39654
Xiarain/Navigation_using_Octomap
g2o_with_orbslam2/g2o/examples/calibration_odom_laser/closed_form_calibration.cpp
#include "closed_form_calibration.h" #include "g2o/types/sclam2d/odometry_measurement.h" #include <iostream> #include <limits> #include <Eigen/SVD> #define SQR(X) ( std::pow(X,2) ) #define CUBE(X) ( std::pow(X,3) ) using namespace Eigen; namespace g2o { bool ClosedFormCalibration::calibrate(const MotionInforma...
ALGO
0.999632
6.363627
4f0fce05-0efa-41c0-bcca-e835f7befe3d
Cccmm002/my_leetcode
173-binary-search-tree-iterator/binary-search-tree-iterator.cpp
// Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. // // Calling next() will return the next smallest number in the BST. // // Note: next() and hasNext() should run in average O(1) time and uses O(h) memory, where h is the height of the tree. // // ...
ALGO
0.999962
5.955145
8e2339f8-83e4-4183-9675-76cc0a0cc18c
Chan531/BaekJoon_Online_Judge
3์˜๋ฐฐ์ˆ˜.cpp
#include <iostream> #include <string> using namespace std; void checkthmul(string s, int cnt) { if (s.length() == 1) { cout << cnt << '\n'; if (s == "3" || s == "6" || s == "9") cout << "YES"; else cout << "NO"; return; } int n = 0; for (int i = 0; i < s.length(); i++) n += s[i] - '0'; return...
ALGO
0.999845
4.150468
503338cd-6e72-4bad-8353-063ec12fbfe7
ZhouWeikuan/zoj
zju.finished/1424.cpp
#include<iostream> using namespace std; enum { NUM = 16, SIZ = 1<<NUM, }; struct Rect{ int x0, x1, y0, y1, c; }; int num; unsigned step[SIZ]; bool nex[NUM][NUM]; int pre[NUM]; Rect r[NUM]; void dfs(unsigned stat, int pc){ unsigned ns; int i, j; for(i=0; i<num; i++){ if(pre[i] != 0) cont...
ALGO
0.999622
4.15552
a6e289f3-5370-4755-b903-6acdc98e295d
NikhilGupta1997/Lift-MDP-Model
main.cpp
#include "state.h" #include <iostream> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <vector> #include <string> #include <math.h> using namespace std; // N - number of floors // K - number of elevators // p - probabilty to arrive // q - probabilty arrives at floor 1 // r - probabilty destination i...
ALGO
0.99849
3.758107
3071ce44-4661-468c-9330-6fd86aa1f655
54skyxenon/USACO-Training
Chapter 1/1_5/ariprog.cpp
/* ID: bwliang1 TASK: ariprog LANG: C++17 */ #include <bits/stdc++.h> using namespace std; #define maxN 25 #define maxM 250 #define maxB (2 * maxM * maxM) int n, m; bool is_bisquare[maxB + 1]; void setIO(string s) { ios_base::sync_with_stdio(false); cin.tie(nullptr); freopen((s + ".in").c_str(), "r", st...
ALGO
0.999932
4.107513
392c4ed4-89df-4acf-8376-2d599a23dcdb
ishandutta2007/codeforces
madball/normal/568/B.cpp
#include <iostream> #include <cstdlib> #include <vector> #include <string> #include <algorithm> using namespace std; typedef long long ll; const int lim = 4005; const int inf = 1e+9 + 7; unsigned int dp[lim][lim]; int main() { /*freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);*/ unsigned int ...
ALGO
0.999975
3.695513
d720b1f0-03bf-46cb-bd35-bb74240d83ce
mfaramarzi/CSC212_Data-Structure
HW-4-Arithmetic-Expressions/in2pos.cpp
// I need minus behind number and also space between operands and operatrs #include<iostream> #include<stack> using namespace std; // defines the Boolean function for operator, operand, equalOrhigher precedence and the string conversion function. bool IsOperator(char); //func to check if it is a operator bool Is...
ALGO
0.998945
4.217672
e5f5c7f4-bce0-46a7-9c13-065c0bdec7ee
ibrahim-othman/CP-Solutions
Atcoder/C++ 23 (gcc 12.2)/abc328_d/47519956.cpp
#include <bits/stdc++.h> #define loop(i, n) for(ll i = 0; i< n; i++) #define Loop(i, n) for(ll i = 1; i< n; i++) #define ll long long #define fillArray(n, arr) ll arr[n]; for(ll i=0; i< n; i++) cin>>arr[i] #define fillVector(n, arr) vector<ll> arr(n);loop(i,n)cin>>arr[i]; #define speed cin.tie(0); cin.sync_with_stdio...
ALGO
0.999785
4.406556
3e0a7ebd-171b-48a8-b7bb-9cc7872bb8d3
gnoliyil/opencv-dpm
src/dpm_cascade.cpp
#include "dpm_cascade.hpp" #include "dpm_nms.hpp" #include <limits> #include <fstream> #include <iostream> #include <stdio.h> using namespace std; namespace cv { namespace dpm { void DPMCascade::loadCascadeModel(const string &modelPath) { // load cascade model from xml bool is_success = model.deserialize(mo...
ALGO
0.996106
6.003409
a9d9c8e9-201a-4041-aaae-0d68d45185bd
Mohamed-Hossam/Problem-Solving
codeforces/359-C/359-C-16706557.cpp
//In the name of Allah #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<vector> #include<set> #include<map> #include<unordered_map> #include<queue> #include<stack> #include<iterator> #include<cmath> #include<string> #include<sstream> #include<cstring> #include<ctype.h> #include<iom...
ALGO
0.999792
3.210131
fd07a76c-7b9a-4ef0-9f12-8d5769a2c148
yaoxiaokui/linux_ever
offer/beautyOfPromCh3/33string.cpp
/************************************************************************* > File Name: 33string.cpp > Author: > Mail: > Created Time: Thu 25 Aug 2016 11:07:19 AM CST ************************************************************************/ #include <iostream> #include <string> #include <algorithm> using namesp...
ALGO
0.99931
3.874339
017925af-a2ae-45d8-9ab2-f973cb86475a
LVutner/LostAlpha_Engine
xray-svn-trunk/xr_3da/xrGame/ElevatorState.cpp
#include "stdafx.h" #include "ElevatorState.h" #include "ClimableObject.h" #include "PHCharacter.h" #include "MathUtils.h" #include "PHWorld.h" #ifdef DEBUG #include "../Statgraph.h" #include "PHDebug.h" #endif static const float getting_on_dist =0.3f; static const float getting_out_dist =0.4f; static const float sta...
TOOL
0.854728
4.116945
a5805cf9-462b-47f1-899c-0527c64d33a0
Talibb555/codeforces
AAGa_xor.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t;cin>>t; while (t--) { int n;cin>>n; int a[n]; for(int i=0;i<n;i++) cin>>a[i]; bool ans=0; int x=0; for(int i=0;i<n-1;i++){ x^=a[i]; bool f=0; int xx=0; ...
ALGO
0.99995
4.207979
7744cff1-5d36-467f-b6b6-4e5b62aba275
hwanzar/Code
FAST CODE/sandbox.cpp
// string::find #include <iostream> // std::cout #include <string> // std::string int main() { std::string str("There are two needles in this haystack with needles."); std::string str2("abc"); std::cout << str.length(); // different member versions of find in the same order as above: std::size_t...
TOOL
0.944467
5.672007
af86c6e0-0ca5-414e-ae49-65bdbefa3b7e
harsh-haria/c-plus-plus
DS/linked_list_arbitrary_pointer_merge.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* arbit; Node* next; Node(int x){ data = x; arbit = NULL; next = NULL; } }; Node* sortedMerge(Node* head1, Node* head2){ Node *ans = NULL; Node *return...
ALGO
0.999982
4.893482
cd4491d0-8484-47f7-99fa-301942ffc3e7
GauravN0910/codeforces-cpc
ArrayStabilization-GCDVersion.cpp
#include<bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; struct segmentTree{ int size; vector<long long> gcds; void init(int n){ size = 1; while(size<n){ size = size*2; } gcds.assign(2*size, 0LL); } void set(int i, int v, int x, int lx, in...
ALGO
0.999826
5.153644
b9b1173c-a2fd-443c-a263-f8741191ffa5
HoweXing/Pat
1012.cpp
#include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; struct Stu{ int score[4],rank[4]; int bestrank,index; string id; }; string course[4]={"A","C","M","E"}; vector<Stu> v; map<string,Stu> Map; bool comp_c(const Stu &a, const Stu &b) { return a.score[1]>b.scor...
ALGO
0.999978
5.463293
c73677b0-cc20-4636-b66f-45381d21d4c5
l1nxy/OJ-solution
uva/uva-489.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ int n; string a,b; while(cin >> n) { if(n == -1) return 0; cin >> a>>b; int error_count = 0; int guess_count = 0; for(auto i:b) { auto i...
ALGO
0.999707
3.060586
7833e10b-efcc-4719-a89e-62f5d9aabc0d
cran/gmwm
src/inference.cpp
#include <RcppArmadillo.h> #include "inference.h" #include "bootstrappers.h" // Need for getObjFun #include "objective_functions.h" // Need for gmwm_engine in chisq test #include "gmwm_logic.h" //' @title Calculate the Psi matrix //' @description Computes the Psi matrix using supplied parameters //' @param A first...
ALGO
0.985463
7.558246
5498c632-6252-4e96-a1a8-a1bd69a52145
AbirInnovations/C-plus-plus-Projects
StringExampleC.cpp
#include<iostream> #include<string.h> using namespace std; int main(){ char word[] = {'H','E','L','L','O','!','\0'};// '\0' is called null character char str[] = "HELLO!"; char str1[] = {'H','E','L','L','O','!','\0'}; char msg1[20] = "HELLO"; char msg2[20] = "WORLD"; int count=0; for(int...
ALGO
0.935904
3.11485
f47b62b0-3114-4aa4-acf0-04c23c16b5fb
TheTejasTech/Data-structure
tree.cpp
#include <iostream> #include <cmath> using namespace std; struct Node { int data; Node* left; Node* right; Node(int data) { this->data = data; left = nullptr; right = nullptr; } }; // Function declarations Node* insert(Node* root, int data); void inorder(Node* root); bool ...
ALGO
0.99979
6.218121
05a77ee7-eb7f-405e-a5b3-ff084b7acd13
Noobgods/ProblemSolving_
JunHyun_Park/BOJ/1924_2007๋…„.cpp
#include <iostream> // 1924_2007๋…„ [๊ตฌํ˜„] using namespace std; char *day[7]={"MON","TUE","WED","THU","FRI","SAT","SUN"}; int main() { int x, y; cin >> x >> y; y -= 1; for (int i = x-1; i > 0; i--) { switch (i) { case 2: y += 28; break; case 4: case 6: case 9: case 11: y += 30; break; default: y += 31;...
ALGO
0.999985
3.74837
b1e8598d-6df2-4dc1-8a37-329dffbef7ab
impostor-zz/Immortality
indra/newview/llviewerjointmesh_sse2.cpp
/** * @file llviewerjointmesh_sse2.cpp * @brief SSE vectorized joint skinning code, only used when video card does * not support avatar vertex programs. * * *NOTE: Disabled on Windows builds. See llv4math.h for details. * * $LicenseInfo:firstyear=2007&license=viewergpl$ * * Copyright (c) 2007-2009, Linden Re...
TOOL
0.903595
6.120049
8e631881-eeb2-4dcb-8251-ca331825e605
Abhijit8951/DSA
Arrays/insert_interval.cpp
// Insert Interval // You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti. // You are also given an interval newInterval = [start, end] that represents the start and en...
ALGO
0.999963
6.45404
e42ff47d-07a8-464e-aa19-b02306c5665a
weizhouUMICH/SAIGE
thirdParty/bgen/3rd_party/boost_1_55_0/libs/graph/example/boykov_kolmogorov-eg.cpp
#include <boost/config.hpp> #include <iostream> #include <string> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/boykov_kolmogorov_max_flow.hpp> #include <boost/graph/read_dimacs.hpp> #include <boost/graph/graph_utility.hpp> // Use a DIMACS network flow file as stdin. // boykov_kolmogorov-eg < max_flo...
ALGO
0.998259
5.993138
37fd8939-0eba-4638-bdef-17f89e39d4bc
pistonly/ss928v100_object_track
third_part/eigen-3.4.0/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.998657
5.388735
86b117c7-9b27-45ba-ac4d-4bb3ef90d5d2
om-ashish-soni/Competitive-Programming
problemset/topic_wise_problems/dp/maximal_square.cpp
// problem link : https://leetcode.com/problems/maximal-square/description/ // solution : below code class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { int n=matrix.size(); int m=matrix.front().size(); vector<vector<int>> dp(n,vector<int>(m,0)); int maxSquare...
ALGO
0.999713
6.197443
64ac478b-6c6e-4cd1-bc50-fdd4d127dd85
luxleo/algorithm-vault
big-stone/week3/problem/3-N.cpp
// // Created by ์ด๋™ํ•œ on 2025. 2. 20.. // /** ์™„์ „ ์ด์ง„ ํŠธ๋ฆฌ (๊นŠ์ด๊ฐ€ k์ผ๋•Œ 2**k-1์˜ ๋…ธ๋“œ๋ฅผ ๊ฐ€์ง„๋‹ค) + inorder ํŠธ๋ฆฌ ์ˆœํšŒ * inorder ํŠธ๋ฆฌ ์ˆœํšŒ๋กœ ๋งŒ๋“ค์–ด์ง„ ๊ฒฝ๋กœ๋ฅผ ์—ญ์‚ฐํ•˜์—ฌ ์›๋ณตํ•˜๋Š” ๋ฌธ์ œ์ด๋‹ค. * ์•„์ง ์ •ํ™•ํžˆ ์ดํ•ด ์•ˆ๋จ. * ์˜๋ฌธ์ : ๋‹ค์‹œ ์žฌ๊ตฌ์„ฑํ•œ ํŠธ๋ฆฌ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ค‘์œ„์ˆœํšŒ๋ฅผ ์ˆ˜ํ–‰ํ•ด๋ณผ์ˆ˜ ์žˆ์„๊นŒ? ๋ฌธ์ œ ์ƒ๊ทผ์ด๋Š” ์Šฌ๋กœ๋ฒ ๋‹ˆ์•„์˜ ๋„์‹œ Donji Andrijevci๋ฅผ ์—ฌํ–‰ํ•˜๊ณ  ์žˆ๋‹ค. ์ด ๋„์‹œ์˜ ๋„๋กœ๋Š” ๊นŠ์ด๊ฐ€ K์ธ ์™„์ „ ์ด์ง„ ํŠธ๋ฆฌ๋ฅผ ์ด๋ฃจ๊ณ  ์žˆ๋‹ค . ๊นŠ์ด๊ฐ€ K์ธ ์™„์ „ ์ด์ง„ ํŠธ๋ฆฌ๋Š” ์ด 2K-1๊ฐœ์˜ ๋…ธ๋“œ๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ๋‹ค....
ALGO
0.999846
4.880926
70188d76-07e7-43c1-b22e-00a817a11be9
clemenceparis/CompetitiveProgramming
Perse/R2/2020/q10.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { string s; cin >> s; int arr[s.length()]; for(int i=0; i<s.length(); i++) arr[i] = s[i] - 'A' - 12; vector<int> v = {arr[0]}; int cur = arr[0]; string a(2, s[0]); vector<string> t; t.push_back(a); for(...
ALGO
0.999988
3.905182
9afc719b-1116-4f18-87b9-7c20ae44c03e
leandrocarabajal1988/UTN
Guia 3/ejercicio_5(vs).cpp
#include <iostream> #include<conio.h> using namespace std; int main(){ int numero1, numero2; cout << "ingrese dos nรบmeros: " <<endl; cin>>numero1>>numero2; cout<< "los nรบmeros entre los numeros ingresados son; " << endl <<endl; if (numero1<numero2) { for (int i = numero1+1; i < numero...
TOOL
0.975523
3.266979
061a96f3-a86c-4a50-805c-2fedc461e21e
glKarin/com.n0n3m4.diii4a
Q3E/src/main/jni/serioussam/SamTSE/Sources/Engine/Math/Projection_Parallel.cpp
#include "Engine/StdH.h" #include <Engine/Math/Projection.h> #include <Engine/Math/TextureMapping.h> #include <Engine/Math/OBBox.h> #include <Engine/Math/Geometry.inl> #include <Engine/Math/Clipping.inl> ///////////////////////////////////////////////////////////////////// // CParallelProjection3D /* * Prepare f...
ALGO
0.985132
5.580872
d5dca414-f29b-48cd-9db3-0fd938fb06f0
Ujjwalmittal1907/data-structure-and-algorithm
c++/b loops/13loop.cpp
#include<iostream> #include<conio.h> using namespace std; int main() { int row; // x2=i int x3; // x1/d= row int Number=3; int Banner=0; cout<<"Please enter the no of lines "; cin>> row; for(int i=1;i<= row; i++)...
ALGO
0.999107
3.125669
10c3d0f4-d20d-4621-93e3-40814c9f5b10
SI-Abid/Hello-world
Codeforces/1475E.cpp
#include <bits/stdc++.h> using namespace std; #define nl "\n" #define ll long long const int mod = 1e9 + 7; ll nCr(ll n, ll r) { if (r == 0 || r == n) { return 1; } vector<vector<ll>> dp(n + 1, vector<ll>(r + 1, 0)); for (ll i = 0; i <= n; i++) { for (int j = 0; j <= min(i, r)...
ALGO
0.99994
4.430552
17f75882-f9a9-4194-863a-2d33f7108a18
Ranger-NF/FieldWatch
esp32/libraries/Sound_Effect_inferencing/src/edge-impulse-sdk/dsp/kissfft/kiss_fftr.cpp
#include "edge-impulse-sdk/dsp/kissfft/kiss_fftr.h" #include "edge-impulse-sdk/dsp/kissfft/_kiss_fft_guts.h" struct kiss_fftr_state{ kiss_fft_cfg substate; kiss_fft_cpx * tmpbuf; kiss_fft_cpx * super_twiddles; #ifdef USE_SIMD void * pad; #endif }; kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft...
ALGO
0.999679
5.828986
d70e7129-4cc8-4146-8ac1-a7554d284961
InJanus/Spring-2018
lab8/triangle_class.cpp
// // Name: Brian Culberson // #include <iostream> #include "line_class.cpp" using namespace std; // We have setup class framework for you. Please copy the point // class and/or line class you created to this file. class triangle { public: triangle(point p1, point p2, point p3){ this->p1 = p1; ...
ALGO
0.99725
4.530984
42f51391-fa80-490e-b42f-75c7068eebad
ishandutta2007/codeforces
aqt/normal/1320/B.cpp
// Problem : B. Navigation System // Contest : Codeforces Round #625 (Div. 1, based on Technocup 2020 Final Round) // URL : https://codeforces.com/contest/1320/problem/B // Memory Limit : 512.000000 MB // Time Limit : 2000.000000 milisec // Powered by CP Editor (https://github.com/coder3101/cp-editor) #include <bit...
ALGO
0.999946
4.522019
44fdde87-f959-4dca-a77e-aeb11833fc5c
krishna-somwanshi/PlacementCoding
BitwizeAndOperator.cpp
//Program to use bitwise AND operator between the two integers. #include<iostream> using namespace std; int main() { int num1=15,num2=7; int val = num1 & num2; cout<<"Val = "<<val<<endl; return 0; }
TOOL
0.997303
5.767609
e8c60306-8b85-4527-8182-de78dd417556
victorduta/shadowkernel
tools/llvm/lib/CodeGen/BranchRelaxation.cpp
#include "llvm/CodeGen/Passes.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/LivePhysRegs.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/RegisterScavenging.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetSubtargetInfo.h" #incl...
ALGO
0.959472
7.417864
f26e5074-34ae-42b8-9b21-0fabac269ddd
ishandutta2007/codeforces
_su1sen/normal/988/A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n, k; cin >> n >> k; vector<int> c(101, 0); for (int i = 1; i <= n; ++i) { int a; cin >> a; c[a] = i; } int s = 0; for (int b : c) { s += b > 0; } if (s < k) { cout << "NO\n"; ...
ALGO
0.999999
3.583638