uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c2e807c1-eef2-453c-adaa-1d2d33bf412e
rddoga/Aruco_from_scratch
aruco_3.1.15/Custom/aruco_lib/src/zmaxheap.cpp
#include "precomp.hpp" #include "zmaxheap.hpp" // 0 // 1 2 // 3 4 5 6 // 7 8 9 10 11 12 13 14 // // Children of node i: 2*i+1, 2*i+2 // Parent of node i: (i-1) / 2 // // Heap property: a parent is greater than (or equal to) its children. #define ...
ALGO
0.979344
5.850047
1f067eaa-5147-43b3-ac83-8345e78c1801
Erich8200/Impact_Blue-algorithm_practicing
任意进制转换模板.cpp
#include <iostream> #include <string> #include <vector> #include <memory.h> #include <math.h> #include <stdio.h> #include <string.h> #include <algorithm> using namespace std; int pow(int n,int power) { int ans = 1; for(int i = 1;i <= power;i++) ans *= n; return ans; } int toDec(const string& s,int type) { int ...
ALGO
0.993967
3.291606
84662196-0e20-4c50-8016-08be09c95c1d
HEltim7/cpcode
NowCoder/暑假/2023/contest7/Beautiful_Sequence.cpp
#include <algorithm> #include <array> #include <cassert> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; // #define ONLINE_JUDGE #ifndef ONLINE_JUDGE #include <heltim7/debug> #else #de...
ALGO
0.999822
4.106379
9ba26d27-8803-4db5-8340-9999e0f07b71
moondemon68/cp
Codeforces/PastContests/1221/1221A.cpp
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define mp make_pair #define MOD 1000000007 #define pii pair<int,int> #define LL long long using namespace std; int main () { //clock_t start = clock(); ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ...
ALGO
0.999894
4.165845
71e133b2-f9ff-4e0e-b8c0-45231d49db47
ahn254/chromium
src/third_party/libc++/src/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less, // class Proj = identity> // requires sortable<I, Comp, Proj> // constexpr ranges::prev_permutation_result<I> // ranges::prev_permutation(I first, S last, Comp...
TEST
0.961367
7.860847
690b85ff-03a2-4666-b8ff-339a3435b254
proton-whyred/android_bionic
libc/bionic/libc_init_common.cpp
#include "libc_init_common.h" #include "heap_tagging.h" #include <elf.h> #include <errno.h> #include <fcntl.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/auxv.h> #include <sys/personality.h> #include <sys/time.h> #include <unistd.h> #include <async...
TOOL
0.878802
7.573693
e2919e7f-6af7-4139-84f5-280aeee1fe21
ishandutta2007/codeforces
ronnie007/normal/1391/D.cpp
#include<bits/stdc++.h> using namespace std ; #define MAXN 1000007 int n , m ; vector < string > a ; int dp[ MAXN ][ 9 ] ; int cost ( int col , int mask ) { int ans = 0 ; for ( int i = 0 ; i < n ; ++ i ) { if ( a[ i ][ col ] == '0' && ( mask & (1<<i) ) > 0 ) { ++ ans ; } if ( a[ i ][ col ] =...
ALGO
0.999987
4.317029
dfcbcd20-f851-4cf0-8a64-559d2f6cd9a5
hima-97435/DSA
day_20.cpp
/* Name -- Himanshu Pokhriyal Date -- 14 April , 2024 Version -- C++ 17 Question -1 Instagram Link - https://www.codechef.com/practice/course/basic-programming-concepts/DIFF500/problems/INSTAGRAM #include <bits/stdc++.h> using namespace std; int main() { // your code goes here int t; cin>>t; while(t--) { in...
ALGO
0.994146
4.283446
35c556b4-aa69-496c-80c8-903359f64e15
anishmehta24/cp
C_Concatenation_of_Arrays.cpp
#include <iostream> #include <vector> #include <map> #include <tuple> #include <algorithm> #define ll long long int using namespace std; bool cmp(tuple<ll, ll, ll> a, tuple<ll, ll, ll> b) { return get<0>(a) < get<0>(b); } int main() { int t; cin >> t; while (t--) { ll n; cin >> n;...
ALGO
0.999926
4.208782
4cc94d4c-44bd-4f36-924d-be695f388b0b
GRCMeireles/My-first-try
Exercicio4.cpp
#include <iostream> #include <math.h> using namespace std; int main() { float A, B, C, X1, X2, D; //A<>0 //(B*B-4*A*C)>0 cout<<("Valor de A:"); cin>>A; cout<<("Valor de B:"); cin>>B; cout<<("Valor de C:"); cin>>C; D = B*B-4*A*C; X1 = (-B + sqrt(D)) / (2*A); X2 = (-B - sqr...
ALGO
0.999439
3.394969
6903984c-4b6c-4fa3-badd-4e9b55cffa5b
innogames/android-ndk
sources/cxx-stl/llvm-libc++/libcxx/test/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of.pass.cpp
// <algorithm> // template<InputIterator Iter1, ForwardIterator Iter2> // requires HasEqualTo<Iter1::value_type, Iter2::value_type> // Iter1 // find_first_of(Iter1 first1, Iter1 last1, Iter2 first2, Iter2 last2); #include <algorithm> #include <cassert> #include "test_iterators.h" int main() { int ia[] = {...
TEST
0.992419
6.310872
8846ab67-9d27-4489-993a-246d39f3bff8
davidequattrocchi10/Prof_AI_C_C_plus_plus
Namespaces/main.cpp
#include <bits/stdc++.h> #include <iomanip> // Per controllare il formato dell'output #include <iostream> #include <cmath> /* Importa la libreria stdc++ Crea un namespace chiamato Geometria in cui definire una struct Punto_cartesiano contente una cordinata x ed una cordinata y (entrambi float) Definisci all'interno de...
ALGO
0.925398
5.080909
45a0729f-6fdf-4d1b-9125-5393dff88560
TamuraToshiki/EleckTrick
DX11Game/Source/ElecTrick/CCollision2D.cpp
//================================================================== // collision.h // RW // //================================================================== // author : AT12A 05 FWV //================================================================== // J // // 2020/06/24 RW // //==========================...
ALGO
0.994356
5.703231
7073ba73-fafc-49b2-a581-4ab9efe9b4af
pixeldustproject-o/android_external_libcxx
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/compare.pass.cpp
// <string> // template<> struct char_traits<wchar_t> // static int compare(const char_type* s1, const char_type* s2, size_t n); // constexpr in C++17 #include <string> #include <cassert> #include "test_macros.h" #if TEST_STD_VER > 14 constexpr bool test_constexpr() { return std::char_traits<wchar_t>::compare(...
TEST
0.933421
6.058383
7956f50e-5874-4670-91da-e735f13f78cd
ishandutta2007/codeforces
whzzt/normal/1097/A.cpp
#pragma optimize("unroll-loops,no-stack-protector") #include<bits/stdc++.h> #define pb push_back #define fi first #define se second #define debug(...) fprintf(stderr,__VA_ARGS__) #define ALL(a) a.begin(),a.end() #define lowbit(x) ((x)&-(x)) #define dec minus_down using namespace std; typedef unsigned long long u64; typ...
ALGO
0.999951
3.102199
b7bd9c49-a643-4500-a9f5-7537484fc310
karannagpal/cpp-programming
Level 4 - Advanced Programming Concepts/uca 107.cpp
#include<iostream> using namespace std; int main() { int i = 0, limit = 10, a, b; a = 0; b = 1; while(i <= limit) { // perfect when limit is even cout << a << endl << b << endl; a = a + b; b = a + b; i = i + 2; } if(limit % 2 != 0) { // fo...
ALGO
0.999715
3.478301
7d816190-68b1-41ff-868b-80b755d84dd5
SayandeepB9/Codeforces
1957E_carousel_of_combinations.cpp
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #include <bits/stdc++.h> #define ll long long #define pb push_back #define int ll #define mod 998244353 #define mod1 1000000007 #define inf 1e9+1 #define fr(i, a, b) for (ll i = a; i < b; i++) #define rev(i, a, b) for (ll i = a; i ...
ALGO
0.999817
5.606244
f257c43f-d521-40fa-9a35-5b38fc352308
st122869/2023-cpp-autumn
2023.09.21-2/Project6/task6.cpp
#include <iostream> int main() { int k = 0; int m = 0; int n = 0; int a = 0; std::cin >> k; std::cin >> m; std::cin >> n; if (n <= k) { a = 2 * m; } else { if (n * 2 % k == 0) { a = 2 * n / k * m; } else { a = 2 * n / k * m + m; } } std::cout << a; return EXIT_SUCCESS; }
ALGO
0.999848
3.304374
7dccc731-b3e7-4595-a503-7b487de91a16
Shahriar-Seam/Programming
Recursion/YouKnowWho/9.cpp
#include <bits/stdc++.h> using namespace std; int is_palindrome(vector <int> &v, int i, int n) { if (i == n) { return 1; } else { return (v[i] == v[n - i - 1]) && is_palindrome(v, i + 1, n); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin...
ALGO
0.999843
4.881294
1473a27a-80c0-4de3-94ae-76740e2d4aa9
srama2512/cs393r-latest
core/common/fields/MiamiField.cpp
#include <common/Field.h> // With the exception of the ball radius, the following measurements are taken // from the SPL rules. See Section 1 of the official rulebook: // http://www.tzi.de/spl/pub/Website/Downloads/Rules2015.pdf const float BALL_RADIUS = 51; const float FIELD_X = 8960; // Rules: Item ...
CONFIG
0.858542
4.346596
441f2b4c-39f9-40a3-a644-eb8a1e933717
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_6905_23.cpp
#include <bits/stdc++.h> using namespace std; int main() { string Aux, Text; bool Amplify = false, Analyze, First = true, InsertSpace = false; while (getline(cin, Aux, '\n')) { Amplify = false; Analyze = false; for (int i = 0; i < Aux.length() && Analyze == false; i++) { if (Aux[i] == ' ') ...
ALGO
0.998524
4.168619
999d2dd3-747a-4354-b7cd-07544deb466f
rizaledc/Praktikum-Struktur-Data-Assigment-Modul-9
Modul 9/unguided2.cpp
#include <iostream> // Deklarasi kedua fungsi terlebih dahulu long long faktorialGenap(int n); long long faktorialGanjil(int n); // Fungsi untuk menghitung faktorial bilangan genap long long faktorialGenap(int n) { if (n == 0) return 1; // basis rekursi else return n * faktorialGanjil(n - 1);...
ALGO
0.999943
6.36412
0abc1b90-dfc4-4af9-999c-929eb3516c75
ProgrammerPrashantt/C-code
linklist/insertinglinki.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; // Node(){ // this->data = 0; // this-> next = NULL; // } Node(int data) { this->data = data; this->next = NULL; } }; // insert at head void insertAtHead(Node *&head, ...
ALGO
0.99984
4.686138
aa00cf8e-0bd3-4b88-9637-0a1d8bc165a8
Luka-D03/Projects
3. letnik/C++/struktura/Ucenec.cpp
/* Deklariramo strukturo tekmovalec: - ime (niz) - priimek (niz) - ocene na maturi */ #include <iostream> using namespace std; int N = 30; string predmeti[4] = {"matka", "slova", "teorija", "zmazek"}; struct ucenec { string ime; string priimek; int ocene[4];//4 ocene na maturi }; void vnos(ucenec tabela[], int N)...
TOOL
0.969658
3.943015
2504e26a-72bb-49bf-b4e8-6fa18bb393d3
srkovela/btech-project
src/microsim/MSEdge.cpp
/****************************************************************************/ /// @file MSEdge.cpp /// @author Christian Roessel /// @author Jakob Erdmann /// @author Christoph Sommer /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch /// @author Sascha Krieg /// @date Tue...
TOOL
0.914168
6.958946
f1951669-f9f3-480d-ba8c-58616bf5a786
AyushPandey003/Dsa
fathersDay/Dsa/Day 24 (129. Sum Root to Leaf Numbers)/Solution.cpp
#include <iostream> struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; class Solution { public: int sumNumbers(TreeNode* root) { return dfs(root, 0); } private: int dfs(TreeNode* node, int current_sum) { ...
ALGO
0.999967
6.860262
0cf9db82-d204-468a-b79d-d04f0f673af4
kenreurisondca/PA_20191
Listas/ListaDEncadeado.cpp
#ifndef LISTADENCADEADO_CPP #define LISTADENCADEADO_CPP #include "NodeDuplo.cpp" #include <iostream> using namespace std; class ListaDEncadeado { private: NodeDuplo *head; public: ListaDEncadeado(){} ListaDEncadeado(NodeDuplo*); ListaDEncadeado(int); void addInfo(int); void remove(int); NodeDuplo* bus...
ALGO
0.991145
4.463044
a89a16e5-4e82-488c-aa15-afc796ff8d39
dgcnz/competitive-programming
atcoder/abc182_c-to-3.cpp
/** @file * @date 2021-01-23 * @url https://atcoder.jp/contests/abc182/tasks/abc182_c * @tags implementation, math * @status AC * @score 0 * @difficulty 2 * @editorial no * @reading_time 1 * @thinking_time ...
ALGO
0.99989
5.173718
f79ad0c5-1803-4591-805b-ab9d23638f9e
Mferrill/BotCore
src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
/* ScriptData SDName: Boss_High_King_Maulgar SD%Complete: 90 SDComment: Correct timers, after whirlwind melee attack bug, prayer of healing SDCategory: Gruul's Lair EndScriptData */ #include "ScriptPCH.h" #include "gruuls_lair.h" #define SAY_AGGRO -1565000 #define SAY_ENRAGE -1565001 #defin...
ALGO
0.955877
4.217587
96516a20-45b8-4f69-9362-8a88ebb67a70
deathblades447/Lesson57RevisionSolution
Task02/logic.cpp
// [The Power of Four] // Точная степень двойки // // Необходимо разработать рекурсивную функцию, которая проверяет, // является ли заданное пользователем число точной степенью четвёрки // или нет. // // Числа 1, 4, 16, 64, … – являются числами точной степени четвёрки, // а вот числа 2, 6, 8, 10, 12, 14, 18, 20, 22,...
ALGO
0.990511
4.327265
856f7682-43b3-44ea-adbe-6a915fa6797b
shahriar-ruet14/Practice-Problem
find stl.cpp
#include <iostream> #include <string> using namespace std; int main() { string str = "geeksforgeeks a computer science"; string str1 = "geeks"; // Find first occurrence of "geeks" size_t found = str.find(str1); if (found != string::npos) cout << "First occurrence is " << found << endl; ...
ALGO
0.965371
4.430566
ff170f84-c24a-443e-a04a-97533b882303
anku601/-CrackYourPlacement
findDuplicates.cpp
#include<iostream> #include<map> #include<vector> using namespace std; class Solution { public: int findDuplicate(vector<int>& nums) { unordered_map<int, int> map; for(int i=0; i<nums.size(); i++) { if(map.find(nums[i]) != map.end()) { return nums[i]; } else...
ALGO
0.999462
5.250511
61210cf5-550b-4e54-bd30-cdedb47bbe83
collisionBox/3DGame
3DGame甲/Collision.cpp
#include "Collision.h" #include "SystemConstant.h" //----------------------------------------------------------------------------- // @brief RXgN^ //----------------------------------------------------------------------------- LineSegment::LineSegment() :localStart() ,localEnd() ,worldStart() ,worldEnd() { } //---...
ALGO
0.988488
4.140148
d188c6f2-23bf-4585-9611-c5de4a2726e0
mohamadRaafatKamel/Data-Structures-and-Algorithms--University-of-California-San-Diego--Coursera
Course 1/week4_divide_and_conquer/5_organizing_a_lottery/points_and_segments.cpp
#include <iostream> #include <vector> #include <utility> #include <algorithm> #include <ctime> #include <cstdlib> using std::pair; using namespace std; typedef pair<int, int> SegmentPair; void fast_count_segments_2(vector<SegmentPair> &segments, vector<int> &points, vector<int> &cnt) { std::sort( segments.begin(),...
ALGO
0.99997
4.752631
d6642e29-1438-4598-b8ee-3ac68f1c83fb
KayG2310/leetcode-problems
hard/432. All o one data structure.cpp
struct Node{ Node* next; Node* prev; int freq; unordered_set<string>words; Node(int i, string s){ freq = i; words.insert(s); } Node(){ next = NULL; prev = NULL; freq = -1; } }; class AllOne { unordered_map<string, int>mpp1; map<int, Node*>mpp2; No...
ALGO
0.999969
5.979097
f0d02b88-b956-4b8f-8e7d-c63bc855248d
davahardik/stereo-vision
SGBMBINARY/main.cpp
#include "opencv2/stereo.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include <stdio.h> #include <string.h> #include <iostream> #include <opencv2/calib3d/calib3d.hpp> #include <boost/thread/thread.hpp> #include <pcl/common/common_headers.h> #include<pcl/filters/bilateral.h> #include<pcl/filters/...
ALGO
0.979891
5.211928
9d0afd74-bb77-4353-a50a-74847ce13b11
yasoobkamili/OOPS
OOP_in_C++_by_Robert_Lafore/Chapter_3/Exercise_1/1_Exercise_5.cpp
// Use for loops to construct a program that displays a pyramid of Xs on the screen. The // pyramid should look like this // except that it should be 20 lines high, instead of the 5 lines shown here. One way to do // this is to nest two inner loops, one to print spaces and one to print Xs, inside an outer // loop that ...
TOOL
0.99601
3.359955
eed368e9-6332-4cef-93f6-9fff11812f19
jooa7878/Algorithm
Programmers/Level 1/가운데 글자 가져오기.cpp
#include <string> #include <vector> using namespace std; string solution(string s) { string answer = ""; if(s.size() %2 != 0 ) answer = s[(s.size()-1)/2]; else{ answer = s[(s.size()-1)/2]; answer += (s[s.size()/2]); } return answer; }
ALGO
0.999873
5.740137
6c4c0cb4-3447-475e-b5b6-928f4360d3ef
Kartikksaxena/Ccodechef
codechef/2021Nov/03HillSequenceR8.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n,x; bool flag=true; cin>>n; map<int,int> mp; vector<int> a; for(int i=0;i<n;i++) { cin>>x; mp[x]++; if(mp[x]>2) ...
ALGO
0.999963
4.247142
9f586b4e-dc1a-4fa1-8ac0-5d7dc1027e00
chitresh178779/codexpress-2.0
day31.cpp
#include <iostream> #include <cctype> #include <string> using namespace std; // Function to check if a phrase is a palindrome bool isPalindrome(const string& s) { int left = 0, right = s.length() - 1; while (left < right) { // Move left pointer to the next alphanumeric character while (left < r...
ALGO
0.998468
6.363839
58e9445f-a1a6-4028-8727-ed5e0b04780b
SparshAgrawal1/Leetcode
Maximum product subset of an array - GFG/maximum-product-subset-of-an-array.cpp
// { Driver Code Starts /* Driver program to test above function */ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: long long int findMaxProduct(vector<int>&a, int n){ //Write your code here long long int ans=1; ...
ALGO
0.999955
5.743164
1089200d-0fe5-4009-884e-79eb2a6beb36
iCoder0020/Competitive-Coding
CF-old/635/A.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int T; cin>>T; while(T--) { int a,b,c,d; cin>>a>>b>>c>>d; cout<<a<<" "<<c<<" "<<c<<endl; } return 0; }
ALGO
0.997907
3.497692
fd49944a-78dc-4ba9-9b05-225bb0bde603
Sakshat1309/C-Programs
revstack.cpp
#include<iostream> #include<stack> using namespace std; int main(){ int ele; stack <int> st; stack <int> a; st.push(1); st.push(2); st.push(3); st.push(4); st.push(5); cout<<"original stack is"<<endl; while(st.empty()!=true){ cout<<st.top()<<"\t"; st.pop(); } cout<<endl; s...
ALGO
0.999597
4.327928
0a4bb71f-83ef-4f6c-94c0-d6bf5679bcbe
chunrapeepat/learn-algorithm
solutions/1730-MSLCM.cpp
#include <iostream> #include <bitset> #include <vector> #include <cmath> using namespace std; #define MAXN 20000002 // 2 -> 1 2 = 3 // 3 -> 1 3 = 4 // 4 -> 1 2 4 = 7 // 5 -> 1 5 = 6 // 6 -> 1 2 3 6 = 12 // 7 -> 1 7 = 8 // 8 -> 1 2 4 8 = 15 // 9 -> 1 3 9 = 13 // 10 -> 1 2 5 10 = 18 // 3 + 4 + 7 + 6 + 12 + 8 + 15 + 13...
ALGO
0.999617
4.909291
672efb39-734e-4677-805a-56895dbc315e
Jaspreet-10/LeetCode
0739-daily-temperatures/0739-daily-temperatures.cpp
class Solution { public: vector<int> dailyTemperatures(vector<int>& temperatures) { stack<int>st; int n = temperatures.size(); vector<int>v(n, 0); for(int i = 0 ; i < n ; ++i){ while(!st.empty() && temperatures[st.top()]<temperatures[i]){ v[st.top()] = i -...
ALGO
0.999916
6.326084
02d79c6c-36b5-4cf1-a8cc-ae77da35cf3b
sdj3701/hongData
hongData/HongLabDataStructures-main/VSCode/Ex0801_Heap/Ex0801_Heap.cpp
#include <iostream> #include "../shared/MaxHeap.h" using namespace std; int main() { // 개념 설명은 트리인데 구현은 배열 (연결 표현법으로도 구현 가능) // 완전 이진 트리 상태를 유지 // 부모 노드의 값이 두 자식 노드의 값 이상이어야 한다. // 자식들끼리는 값의 크기 순서 무관. <- 느슨한 정렬 상태 // 중복된 값을 여러개 넣을 수 있음 // 배열 사용: 0번은 비워둠 // 부모 인덱스 * 2 = 왼쪽 자식 인덱스 // 부모 인덱스 * 2 + 1 = 오른쪽 자식...
ALGO
0.998724
4.972849
c3a8b8fc-dcd5-438e-a898-fc5cb30e05ae
iamsile/ACM
Job!Job!Job!.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; struct info { int t,v; bool operator <(const info &a)const { return v > a.v; } }w[100011]; priority_queue <info> q; int n,m; bool cmp(info a,info b) { return a.t < b.t; } int main() { while (scanf("%d%d",&n,&m...
ALGO
0.999933
3.946003
7128ed6e-789e-4dbf-a4d8-6add7f776f55
TheAhmadSharif/C_Plus_Arena
Algorithm/bubble_sort.cpp
#include <iostream> using namespace std; int main() { int i, j, temp; int given_array[3] = {2,4,1}; for(i = 0; i < 3; i++) { for(j = 0; j < 3-i-1; j++) { if(given_array[j] > given_array[j+1]) { temp = given_array[j]; given_array[j] = given_array[j + 1]; given_array[j + 1] = temp; } } } fo...
ALGO
0.99991
3.971223
23feb8a3-7ca5-4040-a73c-bebbb3f5742f
Aks9111hat/LeetCode
415-add-strings/415-add-strings.cpp
class Solution { public: string addStrings(string num1, string num2) { string ans; int mark = 0; while(num2.length() < num1.length()) num2 = '0'+num2; while(num1.length() < num2.length()) num1 = '0'+num1; for(int i=num1.length()-1; i>=0; i--){ in...
ALGO
0.999981
6.463416
5ef1f67b-5367-48c7-a80f-e98d188bbc89
watchpoints/daily_read_coding
oceanbase-master/src/storage/ob_multiple_scan_merge_impl.cpp
#include "ob_multiple_scan_merge_impl.h" #include "share/ob_get_compat_mode.h" using namespace oceanbase::storage; using namespace oceanbase::common; using namespace oceanbase::share; ObMultipleScanMergeImpl::ObMultipleScanMergeImpl() : tree_cmp_(), loser_tree_(tree_cmp_), iter_del_row_(false), consumer_(), try_p...
ALGO
0.943507
4.250884
ab5793a2-704f-4b7e-a400-3eddf1916d5c
ishandutta2007/codeforces
siberian/normal/782/B.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double int n; vector<double> x, v; void read() { cin >> n; x.resize(n); for (auto &i : x) cin >> i; v.resize(n); for (auto &i : v) cin >> i; } bool check(double t) { double l = x[0] - t * v[0], r = x[0] + t * v[0]; for ...
ALGO
0.999986
4.697985
60fa4113-5aba-4263-a1e9-2d31c34df7a9
neal2018/oj_env
icpc/practice_2/b.cpp
#include <bits/stdc++.h> using ll = long long; using namespace std; using vi = vector<int>; int computeS(vi& results) { int n = results.size()/2; int curDiff = 0; int oneLeft = n; int twoLeft = n; int a = 0; int b = 0; int s = 0; for(int i = 0; i < 2*n; i++) { if(i % 2) { curDiff -= results[...
ALGO
0.99994
3.40992
5598b129-8a26-422b-9271-9f5792103a82
KenAdeniji/WordEngineering
cpp/Practical C++/Chapter16ExploringNamespaces/PublisherQuePrentice-HallIndia.TitlePracticalC++.AuthorRobMcGregor.ChapterNumber16.ChapterTitleExploringNamespaces.Listing16.3UsingDirectives.cpp
#include <algorithm> #include <iostream> #include <string> using namespace std; /* 2016-10-04 cl /clr PublisherQuePrentice-HallIndia.TitlePracticalC++.AuthorRobMcGregor.ChapterNumber16.ChapterTitleExploringNamespaces.Listing16.3UsingDirectives.cpp 2016-10-04 http://stackoverflow.com/questions/313970/how-to-convert-...
ALGO
0.866807
6.214707
f42ee0cc-9bae-43ae-a600-1815f155e6d9
archermind/MTK_X20_BASE_AOSP
frameworks/av/media/libstagefright/codecs/amrnb/enc/src/l_negate.cpp
/* ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Inputs: L_var1 = 32 bit long signed integer (Word32) whose value falls in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. Local Stores/Buffers/Pointers Needed: None Global Stores/...
TOOL
0.992698
5.632393
34ea05e8-b01a-41c9-90c3-65d5ea336656
robtai29/cpp_practice
leetcode/1101_the_earliest_moment_when_everyone_become_friends.cpp
/****************************************************************************** https://leetcode.com/problems/the-earliest-moment-when-everyone-become-friends/ 2.7.22 *******************************************************************************/ class DisjointSet{ private: int numSets; vector<int> root; ...
ALGO
0.999922
6.180291
5b1d7af3-0be6-4cda-a856-bd27a1fd163e
ishandutta2007/codeforces
bluediamond/normal/1271/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main() { ios::sync_with_stdio(0); cin.tie(0); ll a, b, c, d, e, f, t, ans = 0; cin >> a >> b >> c >> d >> e >> f; if (f > e) { t = min(min(b, c), d); b -= t; c -= t; ...
ALGO
0.999852
3.670435
109fc0d3-3dce-4978-9d7e-a8851e4f6b70
ishandutta2007/codeforces
lichenkoh/normal/713/C.cpp
#include <bits/stdc++.h> #include <assert.h> using namespace std; typedef long long ll; typedef long double ld; #define PB push_back #define MP make_pair #define MOD 1000000007LL #define endl "\n" const ll UNDEF = -1; const ll INF=1e18; template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, tr...
ALGO
0.999959
3.52447
650665d1-4832-4f66-bdb2-511aca488a4f
AhmedHanySaber/chat_app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
5e0ff936-c8fa-4b41-8a01-093cbc34ec49
bhupalisarma/Problems
pointer2asArray.cpp
// print array using pointer #include <iostream> using namespace std; int main(){ int arr[]={10,20,30}; int *ptr=arr; for(int i=0;i<3;i++){ cout<<*ptr<<endl; ptr++; } return 0; }
ALGO
0.988376
3.762791
a6e98955-d10e-4dd0-a3b6-936e2c11188e
HamedElgizery/CompetitiveProgramming
SPOJ/CAPCITY.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5+10; int n, m; int st[N], stSize, ID[N], lowLink[N], id, outD[N]; bool inSt[N]; vector<int> adjF[N]; vector<vector<int>> comps; int tarjan(int node) { ID[node] = lowLink[node] = id++; st[stSize++] = node; inSt[node] = 1; for (au...
ALGO
0.999857
4.703319
6d8701c3-e088-4029-949e-fbe2e699d55e
ADITYA-0208/Leetcode-er
1524-number-of-sub-arrays-with-odd-sum/1524-number-of-sub-arrays-with-odd-sum.cpp
class Solution { public: int numOfSubarrays(vector<int>& arr) { int ocount = 0, ecount = 1; int sum = 0, result = 0, mod = 1e9 + 7; for (int num : arr) { sum +=num; if (sum % 2 == 0) { result=(result+ocount)%mod; ecount++; ...
ALGO
0.999992
5.784559
18e0ea36-5189-4f31-9b8e-655280d32849
lukesf/arduino-fencing-scorer
tetris-neopix.cpp
/* Original Author: Jae Yeong Bae UBC ECE jocker.tistory.com Date: Jan.18.2013 File: Tetris v2 Changelog: V3: Luke F: Adapted for Color NeoPix v2: displays score at gameover Purpose: killing time.. + for fun Circuits+Pins: Led Matrix: ...
TOOL
0.86127
5.411025
8ee330d7-8e20-418a-8d6c-454173ad5de7
magicmoo/codeforces
#748div3/A.cpp
#include<bits/stdc++.h> using namespace std; #define CAS int CASE; \ cin>>CASE; \ while(CASE--) #define YON if(flag) cout<<"YES\n"; \ else cout<<"NO\n"; #define Rep(i,x,y) for(int i=(x);i<=(y);i++) #define rep(i,x,y) for(int i=(x);i<(y);i++) #define Dep(i,x,y) for(int i=(x);i>=(y);i...
ALGO
0.999858
3.831548
6005feb1-55d1-483a-9c1b-e44e418df92e
HusseinYoussef/Interview-Preparation
leetcode/Medium/Triangle.cpp
#include <vector> #include <cstring> using namespace std; int n; int dp[205][205]; int solve(vector<vector<int>>& triangle, int row, int idx) { if(row == n-1) return triangle[row][idx]; int &ret = dp[row][idx]; if(~ret) return ret; return ret = min(solve(triangle, row+1, idx), solve(...
ALGO
0.999964
5.733511
5c5bdacc-f848-4c6d-9042-b977b4e71b72
JaumeMurciano/Advent_of_Code_2024
day12/day12.cpp
#include <sstream> #include <iostream> #include <vector> #include <algorithm> #include <array> #include <string> #include <fstream> #include <set> struct Point { int32_t row{}; int32_t column{}; Point operator+(const Point& otherPoint)const { return Point{ row + otherPoint.row,column + otherPoint.column }; } Poin...
ALGO
0.99896
5.124246
b8656825-9efa-496b-8cbd-b0ee3223fa20
bdsadeq/uva-problem-solutions
Accepted (386)/V-101 (19)/10110.cpp
//Light, more light (#10110) //Sadeq #include<stdio.h> #include<math.h> int main() { long long n,x,temp;; while(1) { scanf("%lld",&n); if(n==0) break; x=sqrt(n); temp=x*x; if(n==temp) printf("yes\n"); else printf("no\n"); } return 0; }
ALGO
0.999813
3.687359
c751bd5a-2831-4810-943e-3a987f885334
1906shra/Data-Structure-and-Algorithm-Rivision--in-c---python
basicprograming/c++/hollowrectangle.cpp
//hollow rectangle #include<iostream> using namespace std; int main () { int row,col; cin>>row>>col; for(int i=1;i<=row;i++) { for(int j=1;j<=col;j++) { if(i==1 || i==row) { cout<<"*"; } else if(j==1 || j==col) {...
ALGO
0.999856
3.491929
9612847d-74f1-46d7-9238-47c47456ca71
marcogroot/advent_of_code_2024_cpp
9_1.cpp
#include "util.h" #include <algorithm> #include <iostream> #include <set> #include <sstream> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; int main() { long long answer = 0; vector<string> input = read_strings("9"); int len = input[0].size(); int i...
ALGO
0.999845
3.593812
97b8fb20-b7a8-4ae3-b7eb-8360f1227334
Ujjwalmittal1907/data-structure-and-algorithm
c++/e sortring/2bubblesort.cpp
#include<iostream> using namespace std; void bubblesort(int arr[], int size){ for(int i=1;i<size;i++){ for(int j=0; j<size-i;j++){ if (arr[j]>arr[j+1]){ swap(arr[j],arr[j+1]); } } } } int printarray(int arr[],int size){ for(int i=0;i<size;i++){ cout << arr[i] << " "; } } int main() { ...
ALGO
0.999717
4.208316
f646f37e-d84a-4e7c-b300-04195739f1ef
Aniketpatade/mcapract
pract1.cpp
#include <iostream> using namespace std; class Complex { private: double real; double imag; public: // Default constructor Complex() : real(0), imag(0) {} // Parameterized constructor (optional, for initialization) Complex(double r, double i) : real(r), imag(i) {} // Overload + operator ...
ALGO
0.85738
5.857702
15b74acb-b908-4d7c-aa74-79e8d3dc7d28
Dhanush0369/CP_Practice
B_Position_in_Fraction.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long // shorthand for long long #define pb push_back // shorthand for push_back #define mp make_pair // shorthand for make_pair #define all(v) v.begin(), v.end() // shorthand for range all elemen...
ALGO
0.999968
4.245449
cb05450c-0123-43c7-a5b2-498058661418
Palak-Bhandari/College
6. DAA/Huffman.cpp
#include <iostream> #include <queue> #include <unordered_map> using namespace std; struct HuffmanNode { char character; int frequency; HuffmanNode *left, *right; HuffmanNode(char character, int frequency) : character(character), frequency(frequency), left(nullptr), right(nullptr) {} }; struct Co...
ALGO
0.999995
5.959374
0d817466-8904-44cc-aeef-ac8834563a73
robinsinghpatiyal/CppCodes
Misc/way_too_long_words.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n, len; char c[100]; cin>>n; for(int i =0; i<n; i++){ cin>>c; len = strlen(c); if(len<=10) cout<<c<<endl; else cout<<c[0]<<len-2<<c[len-1]<<endl; } }
ALGO
0.99988
3.552327
333303cb-18d8-41b8-be5f-d919d405d765
ishandutta2007/codeforces
yokozuna57/normal/1280/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; const ll MOD = 1000000007; #define fr first #define sc second ll n; vector<P> G[600010]; ll siz[600010]; ll ret_A,ret_B; ll dfs(ll v,ll d,ll p){ siz[v] = 1; for(int i = 0 ; i < G[v].size() ; i ++){ if(G[v][i].fr == p)cont...
ALGO
0.999751
3.880816
87989780-65d0-400f-9752-d4fac196f622
rafsaniShazid/Numerical_Method
Newton's_forward_interpolation.cpp
#include <bits/stdc++.h> typedef long long ll; #define forr(i, j, k) for (ll i = j; i < k; i++) using namespace std; // Function to calculate factorial double factorial(int n) { double fact = 1.0; forr(i, 2, n + 1) { fact *= i; } return fact; } void newtonForward(int x[], double y[][10], int n...
ALGO
0.999966
4.787783
cd53b09e-d080-4c2f-84e9-a06baf4137c9
dandan94/OpenGLTest
finalOpenGL/HelloGLFW/lib/boost_1_59_0/libs/sort/example/wstringsample.cpp
// See http://www.boost.org/libs/sort for library home page. #include <boost/sort/spreadsort/string_sort.hpp> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <vector> #include <iostream> #include <fstream> #include <string> using std::wstring; using namespace boost::sort::spread...
ALGO
0.996293
4.643817
25e40a6d-051b-4c7f-b6d1-e0d3cafb00c4
iwts/data-structure
ring-linked-list.cpp
/* 基于有环链表的一些问题,整体还是比较简单的。为了描述方便,其实重复了很多代码。 只要我们添加两个指针:入环结点、相遇点。那么代码就能化简很多,这里就不再写了。 配合个人博客食用更佳: https://blog.csdn.net/iwts_24/article/details/83421853 */ #include<iostream> using namespace std; struct Node { int val; struct Node *next; }head,a,b,c,d,e,f; // 比较简单明了地创建链表 void create_list() { a.val = 1; ...
ALGO
0.999698
4.109257
fced27bf-cd34-4103-ab20-d9a25bec53d6
pratham0203/450_DSA
subarraywithsumk.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int arr[]={2,2,3}; int n = sizeof(arr)/sizeof(int); int m = 5; int ans = 0; int dp[n+1][m+1]; for(int i=1;i<=m;i++){ dp[0][i] = 0; } for(int i=0;i<=n;i++){ dp[i][0] = 1; } for(int i=1;i<=n;i++){ for...
ALGO
0.999937
3.270973
e85cb462-2f45-44ae-a98e-a52d6de4a2a3
Jackiechanfans/Variantion-of-zipper-codes
Source/diag_zipper.cpp
#include "diag_zipper.h" #include "Stdafx.h" Zipper_diag::Zipper_diag() { } Zipper_diag::~Zipper_diag() { } void Zipper_diag::end_zipper_simulator() { for (int i = 0; i < extended_buffer_len; i++) delete[] status[i]; delete[] status; for (int i = 0; i < extended_buffer_len; i++) { for (int j = 0; j < D; j++)...
ALGO
0.972854
3.464551
81a7238c-9616-48e3-bd30-0548f5b68d6f
ishandutta2007/codeforces
andrew/normal/1750/B.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define fi first #define se second #define p_b push_back #define pll pair<ll,ll> #define pii pair<int,int> #define m_p make_pair #define all(x) x.begin(),x.end() #define sqr(x) (x)*(x) #define pw(x) (1ll << (x)) #define sz(x) (int)x.size() #define fout(...
ALGO
0.999911
4.432668
d340929b-5d3e-4062-8db0-814bf0140863
DikshantBadawadagi/DSA
maxiProdSub.cpp
class Solution { public: int maxProduct(vector<int>& nums) { int n = nums.size(), res = nums[0]; int prefix = 0, suffix = 0; for (int i = 0; i < n; i++) { prefix = nums[i] * (prefix == 0 ? 1 : prefix); suffix = nums[n - 1 - i] * (suffix == 0 ? 1 : suffix); ...
ALGO
0.999985
6.13112
ec78a80d-8aa7-410f-9bbf-950c9ace7198
mammothb/boost_1_54_0
libs/math/test/test_common_factor_gmpxx.cpp
#include <gmpxx.h> #include <boost/math/common_factor.hpp> template class boost::math::gcd_evaluator<mpz_class>; template class boost::math::lcm_evaluator<mpz_class>; template mpz_class boost::math::gcd(const mpz_class&, const mpz_class&); template mpz_class boost::math::lcm(const mpz_class&, const mpz_class&); templ...
TEST
0.972216
4.830038
b3f491f9-535e-4240-a7c8-9a592524aeb6
yifeidong0/OMPLapp
base/samplers/src/ConditionalStateSampler.cpp
/* Author: Francesco Grothe */ #include "ompl/base/samplers/ConditionalStateSampler.h" ompl::base::ConditionalStateSampler::ConditionalStateSampler(const ompl::base::SpaceInformation *si, ompl::base::Motion *&startMotion, ...
ALGO
0.97401
7.302577
13163560-78f7-498b-8734-1df6ddf8f73d
okuraofvegetable/AtCoder
atcoder.jp/keyence2020/keyence2020_a/Main.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; // #define int long long #define pb push_back #define mp make_pair #define eps 1e-9 #define INF 2000000000 #define LLINF 10000000000000ll #define fi first #define sec second #de...
ALGO
0.999731
4.652851
c9c99b98-4d2f-4052-bb24-6a1e8c920244
anosha-zahid-123/PF-Lab6
task2.cpp
#include<iostream> using namespace std; int main(){ for (int i=1 ; i<=5; i++) { for(int j=1; j<=i; j++) { cout<<j; } cout<<endl; } return 0; }
ALGO
0.999638
3.221551
027ef47f-fed4-458d-9ee1-3db19aa87d92
externalxdpro/LeetcodeSolutions
CPP/CheckIfGridCanBeCutIntoSections_3394.cpp
// 3394. Check if Grid can be Cut into Sections // Difficulty: Medium // You are given an integer n representing the dimensions of an n x n grid, with // the origin at the bottom-left corner of the grid. You are also given a 2D // array of coordinates rectangles, where rectangles[i] is in the form [startx, // starty, ...
ALGO
0.99919
7.047722
f6a9ae49-718d-4ede-8e00-f3f1ecdeb670
barakshalom/GIF-Maker
opencv/sources/modules/photo/src/calibrate.cpp
#include "precomp.hpp" #include "opencv2/photo.hpp" #include "opencv2/imgproc.hpp" #include "hdr_common.hpp" namespace cv { class CalibrateDebevecImpl : public CalibrateDebevec { public: CalibrateDebevecImpl(int _samples, float _lambda, bool _random) : name("CalibrateDebevec"), samples(_samples), ...
ALGO
0.998048
6.236484
4783b3cb-beb9-4d7c-9c67-36bc58f20ced
VarickQ/ACM
TrainData/常用模板/图论/一般图匹配(邻接阵形式).cpp
//һͼƥ,ڽʽ,ӶO(n^3) //ƥ䶥,matchƥ,δƥ䶥matchֵΪ-1 //ͼĶnڽmat #define MAXN 100 int aug(int n,int mat[][MAXN],int* match,int* v,int now){ int i,ret=0; v[now]=1; for (i=0;i<n;i++) if (!v[i]&&mat[now][i]){ if (match[i]<0) match[now]=i,match[i]=now,ret=1; else{ v[i]=1; if (aug(n,mat,match,v,match[i])) ma...
ALGO
0.999951
3.87075
df6b154b-7857-4d0d-b6eb-6f03130451fe
ishandutta2007/codeforces
ormlis/normal/1400/A.cpp
#include <iostream> #include <vector> #include <algorithm> #include <ctime> #include <cmath> #include <map> #include <unordered_set> #include <tuple> #include <queue> #include <set> #include <cstring> #include <functional> #include <random> #include <chrono> #define ar array #define all(arr) (arr).begin(), (arr).end()...
ALGO
0.99994
3.859393
2b296384-61ff-4e07-9b5f-429e9781ce12
fei0319/competitive-programming
code/codeforces/1946A.cpp
#include <bits/stdc++.h> using ll = long long int; void solve() { int n; std::vector<int> a; std::cin >> n; a.resize(n); for (int &i : a) { std::cin >> i; } std::sort(a.begin(), a.end()); int p = (n + 1) / 2 - 1; int ans = 1; while (p + ans < n && a[p + ans] == a[p])...
ALGO
0.999457
5.168781
bfe0ad96-0055-4cce-9419-e6513a686a58
Fang0105/APCSpractice
vjudge/vjudge-contest-404797-PD.cpp
#include<bits/stdc++.h> #define int long long #define endl '\n' #define ull unsigned long long using namespace std; signed main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n; cin>>n; for(int i=1;i<=n;i++){ cout<<i<<" Abracadabra"<<endl; } return 0; }
ALGO
0.9853
4.219417
33740518-27c6-4c56-9978-db238604cd15
ftiasch/mithril
2012-08-20/E.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <complex> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <c...
ALGO
0.999916
4.33842
9289ccd1-4387-40e3-b3c8-4260e198a29a
gautamsharma22/leetcode-manual
Sum Using Recursion.cpp
#include <iostream> using namespace std; int sumArr(int arr[],int size){ if(size==0){ return 0; } if(size==1){ return arr[0]; } int sum = arr[0] + arr[1]; int total = sum + sumArr(arr + 2, size-2); return total; } int main() { int arr[13]={2,4,8,8,8,67,7,8,5,5,655,35,34};...
ALGO
0.99991
4.411189
a0052a65-f996-49b2-a5fc-d8d1bd73454c
moondemon68/cp
Codeforces/PastContests/1054/1054B.cpp
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define mp make_pair #define MOD 1000000007 #define pii pair<int,int> #define LL long long using namespace std; int main () { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int m...
ALGO
0.999945
4.257057
0a7624cf-778c-41a7-866e-7b01c9f43de1
chonyy/leetcode-solutions
0714-best-time-to-buy-and-sell-stock-with-transaction-fee/0714-best-time-to-buy-and-sell-stock-with-transaction-fee.cpp
class Solution { public: int maxProfit(vector<int>& prices, int fee) { int buy = INT_MIN; int sell = 0; for(int p : prices) { buy = max(buy, sell - p); sell = max(sell, buy + p - fee); } return sell; } };
ALGO
0.999891
5.737329
a9f7f250-5f2d-405f-9db2-9a264aaea52d
Ivan-71-ua/Competitive-Programming
LeetCode/929_2.cpp
#include <bits/stdc++.h> class Solution { public: int numUniqueEmails(std::vector<std::string>& emails) { std::set<std::string> unique_emails; for(std::string email: emails) { std::string local_name = email.substr(0, email.find('@')); local_name = local_name.substr(0, email.find('+'));...
ALGO
0.999244
5.810522
767b30b2-2c36-4ab7-a3c0-6458aa6bf5d2
haok61bkhn/Toan_roi_rac
TimKiemTrenDoThi.trr/thanhphanlienthongmanh.cpp
#include<bits/stdc++.h> #include<string> #include<list> #define Nmax int(3e4) using namespace std; int n,res,num[Nmax],low[Nmax],dfscount; bool c[Nmax]; int kt[27],l,pre[Nmax]; vector<int> vt; list<int> a[Nmax]; string b[Nmax]; string s; queue<int> que; bool ok; bool Check(string x,string y){ int j; for(int i=x.l...
ALGO
0.999161
3.671801
4193b57f-f75b-4c18-9a4e-290944690120
kth496/Algorithm-study
BOJ/17608.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, a; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) cin >> d[i]; int key = d[N - 1], ans = 0; for (int i = N - 2; i > -1; i--) { if (d[i...
ALGO
0.999953
4.027299
5c6099e0-d376-41f0-8311-9bf15e9f5b34
sourav-islam/Phitron_batch4
Semester2/Basic DataStructure/Module 7/2Insert_in_list.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; void insert_at_tail(Node *&head, Node *&tail, int val) { Node *newNode = new Node(val); if (head == NULL) { head = new...
ALGO
0.999881
4.688096
7f00a132-19c5-4c72-b85b-8bf275cc6e5b
bmatinfar/PathPlaning
src/Eigen-3.3/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.997284
5.388735