uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
92e6a2da-5ba7-4f47-b4ec-a335303ce459
MUTHUGANESH13/Leetcode
C++/561. Array Partition.cpp
class Solution { public: int arrayPairSum(vector<int>& n) { int s=0,i; sort(n.begin(),n.end()); for(i=0;i<n.size();i+=2){ s+=n[i]; } return s; } };
ALGO
0.999824
5.571919
87e6e49f-aec5-44c3-bbfc-7a96516f10ad
knowonehome/Marlin-2.1.2-HEVO-SKR1.4Turbo
Marlin/src/gcode/motion/G5.cpp
#include "../../inc/MarlinConfig.h" #if ENABLED(BEZIER_CURVE_SUPPORT) #if AXIS_COLLISION('I') || AXIS_COLLISION('J') #error "G5 parameter 'I' or 'J' collision with axis name." #endif #include "../../module/motion.h" #include "../../module/planner_bezier.h" /** * Parameters interpreted according to: * https://li...
ALGO
0.946527
7.579149
26b08956-eccf-4846-bb7b-bc1e06c3af97
Qn0924/algorithm-learn-c
7-12/lianxi.cpp
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int t; cin>>t; while (t--) { int n; cin>>n; if (n%4!=0) { cout<<"Alice"<<'\n'; }else { cout<<"Bob"<<'\n'; } } }
ALGO
0.999949
4.105395
3d63963d-7e00-495f-abc0-fabf5274d3c5
Arya-f4/kuliahalprocpp
pertemuan_4/highestarray.cpp
#include <iostream> #include <sstream> #include <string> #include <cstdlib> #include <cmath> using namespace std; // Headers string toString (double); int toInt (string); double toDouble (string); int main() { int i, n, o, a, large; cout << "Masukkan Size Array Yang anda inginkan" << endl; cin >> a; ...
ALGO
0.993614
4.117109
c1ca2c96-b701-4740-9f94-5d66677b16b9
Patatje19/Procedural-Programming-in-C
Week 1/Exercise 1.9 - Driehoek/Exercise 1.9 - Driehoek.cpp
// Exercise 1.9 - Driehoek. // Schrijf een programma dat een driehoek van variabele lengte afdrukt, zoals in het voorbeeld. Gebruik // while- of for-loops en druk ieder character apart af. De gebruiker geeftaan hoe groot de driehoek is. #include <iostream> using namespace std; int main(){ int hoe_groot; cout << "...
ALGO
0.951374
3.571589
f64e3e2b-8c2b-4e11-8b6d-bb9006a554b2
HanzPo/competitive-programming
C++/CCC J/ccc02j2.cpp
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); vector<string> words; string line; cin >> line; while (line != "quit!") { words.push_back(line); cin >> line; } for (int i = 0; i < (int)words.size(); i++) { if (words[i].s...
ALGO
0.998831
5.041269
8e664846-e382-48cf-b206-d13f0787d38c
CrutoSJ/GFG-Leetcode_CPP-Python
#GFG-Daily/GasStation.cpp
// #Question:- // Link-> https://www.geeksforgeeks.org/problems/circular-tour-1587115620/1 // Date-> 30/03/25 // #Solution:- #include<bits/stdc++.h> using namespace std; class Solution { public: int startStation(vector<int> &gas, vector<int> &cost) { int totalgas = 0; int totalcost ...
ALGO
0.999962
5.389564
b7bf2aad-551b-4769-b65b-4c6809410bfd
DragosGhinea/SortsAnalysis
SortingCode/quickSortRandomized.cpp
#include "sort.h" #include<bits/stdc++.h> #include<iostream> using namespace std; void swapRandomized(long long *a, long long *b) { long long t = *a; *a = *b; *b = t; } long long randomizedPartition(vector<long long> &v, long long i, long long j){ long long pivot = v[rand() % (j - i + 1) + i]; whil...
ALGO
0.99962
4.859876
eade0f2b-352f-4dfc-976f-b8e53bd19d95
s0umyajeet/Competitive-Programming
Codeforces/534A.cpp
#include <bits/stdc++.h> #define int long long #define coutans cout << "ans: " //debug #define endl "\n" using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1; // cin >> t; while (t--) { int n; cin >> n; cout << n << endl; ...
ALGO
0.999401
4.121185
21d07fd3-9fc1-443a-a792-dabe48f74dc7
Tprashant1/GFG-Problems
Difficulty: Medium/Not a subset sum/not-a-subset-sum.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: long long findSmallest(vector<int> &arr) { long long curr = 1; for(auto i:arr){ if(i>curr){ ...
ALGO
0.99963
6.275156
84110063-8b95-437a-b464-5e5d3baa0b85
siddharthSingh2003/A-to-Z
insertionSort.cpp
#include <iostream> void insertionSort(int arr[], int n) { for (int i = 1; i < n; i++) { int key = arr[i]; int j = i - 1; // Move elements of arr[0..i-1] that are greater than key // to one position ahead of their current position while (j >= 0 && arr[j] > key) ...
ALGO
0.999978
5.756443
69fee484-1dc1-4ac3-b2eb-efd690125662
ishandutta2007/codeforces
mip182/normal/1093/D.cpp
#include <bits/stdc++.h> typedef long long ll; #define pb push_back #define mii map <int, int> #define mll map <ll, ll> #define pii pair <int, int> #define pll pair <ll, ll> #define vi vector <int> #define vd vector <double> #define vll vector <ll> #define fi first #define se second #define si set <int> #define sll set...
ALGO
0.999893
4.384564
d86aa04b-1c9f-4cea-9c0f-ea7b84a03d1e
Sahaj-Bamba/HacktoberTrial
war2.cpp
#include<bits/stdc++.h> #include<math.h> #define rep(i,k,n) for(int i=k;i<n;i++) #define ll long long #define MOD 1000000007 #define INF 12345678123456 #define MIN(a,b) (a>b?b:a) using namespace std; #include<bits/stdc++.h> #include<math.h> #define rep(i,k,n) for(int i=k;i<n;i++) #define ll long long #define MOD 100000...
ALGO
0.999947
3.204395
6f811830-a376-4337-b640-344611858b0b
RyodoTanaka/ompl_apps
cpp/example_v1.0.0/src/GeomPlanningRealVector2D_RRT_Connect_Estimate.cpp
#include <ompl/geometric/SimpleSetup.h> #include <ompl/geometric/planners/rrt/RRTConnectEstimate.h> #include <ompl/base/spaces/RealVectorStateSpace.h> #include <ompl/base/PlannerData.h> #include <cmath> #include <iostream> #include <fstream> #include "IO/FileSave.hpp" namespace ob = ompl::base; namespace og = ompl::g...
ALGO
0.980054
5.649556
6b17a4fa-6492-4279-b6a7-5ccb385a8562
sarvex/leetcode-beef
solution/1700-1799/1742.Maximum Number of Balls in a Box/Solution.cpp
class Solution { public: int countBalls(int lowLimit, int highLimit) { int cnt[50] = {0}; int ans = 0; for (int i = lowLimit; i <= highLimit; ++i) { int y = 0; for (int x = i; x; x /= 10) { y += x % 10; } ans = max(ans, ++cnt[y]...
ALGO
0.999616
6.056298
48540027-88bd-4f98-87aa-8172b49d3705
verma-rudresh/MIPS-Pipelined-Processor-cpp
machine_code_generator.cpp
#include <bits/stdc++.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <string.h> #include "./machine_code_generator.h" #define INSTRUC_SIZE 32 using namespace std; vector<vector<string>> mips_code; //vector that stores all the MIPS instructions.. int register_array[32]; int memory_array[100]; ...
TOOL
0.965068
3.013064
f946e73f-7474-4682-b120-1e9945ff0ba0
MadihaAshraf12/Programming-practical-EE-24-02
series6.cpp
#include <stdio.h> int main() { int n; printf("Enter n: "); scanf("%d", &n); for (int i = 1; i <= n; i++) { for (int j = 1; j <= 5; j++) { printf("%d ", j); } } printf("\n"); return 0; }
ALGO
0.992686
3.39991
e21b7070-cf4f-4f00-abee-67d35e756908
asadullahkhalid147/XPSC
week-3/day-2/yes.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string s; cin>>s; int i=0,j=0; int fst=0,snd=0,thd=0; int n=s.size(); while(j<3) { if((s[j]=='y'||s[j]=='Y' )&&(s[j+1]=='E'||s[j+1]=='e') &&(s[j+2]==...
ALGO
0.999552
3.826455
0c67e0fc-0241-4f1f-b073-3b563df29577
HauntedHydra/Practise-Problems-on-C--
Pattern_Question/Butterfly.cpp
#include<iostream> using namespace std; int main(void){ // Butterfly pattern: int n; cin >> n; for(int i=1; i<=n; i++){ for(int j=1; j<=i;j++){ cout << "*"; } int space = 2*n - 2*i; for(int j=1; j<=space; j++){ cout << " "; } for(int j=1; j<=i;j++){ cout << "*"; } ...
ALGO
0.999953
3.759626
d7129a8b-3816-461e-938c-52277ad3bc1c
suxutao/LeetcodeList
cn/2528-maximize-the-minimum-powered-city .cpp
#include "../../../stdc.h" using namespace std; //leetcode submit region begin(Prohibit modification and deletion) class Solution { public: long long maxPower(vector<int>& stations, int r, int k) { int n = stations.size(); vector<long long> sum(n + 1), power(n), diff(n); for (int i = 0; i <...
ALGO
0.999902
5.377828
864ef27e-8318-43ef-8d98-86b8e45ee1c3
danghoangnhan/leetcode
Stack/496.next-greater-element-i.cpp
/* * @lc app=leetcode id=496 lang=cpp * * [496] Next Greater Element I */ // @lc code=start #include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2) { unordered_map<int, int> next_greater; stack<int> st; ...
ALGO
0.999251
6.212665
d3b96948-fdb8-4be7-9739-a53a51107d91
android-desktop/platform_frameworks_av
services/oboeservice/AAudioEndpointManager.cpp
#define LOG_TAG "AAudioEndpointManager" //#define LOG_NDEBUG 0 #include <utils/Log.h> #include <assert.h> #include <functional> #include <map> #include <mutex> #include <sstream> #include <utility/AAudioUtilities.h> #include "AAudioEndpointManager.h" #include "AAudioServiceEndpointShared.h" #include "AAudioServiceEnd...
TOOL
0.862702
6.297627
7de827b2-8290-4743-9d99-e2404c7fd49e
backpackercoin577/oldbackpackercoin
src/sync.cpp
#include "sync.h" #include "util.h" #include <boost/foreach.hpp> #ifdef DEBUG_LOCKCONTENTION void PrintLockContention(const char* pszName, const char* pszFile, int nLine) { printf("LOCKCONTENTION: %s\n", pszName); printf("Locker: %s:%d\n", pszFile, nLine); } #endif /* DEBUG_LOCKCONTENTION */ #ifdef DEBUG_LOC...
TOOL
0.97413
5.7469
6ef0ceef-5055-4388-9790-aa8f7270ba26
glbitm-coder/LeetCode-and-GeeksForGeeks-solutions
Next Greater Element - GFG/next-greater-element.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends // User Function Template for C++ solution class Solution { public: vector<long long> nextLargerElement(vector<long long> &arr, int n){ // Your code here stack<int> s; for(int i = n - 1; i >= 0; --i...
ALGO
0.999696
5.959524
ca706c13-f2ff-46d3-91e6-2bc98dad9cd9
iamritik19/DSA
Recursion/Beginner/fibonacci.cpp
#include<iostream> int Fibonacci(int n){ if(n==0 || n==1) return n; return Fibonacci(n-1)+Fibonacci(n-2); } int main(){ int n; std::cin>>n; std::cout<<Fibonacci(n); return 0; }
ALGO
0.999981
4.887085
9fe0b0b0-88e1-447a-a8fc-a4100775bf8b
swENGsh/codetree-TILs
240126/3의 배수 출력하기/print-multiple-of-number-three.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. int n, cur; cin >> n; cur = 1; while (cur*3 <= n){ cout << cur * 3 << " "; cur ++; } return 0; }
ALGO
0.999944
4.015144
dd3a5d44-ada2-49de-b18f-c58b3cde55d5
pranjalken32/LeetCode
1941-check-if-all-characters-have-equal-number-of-occurrences/1941-check-if-all-characters-have-equal-number-of-occurrences.cpp
class Solution { public: bool areOccurrencesEqual(string s) { unordered_map<char,int>m; for(int i=0;i<s.length();i++) { m[s[i]]++; } int x= m[s[0]]; for(int i=1;i<s.length();i++) { if(m[s[i]]!=x) return false; } ...
ALGO
0.999955
5.32478
7ef02376-0468-4e81-a5f8-a58808dabce5
joao-jcc/UFMG-CODE
2024/algoritmosI/defendArchadia/src/patrol.cpp
#include <vector> #include "patrol.hpp" Patrol::Patrol(BFS& bfs_, DFS& dfs_, Graph& graph_) : bfs(bfs_), dfs(dfs_), graph(graph_), nPatrols(0), patrolsPath(std::vector<std::vector<size_t>>()) { _patrolAll(); } void Patrol::_patrol(size_t battalion) { // patrulhamento para um batalhão espe...
ALGO
0.993807
5.072538
9473fb37-65df-45b3-b897-9eb850ab8fe2
Angellopp/CodeForces-Problems
J_Shout_Game.cpp
#include <bits/stdc++.h> #define endl '\n' #define dd(x) cerr << #x << "= " << x << "." << endl; #define ddl cerr << string(20, '=') << endl; #define ll long long #define ld long double #define ff first #define ss second #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define fastio ios_base::syn...
ALGO
0.999744
4.13536
78b32f4e-b1bc-4dc4-b75f-f43953ff6e10
TRQoder/DSA
Array/Array2/pointerToArray.cpp
#include<iostream> using namespace std; int main(){ int arr[]={1,2,3,4,5}; //giving pointer the address of array or first element of array // by arr, &arr[0] int* ptr = arr; //also int* ptr = &arr[0] ptr[0]=8; //also update using pointer //ways to access array; for (int i = 0; i < 5; i++)...
ALGO
0.998318
3.489445
e99d96cd-c70a-4e5b-8e1f-342cc6a1a114
MaTianmao/src
src/boost/libs/intrusive/example/doc_treap_set.cpp
using namespace boost::intrusive; class MyClass : public bs_set_base_hook<> //This is a base hook { int int_; unsigned int prio_; public: //This is a member hook bs_set_member_hook<> member_hook_; MyClass(int i, unsigned int prio) : int_(i), prio_(prio) {} unsigned int get_priority() co...
ALGO
0.994436
5.068931
bd2b3cc4-ec84-42a6-87d0-3fd9607c23a8
Geovanna-Lima/C
Funcao/Lista8Ex3a.cpp
#include<stdio.h> #include<conio.h> int soma(int *x) { int conta=0, cont; for(cont=1; cont<=*x; cont++) conta=conta+cont; printf("A soma obtida do numeros inteiro e:\n%d ", conta); } int main () { int x, *px; printf("Entre com o numero que vai ser calculado:\n"); scanf("%d", &x); px=&x; soma(px); ...
ALGO
0.995773
3.376436
c66fd90c-31ae-4469-a2e0-3d84820dbaea
Vibhukumar10/Patterns
Pattern20/Pattern20.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; for(int i=n;i>=1;i--) { for(int j=1;j<=i;j++) { cout<<i; } cout<<endl; } return 0; }
ALGO
0.999946
3.82024
2295812e-71aa-4aa1-a982-34ef7efdaa83
0point1Zishan/CP
LeetCode_Daily_Problem/2461. Maximum Sum of Distinct Subarrays With Length K.cpp
class Solution { public: long long maximumSubarraySum(vector<int>& nums, int k) { int n = nums.size(); vector<long long> pf(n); pf[0] = nums[0]; for(int i = 1; i < n; i++){ pf[i] = pf[i-1] + nums[i]; } unordered_map<int, int> mp; int i = 0; ...
ALGO
0.999969
5.68669
039e20f3-281b-446d-b65c-14bf1f7a45d7
aw-junaid/Computer-Science
Programming Fundamentals/Cplusplus/Cplusplus Programming/Program to perform a PUSH operation on a dynamically allocated stack.cpp
#include <iostream> using namespace std; // Define structure for stack node struct StackNode { int data; StackNode* next; }; // Define class for dynamic stack class DynamicStack { private: StackNode* top; public: // Constructor DynamicStack() { top = NULL; } // Destructor ~Dyn...
ALGO
0.958233
5.652388
7fcc7a3c-dd3a-4d98-9009-2be1184995c0
terzakig/SelfDrivingCar2-UKF
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.900065
4.969965
50d111e6-198b-4bec-aa88-fcf5062400a2
aaiss0927/Tutoring_DataStructure
23실습/Week_7/Week_7_4.cpp
#include <iostream> #include <vector> using namespace std; int temp; bool flag; class Node { private: int value; Node* parent; vector<Node*> child_list; public: int cnt; Node(int value, Node* parent) { this->value = value; this->parent = parent; } friend class Tree; }; class Tree { public: Node* root;...
ALGO
0.999985
4.756295
9096a47e-a9b8-4f8f-b188-b962a734aa54
ssDoi/Algorithm
프로그래머스/3/12987. 숫자 게임/숫자 게임.cpp
#include <string> #include <vector> #include <bits/stdc++.h> using namespace std; int solution(vector<int> A, vector<int> B) { int answer = 0; int n = A.size(); sort(A.begin(),A.end()); sort(B.begin(),B.end()); int idx=0; for(int i=0;i<n&& idx<n; i++) { while(B[idx]<=A[i] && idx<n) ...
ALGO
0.999567
4.910733
1421485f-c953-45d9-a584-2c84043453ad
SkylineBaby1031/CSS342
Lab2/Robot.cpp
#include "Robot.h" #include "Board.h" #include <string> #include <iostream> //#ifndef ADD_H //#define ADD_H using namespace std; Robot::Robot() { this->MaxStepsDir = 0; this->x = 0; this->y = 0; this->x = 0; this->y = 0; } Robot::Robot(int MaxStepsDir, int x, int y, int end_x, int end_y) { this->MaxStepsDir = ...
ALGO
0.998577
3.701201
c528c261-61af-4a36-a34c-861b34938b8f
kibotu/android.augmented
jni/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp
#include <Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h> #include <Box2D/Common/b2BlockAllocator.h> #include <Box2D/Dynamics/b2Fixture.h> #include <new> using namespace std; b2Contact* b2EdgeAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem =...
TOOL
0.922261
6.813939
c670f47a-a93c-49de-861c-ed61f9a7ef21
vaibhuujaiswal/DSAQuestionSolutions
Topological sort - GFG/topological-sort.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to return list containing vertices in Topological order. vector<int> topoSort(int V, vector<int> adj[]) { stack<int> st; vector<int> visited(V,0); for (int i = 0; i < V; i...
ALGO
0.999933
6.766207
c75fd9f8-2b3b-4384-a03b-5c3af6762386
L-Spiro/SurfaceLevel2
Src/Image/FreeImage/Source/LibRawLite/internal/dcraw_common.cpp
#include <math.h> #define CLASS LibRaw:: #include "../libraw/libraw_types.h" #define LIBRAW_LIBRARY_BUILD #define LIBRAW_IO_REDEFINED #include "../libraw/libraw.h" #include "../internal/defines.h" #include "../internal/var_defines.h" int CLASS fcol (int row, int col) { static const char filter[16][16] = { { 2,1,1,3...
TOOL
0.900702
4.120214
cf12a7e9-2a0d-4d26-ada9-4f76374107c4
ill-inc/biomes-game
voxeloo/common/rays.cpp
#include "voxeloo/common/rays.hpp" #include "voxeloo/common/voxels.hpp" namespace voxeloo::rays { float integrate_depth(const DensityMap& dm, Vec3f src, Vec3f dir, float far) { float depth = 0.0f; float t_prev = 0.0f; float d_prev = 0.0f; float discount = 1.0f; bool sampling = false; auto accessor = dm....
ALGO
0.995583
6.766409
a72327ba-b2fd-4dea-b772-f5568e09f1a6
Kallaf/LeetCode
climbing-stairs.cpp
class Solution { public: int climbStairs(int n) { if(n == 1)return 1; if(n == 2)return 2; int before_previous=1,previous=2,current; for(int i=3;i<=n;i++) { current = previous + before_previous; before_previous = previous; previous = current...
ALGO
0.999973
5.705642
8a981c2a-7657-48f6-ab1b-6eb90116479c
Joey574/Cpp-Advanced-Projects
Levenshtein Graphing/Levenshtein Graphing.cpp
#pragma once #include <stdio.h> #include <iostream> #include <string> #include <stdlib.h> #include <time.h> #include <conio.h> #include <vector> #include <windows.h> #include <thread> #include <math.h> #include <sstream> #include <fstream> #include <cwchar> #include <algorithm> #include <unordered_map> #include <...
ALGO
0.99785
4.097871
3fe58fe9-c463-432a-a09b-eccba8ebbcd0
Sparsa/bhim
include/boost/compute/perf/perf_next_permutation.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/next_permutation.hpp> #include <boost/compute/algorithm/prev_permutation.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { retu...
ALGO
0.998341
5.152215
9047776e-e67c-47a5-9aa7-c3a1c530538d
raincross7/code-similarity
codes/train_code/problem314/problem314_43.cpp
#include<iostream> #include<vector> #include<climits> using namespace std; int recur(int n,vector<int>op,vector<int>&dp) { if(n==0||dp[n]!=-1) { return dp[n]; } else { int min=INT_MAX; for(int i=0;i<op.size();i++){ if(op[i]<=n){ int result=recur(n...
ALGO
0.999864
3.770247
5b00302c-641e-4464-983f-5de55b2f8d4b
Utsav-Ku/Daily-DSA
DP/deleteAndEarn.cpp
#include<bits/stdc++.h> using namespace std; // Space Optimised Code int deleteAndEarn(vector<int>& nums) { int n = nums.size(); if(n==1) return nums[0]; sort(nums.begin(),nums.end()); int maxi = nums[n-1]; vector<int>prev(maxi+1,0) , curr(maxi+1 , 0); ...
ALGO
0.99987
5.5039
f38a4f13-1352-4f83-9ba5-af414b679d9e
sontungexpt/UIT-Workspaces
C_C++/HocKi2_Nam1/UIT-Together/MangMotChieu/Bai104/Bai104.cpp
#include <iostream> #include <fstream> #include <string> #include <iomanip> #include <cctype> using namespace std; #define MAX 100000 int ViTriAmDau(float[], int); int TimViTri(float[], int); string GetFileLink(string); void Nhap(float[], int&, string); int main() { float a[MAX]; int n = 0; Nhap(a, n, GetFileLink...
ALGO
0.991095
3.632204
f11d3a3e-1cd5-4376-a127-6365a6afcf4d
ncduy0303/cses-solutions
src/1642.cpp
#include <bits/stdc++.h> using namespace std; #define print_op(...) ostream& operator<<(ostream& out, const __VA_ARGS__& u) template<typename A, typename B> print_op(pair<A, B>) { return out << "(" << u.first << ", " << u.second << ")"; } template<typename T_container, typename T = typename enable_if<!is_same<T_conta...
ALGO
0.999915
3.627283
57e43d66-762e-4043-8170-67dbd91516a3
Naman2626/naman_cpp_
binary search/total_no_of_occ_ls.cpp
#include<iostream> using namespace std; int main(){ int arr[7]={0,3,3,3,3,3,8}; int count = 0; int k = 3; for(int i=0;i<7;i++){ if(arr[i]==k){ count++; } } cout<<count; return 0; }
ALGO
0.999019
3.372874
daf5fe55-8919-45ef-a040-d707d47fc99d
NikkittaP/osg_pack
sources/proj/src/projections/vandg2.cpp
#define PJ_LIB__ #include <errno.h> #include <math.h> #include "proj.h" #include "proj_internal.h" namespace { // anonymous namespace struct pj_opaque { int vdg3; }; } // anonymous namespace PROJ_HEAD(vandg2, "van der Grinten II") "\n\tMisc Sph, no inv"; PROJ_HEAD(vandg3, "van der Grinten III") "\n\tMisc Sph, n...
ALGO
0.998182
6.671356
8cf0be38-c933-4a36-98cf-f0bcbe47d1c0
nhatthien1208/NguyenNhatThien_monC-
Chuong_3/3.7.cpp
// This program demonstrates integer overflow and underflow. #include <iostream> using namespace std; int main() { // testVar is initialized with the maximum value for a short. short testVar = 32767; // Display testVar. cout << testVar << endl; // Add 1 to testVar to make it overflow. 1testVar = tes...
TEST
0.885197
5.565644
d7bbac67-91c8-4a92-96bd-5a2e8819a079
JSeungBeom/Data-structure
personal practice/personal practice/stack2.cpp
#include <iostream> using namespace std; class Stack { private: char* arr; int capacity; int topidx; public: Stack(int capacity) { this->capacity = capacity; arr = new char[capacity]; topidx = -1; } int size() { return topidx + 1; } bool empty() { return (size() == 0); } void push(char data) {...
ALGO
0.999959
5.227521
61fbacc4-3ad5-48f0-a25c-b191e64c7d25
tigmanshu-malik/Data-Structures-Algorithms
linked_list/singly.cpp
#include<iostream> using namespace std; struct node { int data; node* next; node(int value) : data(value), next(nullptr) {} }; node* start = nullptr; void append(int value){ node* temp = new node(value); if(start == nullptr) start = temp; else{ node* ptr = start; ...
ALGO
0.999814
3.964158
79adeed3-b90e-4de9-9487-2b6e66f24d4c
j-c-w/DSPAcceleratorSupport
results/Github/xbarin02_uFFT_2/accelerated_ffta.cpp
/* Orignal skeleton is: Pre: SKELETON: With the array index wrappers adi_acc_output,Annon And (fromvars) [] Under dimensions [adi_acc_n = N (=) ] With conversion function IdentityConversion >(new binding): With the array index wrappers adi_acc_n And (fromvars) [N] Under dimensions [] With conversion function Ident...
ALGO
0.953125
6.113544
0be692e7-8308-4b81-abc5-d532a736215b
riya053/GFG
Boundary traversal of matrix.cpp
You are given a matrix of dimensions n x m. The task is to perform boundary traversal on the matrix in a clockwise manner. Example 1: Input: n = 4, m = 4 matrix[][] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15,16}} Output: 1 2 3 4 8 12 16 15 14 13 9 5 Explanation: The matrix ...
ALGO
0.999999
6.548655
89926e8d-f9d9-4cb3-998d-75d045231616
priyanshsrivastava749/DSA-Notes-and-Code
module-5(2D Vectors)/PascalTriangle/code.cpp
#include<iostream> #include<vector> using namespace std; int main(){ int numrows = 5; vector<vector<int>> v; for(int i = 0; i < numrows; i++){ vector<int> a(i + 1); // +1 to allow access to index i v.push_back(a); } for(int i = 0; i < numrows; i++){ for(int j = 0; j <= i; ...
ALGO
0.999714
5.87335
836fb531-bdeb-45b8-a7e0-22bd8b0a5c8c
Akash-Chowdhury/Leetcode-Practice
Diameter of a Binary Tree - GFG/diameter-of-a-binary-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int data; struct Node* left; struct Node* right; }; Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp-...
ALGO
0.999214
6.991322
13554715-440b-4593-94c1-f48d19510d90
Dusk145/CSES
Apartments.cpp
#include <bits/stdc++.h> #define ll long long #define endl "\n" #define ull unsigned long long #define mod 1000000007 using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll n, m, k; cin >> n >> m >> k; vector <ll> a, b; for (int i = 0; i < n; ++i){ l...
ALGO
0.999974
4.152844
db8bcd6a-d221-4122-bd3b-4ed6f2cb2ddf
michaelma0311/Silver
concom/concom.cpp
/* ID: michael504 LANG: C++ TASK: concom */ #include <bits/stdc++.h> using namespace std; vector<pair<int, int>> owns[101]; int own[101]; bool owned[101]; void dfs(int cur) { if (owned[cur] == true) { return; } owned[cur] = true; for (pair<int, int> i : owns[cur]) { own[i.first] +...
ALGO
0.9999
3.635527
5b4092d8-9c8d-4635-922e-1ab5cd0c89b0
siddharth-kumar182002/DSA
A_Two_Screens.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(__null); int t; cin>>t; while(t--){ string s,t; cin>>s>>t; long long ans=0; long long ind=-1; long long f=0; for (int i = 0; i < s.size(); i++) { ind=i; if(s[i]==t[i]){ ans++; } ...
ALGO
0.999944
4.617839
65542dc9-c096-4918-8727-36ead4c4d459
ishandutta2007/codeforces
01191020csl/normal/1428/F.cpp
#include<bits/stdc++.h> using namespace std; struct node { int l, r, num; }; node nd[500001]; int tot; int main() { int n; cin >> n; string s; cin >> s; int last = -1; long long ans = 0, sum = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == '0') { if (i == 0 || s[i-1] == '1') { while (last < i) ++t...
ALGO
0.999983
4.019263
745ba4b3-7ae4-4fc7-bed8-09620afa1c76
raincross7/code-similarity
codes/train_code/problem362/problem362_77.cpp
#include <iostream> // cout, endl, cin #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> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstd...
ALGO
0.999933
3.910633
052e19eb-81f8-491e-81a5-560053f13006
blakeyi/PTA
code/L2_001_EmergenceResecue.cpp
#include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #include<vector> #include<list> using namespace std; const int inf = 0x3fffffff; int main() { int dis[500][500] = { inf };//洢֮ľ룬dis[p][q]ʾpкq֮ľ int rescueNum[500] = { 0 };//ʾÿľԮ vector<int> path;//· list<int> remainCity;//δij list<int>::ite...
ALGO
0.999936
3.220631
ee4ddacb-4a45-478c-9e95-762b46327999
wooyn730/Problem-Solving
프로그래머스/0/120849. 모음 제거/모음 제거.cpp
#include <string> using namespace std; string solution(string my_string) { string answer = ""; for (int i=0; i<my_string.length(); i++) if (my_string[i] != 'a' && my_string[i] != 'e' && my_string[i] != 'i' && my_string[i] != 'o' && my_string[i] != 'u') answer += my_string[i]; return ans...
ALGO
0.993115
3.944977
050ce546-4586-4efc-87c7-a32e1891ecb5
uzoochogu/Console-Apps-with-cpp
Data-Structures-and-Algorithms/merge_sort.cpp
#include <iostream> #include <vector> using namespace std; /* ******************************* Merge sort Algorithm This is another Divide and Conquer Algorithm, it breaks the data in two halves and keeps on breaking until it arrives at two pairs of values which it sorts, then it merges the halves back sorting at eac...
ALGO
0.999987
5.197021
2f629731-e27d-4500-9807-b7b024e3aee6
TajwarSaiyeed/problem-solving-codechef-leetcode-codechef
Codeforces Round 1006 (Div. 3)/A_New_World_New_Me_New_Array.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; template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define yes cout << "YES" << '\n' #define no cout << "NO...
ALGO
0.999878
3.910665
f30d0cb0-642b-41b2-9d05-ec0daf206f5b
ruxipop/UTCN
Fundamental Algorithms/Labs/Lab-1/Homework1.cpp
/* * @author Pop Ruxandra Maria * @group 30226 Bubble_sort -> average and worst case complexity:O(n^2)(assignments=comparisons=total=0(n^2)) ->best case complexity:O(n) (assignments=0(1) ,comparisons=0(n),total=0(n)) -> stable (two objects with equal keys appear in the same order in sorted out...
ALGO
0.99941
5.225932
6d6879b4-c9ee-4fea-a1b1-64c623362b58
OcakciEned/countdown_timer
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.998733
6.76775
eccdd8d0-0469-4147-93cf-65072bc6f043
Aayush2492/Leetcode-Problems
problems/populating_next_right_pointers_in_each_node/solution.cpp
/* // Definition for a Node. class Node { public: int val; Node* left; Node* right; Node* next; Node() : val(0), left(NULL), right(NULL), next(NULL) {} Node(int _val) : val(_val), left(NULL), right(NULL), next(NULL) {} Node(int _val, Node* _left, Node* _right, Node* _next) : val(_...
ALGO
0.999924
5.722886
f79b8939-6f98-4731-bff9-d133c06d9cd9
justphilipp/hellocpp
polymorphism/inherit.cpp
#include <iostream> #include <typeinfo> /** * 基类和派生类的析构和构造 * 打印结果:先析构派生类 * Base() * Derive() * ~Derive() * ~Base() */ class Base { public: Base(int data) : ma(data),mb(0) { std::cout << "Base()" << std::endl; } virtual ~Base() { std::cout << "~Base()" << std::endl; } virtual void show() { std::cout <...
TOOL
0.851082
5.69681
bc3c8a3f-523d-4679-a874-59344976122a
jamesus95/Cpp
lab4-342/linkedintlist.cpp
/** * \file linkedintlist.cpp * @details Implementation of a basic linked list of integers. */ #ifndef LINKED_INT_LIST_CPP #define LINKED_INT_LIST_CPP #include <iostream> LinkedIntList::LinkedIntList() { root = NULL; size = 0; } LinkedIntList::~LinkedIntList() { Node* temp = NULL; while(root != NULL) { tem...
ALGO
0.977033
5.757453
a718a151-8c8c-4662-b346-b195771413a6
nazibur175/C-
Age_in_Days.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; // n=400; int year=n/365; // year = 400/365; // year = 1; n=n%365; int mon=n/30; n=n%30; cout<<year<<" years"<<endl; cout<<mon<<" months"<<endl; cout<<n<<" days"<<endl; return 0; } // 10^5 * 10...
ALGO
0.998018
3.745869
75278b1e-10bc-4e30-b0fe-35a295914452
mane-paata/amath583_ps5
candidate/prob4_1.cpp
#include <iostream> #include <cstdlib> #include <iomanip> #include "Vector.hpp" #include "amath583.hpp" int main(){ double norm2 = 0, norm_asc = 0, norm_descend = 0; for(int i=0; i < 100; ++i){ Vector x = randomVector(1000); { norm2 += twoNorm(x); //std::cout << "The vector norm is" << std::setprecision(15...
TEST
0.98386
4.77011
d17c81c1-d231-4920-b7d9-7e4cc3b94520
virtyaluk/leetcode
problems/649/solution.cpp
class Solution { public: string predictPartyVictory(string senate) { int n = size(senate); queue<int> rq, dq; for (int i = 0; i < n; i++) { if (senate[i] == 'R') { rq.push(i); } else { dq.push(i); } } ...
ALGO
0.999971
6.240347
2fa2c71e-6b5e-498f-93cb-8527e1a7310f
akramhany/ProblemSolving
ComptetiveProgramming/Azhar_Problems/LevelOne/Week6/M_Special_Elements.cpp
#include <iostream> #include <math.h> #include <vector> #include <algorithm> #include <map> #include <string> #include <set> #include <cstring> #include <queue> #define ll long long #define llu unsigned long long #define pii pair<int , int> #define lp(i, j, n) for (int i = j; i < n; i++) #define vi vector<int> #define...
ALGO
0.999462
4.161365
58fe9839-576e-418c-9c09-82087d4ffba2
yakode/CandCPP-practice
LeetCode/0790_Domino-and-Tromino-Tiling.cpp
class Solution{ public: int dfs(vector<vector<int>> &dp, bool corner, int n){ if(n == 0){ if(!corner) return dp[corner][n] = 1; else return dp[corner][n] = 0; }else if(n < 0){ return 0; } if(dp[corner][n] > -1) return dp[corner][n]; ...
ALGO
0.999977
5.796952
c16a7378-be4d-42cb-9e9f-27b2ab4387a6
RahulScripted/LeetCode-Problems
Top Interview 150/Matrix/_289_GameOfLife.cpp
// Given the current state of the board, update the board to reflect its next state. #include <iostream> #include <vector> using namespace std; class Solution { public: int checkEightNeighbours(int n, int m, vector<vector<int>>& board, int i, int j) { int countOnes = 0; if (i - 1 >= 0 && j - 1 >...
ALGO
0.999994
7.449092
213ef49d-2238-441a-bd2a-270352eb60fc
nlesmerises/Super_Slicer
src/libigl/igl/rotate_vectors.cpp
#include "rotate_vectors.h" IGL_INLINE Eigen::MatrixXd igl::rotate_vectors( const Eigen::MatrixXd& V, const Eigen::VectorXd& A, const Eigen::MatrixXd& B1, const Eigen::MatrixXd& B2) { Eigen::MatrixXd RV(V.rows(),V.cols()); for (unsigne...
ALGO
0.998043
7.497553
730a7acc-62b7-404d-87df-98320d850a94
kimdy003/AlgorithmStudy
Beakjoon/1_Gold/17406_배열_돌리기4_G4.cpp
#include <iostream> #include <vector> #include <cstring> using namespace std; int n, m, k, ans = 987654321; int map[51][51] = {0}; vector<pair<pair<int, int>, int>> cycle; bool check[6]; pair<int, int> movdir[4] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; void all_print(){ cout << "\n"; for(int i=1; i<=n; i++){ ...
ALGO
0.999856
4.250575
2b5e6b0a-c319-481d-bf60-301908fa918b
aidankim27/cp
1455b.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #define PB push_back //1445B using namespace std; void solve(){ int n,ans=0; cin>>n; while(ans*(ans+1)<n*2) ans++; if(ans*(ans+1)/2==n+1){ ans++; } cout<<ans; } int main(){ int t; cin>>t; w...
ALGO
0.999775
4.736237
731a7885-0861-4173-9799-1053be637c2b
dgilman/burn
burn/Frameworks/Sources/MultiTag/mp4v2-src/libplatform/prog/option.cpp
#include "libplatform/impl.h" namespace mp4v2 { namespace platform { namespace prog { /////////////////////////////////////////////////////////////////////////////// #define GNU_COMPATIBLE #define REPLACE_GETOPT namespace { void warnx( const char* format, ... ) { va_list ap; va_start( ap, format...
TOOL
0.946031
4.308216
b0b2537d-50a5-4e26-a6dd-9fe5dad444b9
scathachcs/Cpp
_SCU_Algorithm_Design/Final/third.cpp
#include<iostream> using namespace std; int main(){ int n; cin >> n; int num[100]={0}; for(int i = 0;i < n; i++) cin>>num[i]; int pos = 0; //当前位置 int lens = 0; //当前位置可走长度 int lastfar = 0;//上次可走最远距离 int step = 0; //已走步数 if(n==1){ //当起始点即为目的地时 cout<<0; return...
ALGO
0.999993
3.147484
ceb4c301-5c34-46c0-b4dc-7458f424339e
ishandutta2007/codeforces
intothenight/normal/453/B.cpp
#include <bits/stdc++.h> using namespace std; struct number_theory{ int SZ; vector<int> lpf, prime; // least prime factor, primes, mobius function, totient function, number of multiples number_theory(int SZ): SZ(SZ), lpf(SZ + 1){ // O(SZ) lpf[0] = lpf[1] = numeric_limits<int>::max() / 2; for(auto i = 2; i <= SZ...
ALGO
0.999998
3.999154
0a623089-3569-43a9-abd0-76c3da716ffb
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3697_18.cpp
#include <bits/stdc++.h> using namespace std; const double eps = 1e-12; const double PI = acos(-1.0); const int N = 2010; struct Point { double x, y; Point(double x, double y) : x(x), y(y) {} Point() {} Point operator+(const Point &o) const { return Point(x + o.x, y + o.y); } Point operator-(const Point &o) c...
ALGO
0.99982
4.096203
2a8c95d5-2ba9-4923-a400-601f987e1550
miepstei/BayesianCode
C/dcprogs_mex/src/dcpLikelihood.cpp
#include "mex.h" #include <stdio.h> #include <vector> #include "likelihood.h" #include "dcpUtils.h" #include <iostream> #include "limits.h" #include "math.h" using namespace std; void mex_test(); void mexFunction( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] ) { /* params */ /* first is the ...
ALGO
0.997747
5.280869
c45e9a3f-0b44-45a1-863b-1811cfe04d19
WendyECUPL/LINUX-2019
161403218苏颖/Code/heap.cpp
#include <iostream> using namespace std; template<class T> class doubleHeap { public: doubleHeap( int _size, int _type // 1 : max heap 2 : min heap ); void extractTop(T &top); void deleteTop(); bool addElement(T _new_element); bool empty(); bool full(); void printHe...
ALGO
0.999727
4.283854
45b56547-8717-436a-8d2f-4bff07fdb11d
irfanghazi/tutorial
DS & Algo/Array/linearSearch.cpp
#include<iostream> using namespace std; bool searchNumber(int array[], int n, int key){ for(int i = 0; i < n; i++){ if(array[i] == key){ return 1; } } return 0; } int main(){ int array[5] = {1, 3 , 5, 6, 4}; int size = sizeof(array) / sizeof(int); cout << "Enter the...
ALGO
0.999651
4.253592
79b09252-3bad-4bb6-a2c0-d0ec692643f2
matthiascy/MoteurDeJeux
src/Engine/Thirdparty/bullet3/src/Bullet3OpenCL/BroadphaseCollision/b3GpuSapBroadphase.cpp
bool searchIncremental3dSapOnGpu = true; #include <limits.h> #include "b3GpuSapBroadphase.h" #include "Bullet3Common/b3Vector3.h" #include "Bullet3OpenCL/ParallelPrimitives/b3LauncherCL.h" #include "Bullet3OpenCL/ParallelPrimitives/b3PrefixScanFloat4CL.h" #include "Bullet3OpenCL/Initialize/b3OpenCLUtils.h" #include "...
ALGO
0.983892
3.740183
6ecea341-a7e2-470b-b830-8eff824e4b8e
yusifaliyevpro/Competitive-Programming
LeetCode/Medium/3075. Maximize Happiness of Selected Children.cpp
// 3075. Maximize Happiness of Selected Children // https://leetcode.com/problems/maximize-happiness-of-selected-children/ #include <iostream> #include <vector> using namespace std; class Solution { public: long long maximumHappinessSum(vector<int>& happiness, int k) { } };
ALGO
0.99987
5.110546
06a364f0-b224-40c0-a732-74bdfdd55cba
brunhild912/Flutter-Projects
Alarmora/alarmora_code/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.997294
6.76775
2e750acd-e901-4ad1-b6eb-62078a8a47b2
kentakom1213/kyopro
AlgoMethod/Knapsack/Q8.cpp
// 問題 8:最長共通部分列 (LCS) 問題 // ---------------------------------------- // 問題 // https://algo-method.com/tasks/314 // 復習になった // AC // ---------------------------------------- #include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; vector<vector<int>> dp(S.size()+1, vector<in...
ALGO
0.999995
5.785086
4c7b71cd-1ecb-49be-9a47-f8fb4f46f491
nobinov/image_resizer_server
include/boost_1_75_0/libs/yap/example/vector.cpp
#include <vector> #include <iostream> //[ vector_take_nth_xform struct take_nth { template <typename T> auto operator() (boost::yap::expr_tag<boost::yap::expr_kind::terminal>, std::vector<T> const & vec) { return boost::yap::make_terminal(vec[n]); } std::size_t n; }; //] // A sta...
TOOL
0.95368
6.644027
7365e61b-c3eb-46e5-8c24-1401ccb4f213
ishandutta2007/codeforces
allvik06/normal/1628/B.cpp
#include <iostream> #include <vector> #include <set> #include <chrono> #include <map> #include <algorithm> using namespace std; signed main() { if (1) { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); } int t; cin >> t; while (t--) { int n; ...
ALGO
0.999874
5.208307
989e2414-3d9f-4f80-9e4f-2a7d574c63f9
evangline/origin
lab2/vlsi/csrc/main.cpp
#include <DirectC.h> #include <stdio.h> #include <sys/stat.h> #include <fcntl.h> #include <stdint.h> #include <assert.h> #include <stdlib.h> #include "median.h" #define IMAGE_HEIGHT (128) #define IMAGE_WIDTH (128) extern "C" { static uint8_t inputImage[IMAGE_HEIGHT * IMAGE_WIDTH]; static uint8_t outputImage[IMAGE_H...
ALGO
0.995287
4.397352
78935552-880b-4f0c-b5a9-a3692d81a802
ahmedibrahim404/CompetitiveProgramming
Codeforces/1547G/main.cpp
#include <bits/stdc++.h> using namespace std; vector< vector<int> > adjList, comps;vector<vector<int>> dagList; vector<int> inStack, lowLink, dfn, comp; stack<int> stk; int ndfn, cntSrc, cntSnk; void tarjan(int node) { lowLink[node] = dfn[node] = ndfn++, inStack[node] = 1; stk.push(node); for(int i=0;i<adjList[no...
ALGO
0.999976
4.933722
7c9d3970-ca6e-41a2-ade7-66abf5cd800a
gavinloverqq/Algorithm
data Structure/p1886滑动窗口(单调队列)/main.cpp
#include <iostream> //#include <deque> #include <cstdio> using namespace std; struct Node{ int index,value; Node(){} Node(int i,int v):index(i),value(v){} }; int num[1000100]; Node qNode[1000010]; Node pNode[1000010]; int main() { int head = 0,tail = 0; int n,k; int id = 1; while (~scanf("%d...
ALGO
0.99995
3.091291
3a191d05-4a5b-44b8-9308-df01ef50f44e
MRwangmaomao/IMRobot
riki_line_follower/src/linedetect.cpp
/** MIT License Copyright (c) 2017 Sudarshan Raghunathan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, pu...
TOOL
0.945443
4.614129
70f4f4ac-40a4-4b1f-9546-ab12f8fb04c5
akrabulislam/UVA
657.cpp
#include <bits/stdc++.h> using namespace std; char s[52][52]; int cnt=0; int m,n; vector<int>res; int dx[]={1,-1,0,0}; int dy[]={0,0,1,-1}; bool valid(int i,int j){ if(i<0||i==n||j<0||j==m)return false; else return true; } void dfs1(int i,int j){ if(!valid(i,j)||s[i][j]!='X'){ return ; } ...
ALGO
0.999952
3.474098