uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c65928b3-5ec2-45c9-bb21-88b0d0e5353d
RobCTs/IoT_Signal_analysis
managed_components/espressif__esp-dsp/modules/matrix/mat/mat.cpp
#include <stdexcept> #include <string.h> #include "mat.h" #include "esp_log.h" #include "dsps_math.h" #include "dspm_matrix.h" #include <math.h> #include <cmath> #include <inttypes.h> using std::ostream; using std::istream; using std::endl; namespace dspm { float Mat::abs_tol = 1e-10; Mat::Rect::Rect(int x, int y,...
TOOL
0.883118
5.517877
81bacd0e-8924-441e-a393-8cf9dcd7c664
MouryaVishal/A2Z_Questions
15 Graphs [Concepts & Problems]/15.5 MinimumSpanningTree_Disjoint Set and Problems/10 Making A Large Island.cpp
#include<bits/stdc++.h> using namespace std; 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), left(left), right(...
ALGO
0.999872
5.612411
30ea3a85-45d5-49db-b93e-8b1a1435ecae
luischuang/PCADiagnosis
PCADiagnosis/eigen-eigen-323c052e1731/doc/examples/Tutorial_BlockOperations_print_block.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::MatrixXf m(4,4); m << 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16; cout << "Block in the middle" << endl; cout << m.block<2,2>(1,1) << endl << endl; for (int i = 1; i <= 3; ++i) { cout << "B...
ALGO
0.97867
3.6853
0c42529b-129c-4216-ba2b-b5925e4049b5
emondd4/Flutter-Tutorials
flutter_hive/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.99839
6.783439
edb1c9ae-8c37-4ceb-a5f5-2ad4464d2951
Harmandeep01/CPP--DSA
basicMath/isPalindrome.cpp
#include <climits> #include<iostream> using namespace std; bool isPalindrome(int x) { long duplicate = x; long revNum = 0; bool isPalindrome = false; while(x != 0){ int lastDigit = x % 10; revNum = (revNum * 10) + lastDigit; x/= 10; } ...
ALGO
0.999462
4.567422
aa041f74-741b-4007-b6fa-8a70c1f0ee66
mumumu6/kyopro
icpc/second/a.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define reps(i, a, b) for (ll i = (a); i < (b); i++) int main() { int n; long double ans0 = -1; long double ans1 = -1; long double time1 = 350000; long double time0 = 350000; bool first0 =...
ALGO
0.999627
3.092699
3b0a1bbf-8e0c-4cb0-adae-df48ebd2ff15
natsalete/desafios-de-codigo-do-beecrowd
beecrowd-3-strings/1241 - Encaixa ou Não II.cpp
#include<iostream> using namespace std; int main(){ int n; cin >> n; cin.ignore(); while(n--){ string a; string b; cin >> a >> b; int tamanho_b = a.size() - b.size(); a.erase (0,tamanho_b); if(a.compare(b) == 0){ cout << ...
ALGO
0.998973
4.439116
477d86e7-103a-4b95-8891-6e84692efaa3
ariqluth/tugas4_aplikasidasar
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.998859
6.785645
34c6c351-cf44-4742-af9b-76a09be4be56
riku546/cpp-tutorial
c_practice/236.cpp
#include <bits/stdc++.h> #define rep(i, m, n) for (int i = m; i < n; i++) using ull = unsigned long long; using ll = long long; using namespace std; int main() { int N, M; cin >> N >>M; vector<string> S(N); map<string, int> T; rep(i, 0, N) cin >> S[i]; rep(i, 0, M) { string s; cin >> s; T[s] ...
ALGO
0.999982
4.49441
4cd43a90-73f6-490c-8b8e-f8f57515e0f7
Adnann07/C-codes
p3.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int r=n;r>=1;r--) { for(int c=1;c<=r;c++) { cout<<"*"; } cout<<endl; } }
ALGO
0.999917
3.774195
2319edc1-63a2-4a42-82fa-86dc7528d7da
Kaileshwaran13/CodeChef
1000 - 1400 difficulty rating/Chef and Notebooks.cpp
#include <iostream> using namespace std; int main() { // your code goes here int t; cin >> t; while (t--) { int x, y, k, n, p, c, min = 0; cin >> x >> y >> k >> n; for (int i = 0; i < n; i++) { cin >> p >> c; if (p >= (x - y)) { ...
ALGO
0.998555
3.375362
f506b7d1-c60e-42d9-ba0b-2d91e02cc01d
DoyouhaveJJ/myPAT
归并排序.cpp
#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> //归并排序 const int N = 10; //合并并排序 void Merge(int A[],int L1,int R1,int L2,int R2){ //L1 ,...., L2 , R1 ,....., R2 int i = L1 , j = L2; int temp[N],index=0; while(i <= R1 && j <= R2){ if(A[i] < A[j]){ temp[in...
ALGO
0.999895
3.747185
d7077f0d-1e22-449a-ad88-cbbf32758a69
sidch/Thea
Code/Source/Algorithms/DiscreteExponentialMap.cpp
#include "DiscreteExponentialMap.hpp" #include "PointSet3.hpp" #include "ShortestPaths.hpp" #include "../AffineTransform3.hpp" #include "../Map.hpp" #include "../Math.hpp" #include "../Plane3.hpp" #include <functional> namespace Thea { namespace Algorithms { namespace DiscreteExponentialMapInternal { class Impl { ...
ALGO
0.999192
7.571097
3cc79660-791e-43a6-bea8-75245852add5
Saini-Rishabh/DAA-4sem-Algos
ActivitySelection.cpp
#include<bits/stdc++.h> using namespace std; int main() { vector<pair<int,int>>activity; int n,s,e; cout<<"Enter The Number Of Activities"; cin>>n; for(int i=0;i<n;i++) { cin>>s>>e; activity.push_back(make_pair(e,s)); } sort(activity.begin(),activity.end()); int coun...
ALGO
0.999799
4.475505
f3f9674e-e3e7-4ad8-bbe1-6c6b9ee42b38
zzadu/code
2024.11/10816.cpp
#include <iostream> #include <map> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; map<int, int> cards; cin >> n; int tmp; for (int i = 0; i < n; i++) { cin >> tmp; auto it = cards.find(tmp); if (it != cards.end()) { ...
ALGO
0.999878
4.286976
0b7818c4-6317-4147-9652-5750402290f5
hgparkk/Algorithm-2023
C언어/8장/combination/combination.cpp
#include <stdio.h> int factorial(int n) { int i, result = 1; for (i = 1; i <= n; i++) result *= i; return result; } int combination(int n, int r) { return (factorial(n) / (factorial(r) * factorial(n - r))); } int get_integer(void) { int n; printf("정수를 입력하시오: "); scanf("%d", &n); return n; } int main(void...
ALGO
0.99956
4.644198
b05cc60b-8e7b-4f2e-95a4-d45f83a6ac31
photosartd/vnav
cpp/thirdparty/eigen/doc/examples/TutorialLinAlgSVDSolve.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXf A = MatrixXf::Random(3, 2); cout << "Here is the matrix A:\n" << A << endl; VectorXf b = VectorXf::Random(3); cout << "Here is the right hand side b:\n" << b << endl; cout << "The least-squares ...
ALGO
0.999665
4.175827
ab697548-5c7c-4f12-80ac-0d7d6880ea35
Perceptronica/da-labs
lab5-suffix-tree/solution.cpp
#include <bits/stdc++.h> struct Node; struct STree; struct Node { std::map<char, Node *> to; std::string::iterator begin; std::string::iterator end; Node *suffixLink; Node(std::string::iterator begin, std::string::iterator end) : begin(begin), end(end), suffixLink(nullptr) {} ~Node() {}; }; struc...
ALGO
0.997584
4.346066
ab2524bd-e525-4ae9-8e7a-a095631deca3
OlyMahmudMugdho/data-structure-and-algorithms
insertion-sort/InsertionSort.cpp
#include <iostream> using namespace std; void sort(int array[], int length) { for(int i = 1; i < length; i++) { int j = i - 1; int temp = array[i]; while(j >= 0 && array[j] > temp) { array[j+1] = array[j]; j--; } array[j + 1] = temp; } ...
ALGO
0.99996
5.067228
151ac24f-a161-45e1-adb4-bf59fd513284
mushfiq-906/cp__training
Codeforces__Problems/contest/268/b/57175208.cpp
/*Author : Abdallah Hemdan */ /**************************/ /*Dear online judge: * I've read the problem, and tried to solve it. * Even if you don't accept my solution, you should respect my effort. * I hope my code compiles and gets accepted. * ___ __ * |\ \|\ \ * \ \ \_\ \ * \ \ ___ \emdan * \ \ \\ \ \ * ...
ALGO
0.9998
3.671407
52a590b2-edba-4878-8afe-d74b518804f1
KwonSR/Programmers
C++/프로그래머스/0/181905. 문자열 뒤집기/문자열 뒤집기.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; string solution(string my_string, int s, int e) { string answer = my_string; int idx = e; for(int i = s ; i <= e ; i++) answer[i] = my_string[idx--]; // reverse(my_string.begin() + s, my_string.begin() + e ...
ALGO
0.99935
4.459165
09756510-4a47-4a5b-b120-d531bbbfe4b6
Doveqise/Cloud
Codes/C++/4512.cpp
#include<bits/stdc++.h> #define For(i,a,b) for(i=(a);i<=(b);++i) #define Forward(i,a,b) for(i=(a);i>=(b);--i) #define Rep(i,a,b) for(register int i=(a),i##end=(b);i<=i##end;++i) #define Repe(i,a,b) for(register int i=(a),i##end=(b);i>=i##end;--i) using namespace std; template<typename T>inline void read(T &x){ T s=...
ALGO
0.999985
3.091438
a3339cfc-43cf-47f7-943f-b3d87794b64c
mk28r/Competative_Programming
Xsum.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define ld long double #define nline "\n" #define ff first #define ss second #define pb push_back #define int long long #define fl(i,k,n) ...
ALGO
0.999969
4.288798
5e5394fd-0dd8-4201-919b-c4cc1b828874
alokito1st/my151code
Linear search.cpp
#include<iostream> using namespace std; bool find(int arr[],int size,int key){ for(int i=0;i<size;i++){ if (arr[i]==key) return true; } //Not present return false; } int main(){ int arr[]={ 2,3,4,5,6}; int size=5; int key; cin>>key; if(find(arr,size,key)){ cout<<"found"<<endl; } else{ cout<<"not ...
ALGO
0.99991
4.492455
daa049ec-283b-4a44-ba2b-5735fb2cf2a9
zcore-coin/blockbook-zcore
src/coins.cpp
#include "coins.h" #include "random.h" #include <assert.h> /** * calculate number of bytes for the bitmask, and its number of non-zero bytes * each bit in the bitmask represents the availability of one output, but the * availabilities of the first two outputs are encoded separately */ void CCoins::CalcMaskSize(u...
ALGO
0.957255
7.040895
63fab131-9871-42a9-afcb-264dfb5f6ef7
rockychowdhury/Algorithm
Dynamic_Programming/Fibonacci_Loop.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n; cin >> n; ll a[n + 1]; a[0] = 1; a[1] = 1; for (int i = 2; i <= n; i++) { a[i] = a[i - 1] + a[i - 2]; } cout << a[n] << endl; return 0; }
ALGO
0.999993
4.302922
ee720f4f-3f88-4ebc-a48b-3b4970abde64
pbblerico/leetcode
binaryTree/problem872.cpp
#include <bits\stdc++.h> using namespace std; 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), left(left), righ...
ALGO
0.999874
6.09533
616ab7ca-90f7-4f06-a7f6-f5a0bb4e4a69
arvindshekar07/UnscentedKF
src/main.cpp
#include <fstream> #include <iostream> #include <sstream> #include <vector> #include <stdlib.h> #include "Eigen/Dense" #include "ukf.h" #include "ground_truth_package.h" #include "measurement_package.h" using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; using std::vector; void check_arguments(int arg...
DATA
0.906635
5.240885
8ab76da0-83e3-46c5-86f7-49987ef79409
shunand/remoteid
components/arduino-esp32-3.0.7/libraries/WebServer/src/Parsing.cpp
#include <Arduino.h> #include <esp32-hal-log.h> #include "NetworkServer.h" #include "NetworkClient.h" #include "WebServer.h" #include "detail/mimetable.h" #ifndef WEBSERVER_MAX_POST_ARGS #define WEBSERVER_MAX_POST_ARGS 32 #endif #define __STR(a) #a #define _STR(a) __STR(a) static const char *_http_method_str[] = { #...
WEB
0.93947
3.894364
421ee94e-c926-4993-a07b-9fd77c53b920
FengGuanxi/HDU-Experience
学习/数据结构/数据结构课程设计/最小生成树/mincstreeW2.cpp
#include <iostream> #include <cstdlib> #include<io.h> #include <fstream.h> #define MAX_VERTEX_NUM 30 // 󶥵 struct VertexType { char vex; int parent; }; struct ArcCellType { int adj;// Ȩֵ int vi,vj;//˵ }; struct MGraph { VertexType vexs[MAX_VERTEX_NUM]; // ArcCellType arcs[MAX_VERTEX_NUM*(MAX_VERTEX_NUM-1)/2+1...
ALGO
0.999957
3.537485
eadbb320-7f5e-43e5-b109-f338836764c5
jeremykvlim/kattis
nus/cs3230/skolvagen.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; int north = 0, south = 1, temp; for (char c : s) { if (c == 'N') north++; else if (c == 'S') south++; else { north++; s...
ALGO
0.999948
4.008024
bc89c594-bad3-4333-ab45-f7e49acd170a
pranshu667/dsa
algos/solutions/problem11.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; void solve(int **arr,int n) { int temp; for(int i=0;i<n/2;i++) { for(int j=i;j<n-i-1;j++) { temp=arr[i][j]; arr[i][j]=arr[j][n-i-1]; arr[j][n-i-1]=arr[n-i-1][n-1-j]; arr[n-i-1][n-j-1]=arr[n-j...
ALGO
0.999835
3.94244
c175ed27-c72e-4d49-a0a3-847f5e65b05c
stephtelolahy/AndEngineDemo
andEnginePhysicsBox2DExtension/src/main/jni/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp
#include "Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h" #include "Box2D/Common/b2BlockAllocator.h" #include "Box2D/Dynamics/b2Fixture.h" #include <new> using namespace std; b2Contact* b2EdgeAndPolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem...
ALGO
0.964593
6.815947
ea59d5f9-e3c1-4dfa-b6e9-12863bf1c3b3
wangfeilong321/geo-maps
osg/src/osgSim/LineOfSight.cpp
#include <osgSim/LineOfSight> #include <osg/Notify> #include <osgDB/ReadFile> #include <osgUtil/LineSegmentIntersector> using namespace osgSim; DatabaseCacheReadCallback::DatabaseCacheReadCallback() { _maxNumFilesToCache = 2000; } void DatabaseCacheReadCallback::clearDatabaseCache() { OpenThreads::ScopedLoc...
TOOL
0.969839
5.084326
ab7c4324-7431-4f3a-94a5-32052d331e9b
moinhameed27/OOP_CC-211
University Labs/Lab 12/Task_03.cpp
#include <iostream> #include <string> using namespace std; template <typename T> T numberValidation(T &); const int MAX_ITEMS = 23; // Custom Exception Classes class InventoryFullException : public runtime_error { public: InventoryFullException() : runtime_error("Inventory is full") {} }; class ItemNotFoundExc...
TOOL
0.947859
6.946586
b34221e8-babb-4c7c-b208-3e9d46b205f0
nathanenglehart/nb-241
utils.cpp
#include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <map> #include <fstream> #include "includes/eigen3/Eigen/Dense" /* Nathan Englehart, Xuhang Cao, Samuel Topper, Ishaq Kothari (Autumn 2021) */ float round_num(float number) { /* Rounds number to 4 decimal points. */ float ret =...
DATA
0.998797
4.878416
1788f3d7-d524-420a-a97b-536b3d62e801
Farheen-786/SUPREME1.0
Basic/p5.cpp
#include<iostream> using namespace std; int main(){ //half pyramid // for(int i=0;i<5;i++){ // for(int j=0;j<i+1;j++){ // cout<<"* "; // } // cout<<endl; // } // } // for(int i=0;i<5;i++){ // for(int j=5;j>i;j--){ // cout<<"* "; // } // cout<<endl; // ...
ALGO
0.994499
3.304014
d1c99ad2-2f21-45d6-b014-e8e31d092e22
wangmiao1981/coding
source/c++/lt211/lt211.cpp
class TrieNode { public: TrieNode *child[26]; bool isWord; TrieNode() : isWord(false) { for (auto& a : child) { a = NULL; } } }; class WordDictionary { public: /** Initialize your data structure here. */ WordDictionary() { root = new TrieNode(); } /** Adds...
ALGO
0.999837
6.71225
622e7d09-3cc5-4821-b8b9-ac11546cb1e9
HuarunD/hw3
logicsim/gate.cpp
#include <vector> #include <random> #include <iostream> #include "gate.h" #include "wire.h" Gate::Gate(int num_inputs, Wire* output) : m_output(output), m_inputs(num_inputs), m_delay(0), m_current_state('X') { } Gate::~Gate(){} void Gate::wireInput(unsigned int id, Wire* in) { if(id < m_inputs.size()) ...
TOOL
0.929716
4.356084
a414e21c-b5eb-4f04-af70-daf4aab86624
knixk/DSA-Journey-Kanishk
problem solving/coding minutes/dsa-essentials-course-master/15 Stack/stack_stl.cpp
#include<iostream> #include<stack> #include<string> using namespace std; int main(){ stack<string> books; books.push("C++"); books.push("Java"); books.push("Python"); books.push("OS"); while(!books.empty()){ cout << books.top() <<endl; books.pop(); } return 0; }
ALGO
0.965385
4.444488
2f8abe7b-e8b0-4570-a639-f677b0ce6021
AkashAswal5/cpp-programs
reverse a string using Stack.cpp
#include<iostream> #include<stack> using namespace std; void reverse(string s){ stack<char> str ; // push all characters of the string into the stack for(char ch:s){ str.push(ch); } // pop characters from the stack and form the reversed sring string reversed=""; while(!str.empty()){ reversed+=str.top(); ...
ALGO
0.998172
5.157857
7b830c9a-de42-4447-bb66-7966490d2fdf
Surajv311/myCforces
old/others/cubefreak 42183751.cpp
#include"bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; // #pragma GCC optimize("Ofast") // #pragma GCC target("avx,avx2,fma") // #pragma GCC optimization ("unroll-loops") typedef long long ll ; typedef pair<int,int> pii; typ...
ALGO
0.999861
3.744301
93a33cff-1b45-4f6d-92d3-5f710a80c2df
harsh2338/code-copyright
pre-processing/data/cpp/44.cpp
#include<bits/stdc++.h> using namespace std; unordered_map<string,int>mp; int c; int mindiff(vector<int>A,int i,int sum,int totsum){ c++; if(i==A.size())return abs((totsum-sum)-sum); string c1=to_string(i+1)+":"+to_string(sum); string c2=to_string(i+1)+":"+to_string(sum+A[i]); if(mp.find(c1)==mp.end...
ALGO
0.999669
4.234619
da9415f2-ef58-4bc2-9c1f-4f0662c70203
TiVo/dts-studio
Intel-MediaSDK/sources/22.6.3-modified/_studio/mfx_lib/genx/mctf/src/genx_mc.cpp
extern "C" _GENX_MAIN_ void McP16_4MV_1SURF_WITH_CHR( SurfaceIndex SURF_CONTROL, SurfaceIndex SURF_REF1, SurfaceIndex SURF_MV16x16_1, SurfaceIndex SURF_SRC, SurfaceIndex SURF_OUT, uint start_xy, uint scene_nums ) { vector<ushort, 2> start_mbXY = start_xy; vect...
ALGO
0.858095
3.714246
812134aa-87dc-4f4a-a21f-48f747350404
hemnath2005/CSA0493-Operating-system
5 program.cpp
#include<stdio.h> struct priority_scheduling { char process_name; int burst_time; int waiting_time; int turn_around_time; int priority; }; int main() { int number_of_process; int total = 0; struct priority_scheduling temp_process; int ASCII_number = 65; int position; float average_waiting_time; ...
ALGO
0.99994
3.048193
71982324-4f35-4c24-b668-277f295e28f6
spacecoderinspace/Cpp-codes-and-concepts
13.countUsingDoWhile.cpp
#include<iostream> using namespace std; int main(){ int n,i=11; cout<<"Enter N :"; cin>>n; do{ cout<<i<<endl; i++; }while(i<=n); return 0; }
ALGO
0.99727
3.368447
a2db3e6d-6719-4f58-b419-9cd9135f5e39
ganesh143u/DAA
11week_/11-week-2nd.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,amt; cin>>n; int i,j,a[n]; for(i=0;i<n;i++) cin>>a[i]; cin>>amt; int ans[amt+1]; for(i=1;i<=amt;i++) ans[i]=0; ans[0]=1; for(j=0;j<n;j++) { for(i=1;i<=amt;i++) { if(a[j]<=i) ...
ALGO
0.999446
3.167508
5e08a2f7-b548-4055-bfe5-348473a58456
shashi352/Data-structures-and-algorithms-with-C-
loop/calculater.cpp
#include<bits/stdc++.h> using namespace std; int main(){ float num1 , num2; char c; cout<<"enter two no.s\n"; cin>>num1>>num2; cout<<"enter the operand \n"; cin>>c; switch(c){ case '+': cout<<num1+num2; break; case '-': cout<<num1-num2; break; case '*': cout<<num1*num2; break; cas...
ALGO
0.986151
3.031576
923da37f-b567-4d76-b61f-375354cd1203
jeckbjy/engine
engine/src/Matrix3.cpp
//! Math #include "Cute/Matrix3.h" #include "Cute/Quaternion.h" CUTE_NS_BEGIN struct EulerAngleOrderData { int a, b, c; float sign; }; const Matrix3 Matrix3::ZERO(0, 0, 0, 0, 0, 0, 0, 0, 0); const Matrix3 Matrix3::IDENTITY(1, 0, 0, 0, 1, 0, 0, 0, 1); static const EulerAngleOrderData EA_LOOKUP[6] = { { 0, 1, 2, 1...
ALGO
0.998269
5.498697
40c22cb2-f087-41c3-85f9-2ccaf95a1ce0
dongqh/leetcode
algorithms/cpp/longestCommonPrefix/longestCommonPrefix.cpp
// Date : 2025-03-21 /** * Solution 1: Horizontal scanning * * Time complexity : O(n × m) * n is the number of strings, * and m is the length of the longest common prefix. * Space complexity: O(m) * The space required to store the result string. * **/ string longestCommonPrefix(vector<string> &strs) ...
ALGO
0.999918
6.911714
ddf0c46c-40d3-40e2-887b-e4eb92f7a5bc
kallagoutham/My_Solutions
Leetcode/657. Robot Return to Origin.cpp
class Solution { public: bool judgeCircle(string moves) { unordered_map<char,int> m; for(char ch:moves){ m[ch]++; } if((m['U']==m['D']) && (m['R']==m['L'])){return true;} return false; } };
ALGO
0.999875
6.118398
b235d786-64fa-4bcd-8df7-78810d310c0b
kamyu104/LintCode
C++/container-with-most-water.cpp
// Time: O(n) // Space: O(1) class Solution { public: /** * @param heights: a vector of integers * @return: an integer */ int maxArea(vector<int> &heights) { int i = 0, j = heights.size() - 1, max_area = 0; while (i < j) { max_area = max(max_area, min(heights[i], hei...
ALGO
0.999957
6.880505
e64c7223-95c3-44fc-b220-f1db634d55bc
sarvex/leetcode-javascript
lcof/面试题59 - I. 滑动窗口的最大值/Solution.cpp
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { vector<int> ans; deque<int> q; int n = nums.size(); for (int i = 0; i < n; ++i) { if (!q.empty() && i - q.front() + 1 > k) { q.pop_front(); } while (!...
ALGO
0.999991
6.412413
11aec723-236c-4fe6-8677-470745a88195
ishandutta2007/codeforces
coderanshu/normal/1673/B.cpp
#include<bits/stdc++.h> using namespace std ; #define ll long long #define pb push_back #define all(v) v.begin(),v.end() #define sz(a) (ll)a.size() #define F first #define S second #define INF 2000000000000000000 #define popcount(x) ...
ALGO
0.99995
4.352094
4d9fcbb7-27cf-426a-ab64-46b6c2ae7c4c
mahabub5090/CPP-Various-Online-Judge-Problem-Solving
week-3/C_Vlad_Building_Beautiful_Array.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define cn(x) cin >> x #define foi(i, s, e) for (int i = s; i < e; i++) #define endl '\n' #define Endl '\n' void solve() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } sort(arr, ar...
ALGO
0.998946
5.15538
a8e26bc7-9f5b-48f8-a012-5152f3e3bdfe
raincross7/code-similarity
codes/train_code/problem268/problem268_487.cpp
#include <iostream> #include <numeric> #include <cmath> #include <limits> #include <stdio.h> #include <iomanip> #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple>...
ALGO
0.999961
3.758501
43331175-5227-41b8-8ec4-49b86ea24a9b
Bocchiid/WZU-Data-Structure-and-Algorithm-25sp
Experiment_09/深度优先遍历_12解.cpp
/** 本题重点在于dfs + 计算/输出连通分量 */ /** 对于图的部分不做过多的注解 */ /** 本题请严格使用邻接表存储图 */ /** 该解法为邻接表的链表实现 */ /** 本题较坑的点是要对边去重 */ /** 该解法对去重, 使用的是map实现 */ /** 奇数解为全局变量实现 */ /** 偶数解为函数参数实现 */ #define vc vector #include <iostream> #include <vector> #include <map> using namespace std; struct node { int v; node *next; node(...
ALGO
0.999997
4.666759
fba0a084-5413-4145-a80e-e497bc9b61ec
JosephParrott2/Rocket-Motion-Model-cpp-
Mass.cpp
/*************** NUMERICAL MODELLING by Joseph Parrott (ID: 1413771). Calculating the displacement and velocity of a rocket with fuel mass and mass of a fuel tank included. Previously it was assumed that all the mass of the rocket is burnt. In this instance the user defines the mass of the whole rocket and then the fr...
ALGO
0.994431
4.72364
e512a63a-0c88-4e5b-b79f-1ff7110cc388
amankumar23429/Data-Structures-and-Algorithm
vector/vector_intro.cpp
#include<iostream> #include<vector> using namespace std; int main(){ // vector initialization vector<int> a; vector<int> b(5,1); // b(n,i) where n is the number of size of vector b and i is the number assigned to each positon vector<int> c(b.begin(), b.end()); vector<int> d{1,2,3,4,5}; //in...
ALGO
0.987964
4.506503
15e281d6-5407-4d6f-accf-26632ab4c88b
TeddyTeech/c-
Loops/2.cpp
#include <iostream> using namespace std; int main() { int n; char c; cin >> n >> c; while(n > 0) { cout << c; n--; } cout << "\n"; return 0; }
ALGO
0.999343
3.076166
ec1b40ef-e3d2-45d8-98b3-9a568d5fd026
gianlucafiacco/RoboCup
Util/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.998926
5.382086
39dae2a3-ac8d-465f-8bb5-bd6006481e03
rishi-0205/Data-Structures-and-Algorithms-CPP
oneD_Array.cpp
/*Arrays are used to store items at contiguous memory locations and elements can be accessed using indices of an array. Array has two types: - 1-D array - 2-D array*/ #include <iostream> void print(int *num, int size); // Add size parameter int main() { int num[] = {1, 2, 3, 4, 5, 6}; int si...
TOOL
0.871916
5.055747
72d3ffd3-6cd5-4e16-b9f2-849bc083a6e8
ssbadjate02/Competetive-Programming
B_Colourblindness.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define FASTIO ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL) #define all(x) (x).begin(),(x).end() #define ss second #define ff first template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;} template<typ...
ALGO
0.9996
4.151103
573eacd7-afa8-4855-a1f1-a04d202c246b
andrewqt/Competitive-Programming
CodeForces/_0293_E_CloseVertices/_0293_E_CloseVertices.cpp
#include <bits/stdc++.h> using namespace std; int N, M, K; vector<pair<int, int>> graph[100005]; bool vis[100005]; int sz[100005]; vector<pair<int, int>> s; int dep[100005], dist[100005]; long long ans = 0; int BIT[200005]; vector<int> cmp; int getidx(int n){ return lower_bound(cmp.begin(), cmp.end(), n) - cmp.b...
ALGO
0.999978
4.11186
cebc0e57-c691-4ace-8b39-be493c0fdb14
usgs/pestpp
src/libs/Eigen/bench/sparse_transpose.cpp
//g++ -O3 -g0 -DNDEBUG sparse_transpose.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out // -DNOGMM -DNOMTL // -DCSPARSE -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a #ifndef SIZE #define SIZE 10000 #endif #ifndef...
ALGO
0.984033
5.110691
523bbedc-dc4e-4fe1-91f5-b4ead813dfb2
FliGhtzzz/ccirc2025summer
ans/a/a.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) signed main() { fast; int x; cin>>x; cout<<x<<" "; while(x>1) { if(x%2==0) x/=2; else x=3*x+1; cout<<x<<" "; } return 0; }
ALGO
0.999992
4.664145
ec9f1257-a6ca-4a68-bb14-b132dfae16b0
DuNguyen107/OOP
BaiTapTrenLop/ThucHanh/Bai4.2.cpp
#include <iostream> using namespace std; class Frac { private: double a; double b; public: Frac(double num = 0, double den = 1) { if (den == 0) { cout << "Loi: mau so bang 0!" << endl; a = 0; b = 1; } else { a = num; ...
ALGO
0.999426
3.894157
458b3d33-02fd-4e76-b300-645dc9182519
SaneaV/CEITI-Projects
C++ Labs/30.11.2017.14.cpp
//В одномерном массиве вводимом с клавиатуры и состощем из N вещественных элементов, вычислить: //количество элементов массива равных 0 //Сумму элементов массива расположенных после минимального элемента #include <iostream> #include <stdlib.h> #include <windows.h> using namespace std; main() { SetConsoleCP(1251)...
ALGO
0.998587
3.126177
9dd5956b-3fd3-455f-aa87-14f54c8d305e
CodingNewbie0/CPPtutorial
baseC/CalculatorTutorial.cpp
//#author ȿâ #include <windows.h> #include <iostream> // c++ #include <string> // (Ͷ ) #include <vector> // ޸ Ҵ 迭 #include "Calculator.h" // ̸ ҷ using namespace std; // cout std vector<char> cal{ 'v','e','r' }; int main(void) { double a, b = 0.0; // ʱȭ char operate = ' '; // double result = 0.0; string c...
TOOL
0.857094
3.262137
219bdd50-356c-40a8-9473-0d7413fab880
1997priyam/Data-Structures
arrays&mix/flip.cpp
#include<bits/stdc++.h> #include<iostream> #include<vector> #include<string> using namespace std; vector <int> flip(string A) { int start = 1; int end = 1; int beg = 1; int max_so_far = INT_MIN; int max_here = 0; bool flag = true; int n = A.size(); int *arr = new int[n]; for(int j=...
ALGO
0.999886
3.982292
72853293-9d22-4abb-b4bf-a7e809d9436e
Z1RKON/Prog-labs
Prog-labs/Лабораторная работа № 2/Задание 4.cpp
//ЗАДАЧА 4 #include <iostream> #include <fstream> int main() { std::ifstream inputFile("numbers.txt"); if (!inputFile.is_open()) { std::cerr << "Error opening file" << std::endl; return 1; } int num, count = 0; long long sum = 0; while (inputFile >> num) { if (num > ...
ALGO
0.994795
4.394559
9f46c0e0-8a1f-4f5d-8ee1-e3dd8496a4b0
CakeForest/noip
2016上课/3.26/1236 线段覆盖.cpp
#include<cstdio> #include<algorithm> using namespace std; struct node{ int s,e; }line[1000020]; int n; int cmp(node x,node y) { return x.e<y.e; } int main() { scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d %d",&line[i].s,&line[i].e); sort(line+1,line+n+1,cmp); int now=0,sum=0; for(int i=1;i<=n;i++) { if(l...
ALGO
0.999378
3.641882
e0a11bbc-540c-4863-907e-c775fcc8299e
fuadhasan007/introduction-to-c-
flow-chart/cplusplusnext/f.cpp
#include <iostream> int factorial(int num);//recurssion int main () { std::cout << factorial(10); return 0; } int factorial(int num){ if(num > 1){ return num * factorial(num - 1); } else{ return 1; } }
ALGO
0.998328
4.187623
6c46f635-aa91-4e9f-8a94-3eaab4f67c9f
ishandutta2007/codeforces
joisino/normal/472/F.cpp
#include <bits/stdc++.h> #define FOR(i,a,b) for( ll i = (a); i < (ll)(b); i++ ) #define REP(i,n) FOR(i,0,n) #define YYS(x,arr) for(auto& x:arr) #define ALL(x) (x).begin(),(x).end() #define SORT(x) sort( (x).begin(),(x).end() ) #define REVERSE(x) reverse( (x).begin(),(x).end() ) #define UNIQUE(x) (x).erase( unique( AL...
ALGO
0.999784
3.103549
7064273d-08e2-4e64-9da5-069377ae96a9
arka8464/Leetcode
0130-surrounded-regions/0130-surrounded-regions.cpp
class Solution { void dfs(int row,int col,vector<vector<char>>& board,vector<vector<int>> &vis) { if(row<0||col<0||col>=board[0].size()||row>=board.size()||board[row][col]=='X'||vis[row][col]==2) return ; cout<<row<<" "<<col<<endl; vis[row][col]=2; dfs(row+1,col,board...
ALGO
0.999922
5.876163
9b109345-541c-4606-a814-7293e093b3c6
Maksasj/megaboost
libs/iterator/example/transform_iterator_example.cpp
#include <functional> #include <algorithm> #include <iostream> #include <boost/iterator/transform_iterator.hpp> // What a bummer. We can't use std::binder1st with transform iterator // because it does not have a default constructor. Here's a version // that does. namespace boost { template <class Operation> clas...
ALGO
0.996452
6.608331
25399a2a-3dc7-4754-bfef-01af0222bacf
wallbreaker01/Competitive-Programming
C_Prepend_and_Append.cpp
#include<bits/stdc++.h> typedef long long int ll; using namespace std; const ll mx = INT_MAX; const ll mn = INT_MIN; /* Vogoban please code ta accept korai dew >.< */ void solve() { ll n; cin>>n; string s; cin>>s; ll c=n; for(ll i=0;i<n/2;i++) { if(( s[i]=='1' and s[n-i-1]=='0' ) ...
ALGO
0.999907
4.024214
b138c78f-6772-4c4f-8a9b-8e2b226dbc67
Srijitaz/gfg-solutions
Easy/Determine if Two Trees are Identical/determine-if-two-trees-are-identical.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node(int x){ data = x; left = NULL; right = NULL; } }; // } Driver Code Ends /* A binary tree node struct Node { int data; struct No...
ALGO
0.999067
7.418452
44cf68fb-47a0-4634-b015-c1943295a996
lokesh-chand-30/DSA-Pro
Arrays/sumofarray.cpp
//Sum of all elements in an array #include<iostream> using namespace std; int Add(int arr[],int size, int sum) { for(int i=0; i<size; i++) { sum=sum+arr[i]; } return sum; } int main() { int arr[]={10,20,30,40,50}; int size=5; int sum=0; cout<<"Sum is:"<<Add(arr,size,sum)<<endl; }
ALGO
0.978811
5.109661
4b9cd134-c807-4976-963b-fe70b4908e54
Shashwatsingh22/Practice_Le
DSA_Complete/LinkedList/Inserting_Node.cpp
#include<iostream> using namespace std; class Node { public: int data; Node *next; }; Node *first=NULL; void create_ll(int A[],int n) { Node *ptr,*last; first=new Node; first->data=A[0]; first->next=NULL; last=first; for(int i=1;i<n;i++) { ptr=new Node; ptr->d...
ALGO
0.999936
4.088886
3b47e118-8852-4b46-9b78-f48e9ce4e385
Arijul420/Numerical-Methods-main
4.Interpolation/2.1 Newton's divided difference for n.cpp
#include<stdio.h> #define Max 100 using namespace std; int main() { double x[Max],fx[Max],sum = 0.0 , xp,lf; double a[Max],div[Max][Max]; int n; printf("Enter the number of set : "); scanf("%d",&n); printf("Enter Data point and the function value of that point : \n\n"); for(int i = 1 ; i <...
ALGO
0.999936
3.366069
2a95d7f2-2bf6-467f-b117-00a3c4fd6f9d
akosiorek/CSE
parallel_numerics/src/src/test3.cpp
/* * test2.cpp * * Created on: Oct 24, 2014 * Author: Adam Kosiorek */ #include <iostream> #include <cmath> #include <mpi.h> #include <cstdlib> /** * Simple MPI Test * Integrates a function according to the trapezoidal rule * reduces workers' outputs by calling MPI_Recv */ double f1(double x) { retur...
ALGO
0.995801
5.709455
2370edfb-8d4e-4831-9134-204daa20cdb2
OmNilawar/DSA-Solutions
bit manupalation/minimun_steps_to_equal_to_x.cpp
https://leetcode.com/problems/minimum-number-of-operations-to-make-array-xor-equal-to-k/ class Solution { public: int minOperations(vector<int>& nums, int k) { int n = nums.size(); int finalXOR = 0; for(int i = 0;i < n;i++) { finalXOR = finalXOR ^ nums[i]; } ...
ALGO
0.999981
6.053284
cd928126-6253-4b17-9bc7-7663a4816c2e
AppSalmon/Competition-programming-notebook
Tailieu/ACM_Notebook_new-master (template Nguyen Thanh Trung)/ACM_Notebook_new-master/Geometry/tests/aizu_cgl_3_c_polygon_in_polygon.test.cpp
#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=CGL_3_C" #include "../../template.h" #include "../basic.h" #include "../polygon.h" void solve() { int n; cin >> n; Polygon g(n); for (auto& p : g) cin >> p; int q; cin >> q; while (q--) { Point p; cin >> p; ...
ALGO
0.999887
5.802996
ae8fb96b-7344-47ec-8582-0acf9fe2eae2
ishandutta2007/codeforces
cz_xuyixuan/normal/950/A.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 100005; template <typename T> void chkmax(T &x, T y) {x = max(x, y); } template <typename T> void chkmin(T &x, T y) {x = min(x, y); } template <typename T> void read(T &x) { x = 0; int f = 1; char c = getchar(); for (; !isdigit(c); c = getchar()) if (c =...
ALGO
0.999961
3.50912
cb225f3f-3372-4db1-a446-6e29274173c9
weimingtom/onscripter-libretro_fork
onscripter-libretro/deps/onscripter-en/graphics_sse2.cpp
// Based upon routines provided by Roto #ifdef USE_X86_GFX #include <emmintrin.h> #include <math.h> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #include "graphics_sum.h" #include "graphics_blend.h" namespace ons_gfx { int imageFilterMean_SSE2(unsigned char *src1, unsigned char *src2, unsigned char *dst...
TOOL
0.996596
6.289113
13032920-23c7-4424-867f-0cb14f8788a5
Arvind200323/DSA
Leet Code/2971. Find Polygon With the Largest Perimeter.cpp
class Solution { public: static long long largestPerimeter(vector<int>& nums) { sort(nums.begin(), nums.end()); long long perimeter=0, sum=0; for(int i=0;i<nums.size();i++){ if(sum>nums[i]) perimeter=sum+nums[i]; sum+=nums[i]; } if(perimeter==0) return...
ALGO
0.999722
5.191422
0e80ac91-d986-4a47-bfbc-27dc314afc40
mr-01000001/solve-problems
ConvertToNumber.cpp
#include <iostream> using namespace std; int main() { string num; int container = 0; cin >> num; if (num.size() <= 6) { for (int i = 0; i < num.size(); i++) container += (int) num[i]; cout << container * 3; } else cout << "Maximum 6 letters."; ...
ALGO
0.986815
4.150626
8916dd34-60ed-4eea-9324-a583a5a24743
ishandutta2007/codeforces
4et_llpuyhbljl/normal/1544/C.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,abm,mmx,tune=native") #include<vector> #include<iostream> #include<stack> #include<cmath> #include<algorithm> #include<set> #include<map> #include<string> #include<tuple> #include<bitset> #include<queue> #include<...
ALGO
0.999992
4.683444
00469a90-2cfa-407d-8189-1c8dc4f5f426
AbhishekJrC/OOPs-Codes
lab4_advance/q1.cpp
#include<iostream> using namespace std; class A { private: int a,b,temp; public: A() { cout<<"Enter First number:"<<endl; cin>>a; cout<<"Enter Second number:"<<endl; cin>>b; temp=a; a=b; b=temp; } friend class B; }; class B { publi...
ALGO
0.982883
4.229353
d4e061ad-84a4-4406-9294-a51515c12859
ishandutta2007/codeforces
hank55663/normal/1261/A.cpp
#include<bits/stdc++.h> using namespace std; #define LL long long #define ULL unsigned long long #define mp make_pair #define pb push_back #define pii pair<int,int> #define pll pair<LL,LL> #define x first #define y second #define pi acosl(-1) #define sqr(x) ((x)*(x)) #define pdd pair<double,double> #define MEMS(x) mems...
ALGO
0.999275
3.077672
07a3eae9-037e-4382-be60-960a3f6a39f0
Ventu012/P5_ExtendedKalmanFilter
src/tools.cpp
#include "tools.h" #include <iostream> using Eigen::VectorXd; using Eigen::MatrixXd; using std::cout; using std::endl; using std::vector; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { /** * TODO: Calculate the RMS...
ALGO
0.988547
5.889167
18f886bb-0eb6-4df1-8f93-55a1790d2704
ti8anACEx/sauda_2_sale
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
31b5a993-36c0-4ee9-a90b-ea6c4202d3a3
dishvanthini/cpp
2's compelement.cpp
#include<iostream> #include<cmath> #include<cstring> using namespace std; class compelement { string s,one_s; public: void input() { cout<<"enter the string ..."<<endl; cin>>s; } void check() { for (int i=0;i<s.length();i++){ if (s[i]!='0' && s[i]!='1'){ cout<< "Not a bin...
ALGO
0.999513
4.070173
f8a3b5ba-eef4-48a3-a2cc-2c08fd7c0687
ZHOURUIH/GameEditor
Engine/Utility/txFileUtility.cpp
#include "txFileUtility.h" #include "Utility.h" void txFileUtility::findFiles(const std::string& pathName, txVector<std::string>& files, const std::string& patterns, const bool& recursive) { txVector<std::string> patternList; patternList.push_back(patterns); findFiles(pathName, files, patternList, recursive); } #if...
TOOL
0.958285
5.378578
723a4f40-afa4-4162-8351-552e04a26f52
EPFL-LGG/CurvedWeaving
elastic_rods/3rdparty/libigl/include/igl/pinv.cpp
#include "pinv.h" #include <limits> #include <cmath> template <typename DerivedA, typename DerivedX> void igl::pinv( const Eigen::MatrixBase<DerivedA> & A, typename DerivedA::Scalar tol, Eigen::PlainObjectBase<DerivedX> & X) { Eigen::JacobiSVD<DerivedA> svd(A, Eigen::ComputeFullU | Eigen::ComputeFullV ); typ...
ALGO
0.999654
4.81321
68bb9ff1-f651-40e5-8476-6844a526d6a9
aditya-sengupta/simea
lib/boost_1_70_0/libs/graph/example/bfs-name-printer.cpp
using namespace boost; template <typename Graph, typename VertexNameMap, typename TransDelayMap> void build_router_network(Graph & g, VertexNameMap name_map, TransDelayMap delay_map) { typename graph_traits < Graph >::vertex_descriptor a, b, c, d, e; a = add_vertex(g); name_map[a] = 'a'; b...
ALGO
0.999347
5.658049
8f7cd308-a0a4-4f2c-b529-d0f2d19f3b8e
IvanTicona/Competitive-Programming
Contest/Div3/Round974/B.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ int n, k; cin>>n>>k; int r; if(r%2==0) cout<<"YES"<<endl; else cout<<"NO"<<endl; } int main(){ int t; cin>>t; while (t--){ solve(); } return 0; }
ALGO
0.999885
4.278238
1b9c0b0b-3349-4a95-9d33-140e11bfaa8c
ShayNamir/CPP_EX2_24-main
Graph.cpp
/* ID: 207192246 Email: <EMAIL> */ #include "Graph.hpp" #include <iostream> using namespace ariel; using namespace std; // Load the graph to the object. void Graph::loadGraph(vector<vector<int>> adjMatrix) { // Check if the graph is empty. if (adjMatrix.empty()) { throw invalid_argument("The graph is empty,...
ALGO
0.998035
4.73845
9a61dfed-7f84-4886-8b77-47f91c2aef13
sourav-gt47/Coding_Questions
space_to_%20.cpp
#include <bits/stdc++.h> using namespace std; #define ll int long long int main() { string str; getline(cin,str); string ans=""; for(int i=0;i<str.size();i++){ if(str[i] == ' ') ans += "%20"; else ans += str[i]; } cout << ans << endl; return 0; }
ALGO
0.986726
3.019859