uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
3aa559d1-8b54-4579-b72e-1800241a762c
skjmp/ProCon
Other/COLOCON2018/COLOCON2018/c2.cpp
//#include<math.h> //#include<limits.h> //#include<iostream> //#include<string> //#include<vector> //#include<stdio.h> //#include<sstream> //#include<list> //#include<queue> //#include<algorithm> //#include<functional> //#include<map> //#include<set> //#include<numeric> //#include<utility> //#include<initializer_list> ...
ALGO
0.999803
3.992448
a42f1a86-1060-4ce6-8933-17bd5b9c654c
lgc1112/ReTriple
core/jni/com_android_internal_os_Zygote.cpp
#define LOG_TAG "Zygote" // sys/mount.h has to come before linux/fs.h due to redefinition of MS_RDONLY, MS_BIND, etc #include <sys/mount.h> #include <linux/fs.h> #include <grp.h> #include <fcntl.h> #include <paths.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #include <sys/capability.h> #include <sys...
TOOL
0.914989
7.170952
14b05b5e-930e-403e-8f5f-66a028936600
chdbv/flutterles3
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
0946c078-41d1-41ae-9330-35d5a0166b88
otavioon/COLA-2022-Tools
datasets/src/algo/codenet/0/s872340920.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <queue> #include <string> #include <algorithm> #include <cstring> #define mem(i,a) memset(i,a,sizeof(i)) #define PI acos(-1.0) #define DMAX 100005 #define MOD 20190823 #define eps 1e-8 #define bl bool #define INF 1e+9 using namespace s...
ALGO
0.99963
3.249961
81c468aa-9163-4e5d-bcba-a0081df56844
tanvirtareq/programming
codeforces/1153 c.cpp
#include<bits/stdc++.h> #define sci(a) scanf("%d", &a) #define v(a) vector<a> #define p(a, b) pair<a, b> using namespace std; typedef long long int li; typedef long long unsigned lu; typedef vector<int> vi; typedef pair<int, int> pii; typedef priority_queue<int> mxpqi; typedef priority_queue<int, vector<int> , great...
ALGO
0.999493
3.108001
60a07594-3250-445b-ab59-9010aa062ee1
KrishnaTulasiSatti/Leetcode
0102-binary-tree-level-order-traversal/0102-binary-tree-level-order-traversal.cpp
/** * Definition for a binary tree node. * 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), l...
ALGO
0.999948
5.959104
9dc5364a-cfb2-478d-a50c-dab49f8c64db
lbv/pc-code
solved/r-t/rare-easy-problem/uva/rare.cpp
#include <cstdio> typedef unsigned long long u64; u64 NM; // N - M int main() { while (true) { scanf("%llu", &NM); if (NM == 0) break; if (NM % 9 == 0) { u64 N = NM/9 * 10; printf("%llu %llu\n", N-1, N); } else printf("%llu\n", NM*10/9...
ALGO
0.999533
3.651354
1183fbe1-8151-4742-a90f-b63a16a05125
WadekarPrashant/LeetCode-Problems-2023
Problem1232.cpp
class Solution { public: bool checkStraightLine(vector<vector<int>>& points) { int n = points.size(); int x1 = points[0][0]; int y1 = points[0][1]; int x2 = points[1][0]; int y2 = points[1][1]; for (int i = 2; i < n; i++) { int x3 = points[i][0]; ...
ALGO
0.999946
5.412407
d4d3d874-967a-4e20-b6b0-384ac7bcf2f4
sarvex/leetcode-guile
solution/1100-1199/1139.Largest 1-Bordered Square/Solution.cpp
class Solution { public: int largest1BorderedSquare(vector<vector<int>>& grid) { int m = grid.size(), n = grid[0].size(); int down[m][n]; int right[m][n]; memset(down, 0, sizeof down); memset(right, 0, sizeof right); for (int i = m - 1; i >= 0; --i) { for ...
ALGO
0.999901
5.908186
d4d2a72d-1766-41bc-9174-ceb7e6f88e37
anipatil72/My_Competitive_Programming
176.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long // function to check prime bool isPrime(int n) { if (n == 1) { return false; } if (n == 2 || n == 3) { return true; } if (n % 2 == 0 || n % 3 == 0) { return false; } for (int i = 5; i * i ...
ALGO
0.9997
4.407454
2b920104-31eb-4501-9c6b-023dd326f780
Vinyas-13/Leetcode
2038-remove-colored-pieces-if-both-neighbors-are-the-same-color/2038-remove-colored-pieces-if-both-neighbors-are-the-same-color.cpp
class Solution { public: bool winnerOfGame(string colors) { long long n=colors.length(); long long a=0; //no of A which can be removed long long b=0; //no of B which can be removed for(long long i=0;i<n;i++) { char ch=colors[i]; //get the curr char ...
ALGO
0.999681
5.960515
c2b0ec80-aee4-4cc7-88d1-b7951a96851b
rg-rupeee/competitive-programming
ATM_Machine.cpp
/* author : Mr Rupesh Garhwal id: rg_rupeee */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define fast_io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define MAX_N 1e5 + 1 #define INF 1e9 #de...
ALGO
0.999876
3.857504
0e91cb8f-11fc-434d-9fac-9f6cd3e08fdd
AvyChanna/chain-reaction
main.cpp
#include<iostream> #include"board.h" using namespace std; int main() { int r, c; cin>>r>>c; board b(r, c); b.printboard(); int i,j; int player=1; while(b.winner == -1) { // if(b.checktable()) // break; player = (player+1)%2; cin>>i>>j; cout<<"NextTurn"<<endl; while(!b.turn(i, j, player)) cin>>i...
ALGO
0.999487
3.628285
2f0514ec-e10e-4dda-9529-b25ca251a8f0
Abhishek00013/CodeTemplates
Segment Tree/segment_tree_class.cpp
class SGT { public: vector<int> seg; SGT(int n) { seg.resize(4 * n); } void build(int idx, int low, int high, vector<int> &nums) { if (low == high) { seg[idx] = nums[low]; return; } int mid = (low + high) >> 1; build(2 * idx + 1, low, mid, ...
ALGO
0.999931
5.508313
acf2120c-1236-456f-ab86-4276c73b5505
SavioCartaxo/Estudos-de-CPP
Beecrownd/1010.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; double c, soma; cin >> a >> b >> c; soma = b*c; cin >> a >> b >> c; soma += b*c; cout << "VALOR A PAGAR: R$ " << fixed << setprecision(2) << soma << endl; return 0; }
ALGO
0.993922
3.817215
849f6100-a39d-49cc-b5b4-f88c9dac03a5
girirajbidwai/-6companies30days
ADOBE/number_of_matching_subsequence.cpp
class Solution { public: bool isSubsequence(string s, string word) { if(s.length() < word.length()) return false; int st = 0, w = 0; while(st < s.length() && w < word.length()) { if(s[st] == word[w]) { st++; w++; } else { st++; } } retu...
ALGO
0.999985
5.999878
d4f007e7-1538-447b-a9fa-6b6859dd3959
itzmeowww/cp-solution
Toi/toi14_logistics.cpp
#include <bits/stdc++.h> using namespace std; int p[105]; vector<pair<int,int>>g[105]; long long dp[3][105][105]; int vis[3][105][105]; struct DATA{ int x; int use; int f; long long cost; bool operator < (const DATA & d2) const { return cost > d2.cost; } }; priority_queue<DATA>q; int mai...
ALGO
0.999917
3.719056
c91debae-47c9-41b3-a236-f17382d0ec95
shreyaschavhan/100-days-of-code
Day 052 - 22nd November 2020/SC55/CPP/05-Assignment.cpp
/*----------------------------------------------------- Assignment 5: Department of Computer Engineering has student's club named 'Pinnacle Club'. Students of second, third and final year of department can be granted membership on request. Similarly one may cancel the membership of club. First node is reserved for pre...
ALGO
0.999133
4.649437
2543efe6-9829-44b5-9b6c-8f4c80e15fb1
wvu-navLab/Enabling-Robust-State-Estimation-through-Measurement-Error-Covariance-Adaptation
3rdparty/RobustGNSS/gtsam/gtsam/discrete/DiscreteBayesNet.cpp
/** * @file DiscreteBayesNet.cpp * @date Feb 15, 2011 * @author Duy-Nguyen Ta * @author Frank Dellaert */ #include <gtsam/discrete/DiscreteBayesNet.h> #include <gtsam/discrete/DiscreteConditional.h> #include <gtsam/inference/FactorGraph-inst.h> #include <boost/make_shared.hpp> #include <boost/range/adaptor/rever...
ALGO
0.999245
7.66878
eb7ceab7-787d-4e48-81af-7ce0674de398
oneul0/AlgorithmLearning
back/수학/1676.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; vector<int> num; int inputNum; void factor(int a){ int div = 2; while(a>1){ if(a%div == 0){ num[div]++; a /= div; } else{ div++; } } } int main(){ ios_ba...
ALGO
0.999895
5.074829
92c89440-6412-4911-ab44-7570ad9c289a
Jaygaur99/DS-Algo-Practice
StringAlgo/3__poly_hashing.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i, m, n) for(int i=m; i<n; i++) #define int long long int int poly_hash(string s) { int hash = 0, prime=31, mod = 1e9 + 7 ; int p_power = 1; rep(i, 0, s.size()){ hash += (s[i] - 'a' + 1) * p_power; p_power *= prime; hash %= mo...
ALGO
0.999949
4.814202
9bf69281-c10a-4a1c-9684-c25e04eed52d
SagarSharma950/LeetCode
0059-spiral-matrix-ii/0059-spiral-matrix-ii.cpp
class Solution { public: vector<vector<int>> generateMatrix(int n) { vector<vector<int>> mat(n, vector<int>(n)); int top=0, bottom=mat.size()-1,left=0,right=mat[0].size()-1, num=1; while(top<=bottom && left<=right){ for(int i=left;i<=right;i++) mat[top][i]=num++; top+...
ALGO
0.999969
5.949201
1177830c-f40f-4ee6-97ae-42f4b34c8d69
OmarTarek15/Competitive-Programming
CodeForces/GNU C++17/451B | Sort the Array/121417856.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main(){ int n, cnt(0), l(0), s(0), seq(0); cin>>n; int a[n], b[n]; for(int i = 0; i < n; ++i){ cin>>a[i]; b[i] = a[i]; } sort(b, b+n); for(int i = 0 ;i < n; ++i) if(a[i] == b[i]) cnt++; ...
ALGO
0.999982
3.348167
a0e82a96-843f-400f-96c2-97c44dc0bc63
marcsantacana/juegosCPP
AA1_Snake/Snake/Snake/main.cpp
#define FRAME_RATE 150 #include <iostream> #include <cstdlib> #include <ctime> #include <vector> #include <chrono> #include <thread> // Arxiu de les funcions de teclat. #include "keyboard.h" using namespace std; // Constants que es fan servir al llarg del joc. const int BOARD_WIDTH = 20; // Amplada del tauler. // Al...
TOOL
0.984873
6.336679
9f6dd931-43da-4841-a31d-5d739e539813
Jerso06/flutter2024
exerciciosFlutter/flutter_application_classe_checkbox/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.998528
6.76073
ad613eb2-bd31-44ba-acc9-6d5b741ed38e
jinkyongpark/practicealgorithm
Code/swea_홈방범서비스 .cpp
#include <cstdio> //41분 #include <algorithm> #include <cmath> using namespace std; const int MAX = 30; //16 int testCase; struct home { int x, y; }; int n, m; int city[MAX][MAX]; home house[MAX*MAX]; int maxHouse, houseN; int calccost(int k) { return (k*k) + (k - 1)*(k - 1); } void countHouse(int x, int y) { for (in...
ALGO
0.999321
3.917338
92b59230-1e3b-4daa-862e-37f3438feaf4
hlight-git/PTIT.2.2.DSA.Exercise
Backtracking/DSA02006.cpp
/*Cre: HlighT*/ #include <bits/stdc++.h> #define IOS() ios::sync_with_stdio(false); #define tie() cin.tie(NULL); cout.tie(NULL); /*Compact*/ #define pb push_back #define pob pop_back #define mp make_pair #define fi first #define se second #define all(Object) Object.begin(), Object.end() #define Fu(tmp,L,R,Jump) for(int...
ALGO
0.999341
4.270889
a1858bb3-0d01-428e-bbad-1d12ee04a78e
FantasyGold/FantasyGold-Core
src/libff/libff/algebra/curves/bn128/bn128_pp.cpp
/** @file ***************************************************************************** * @author This file is part of libff, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) ***********************************************************************...
ALGO
0.982803
6.816099
d3835101-5eaa-462c-b152-c91c55289639
sivaharish51/leetcode-problems
0326-power-of-three/0326-power-of-three.cpp
class Solution { public: bool isPowerOfThree(int n) { if(n<=0) return false; for(int i=0;i<=n/2;i++){ if(pow(3,i)==n){ return true; } if(pow(3,i)>n) break; } return false; } };
ALGO
0.999744
5.760242
01e15d01-bcd3-43b7-ba0f-88237123ab5b
emanlaicepsa/codes
132.cpp
#include <iostream> #include <algorithm> #include <vector> #define ll long long using namespace std; int gcd(int x,int y){ if(x%y==0)return y; else return gcd(y,x%y); } int main(){ int x,y; cin>>x>>y; cout<<gcd(x,y)<<endl; }
ALGO
0.999864
4.633454
718972f3-d7b8-42f4-964e-8790459af434
Amylo-jh/baekjoon
21000s/21736.cpp
#include <iostream> #include <vector> #include <string> #include <queue> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, m; cin >> n >> m; pair <int, int> start; vector <vector <int>> area; vector <vector <bool>> visited; ...
ALGO
0.999603
4.527208
1bbcffa0-f815-4aa4-8e0e-868e5ea5f4bd
MaheshSharan/LeetCode_Automation
solutions/3000-3099/3036.Number of Subarrays That Match a Pattern II/Solution.cpp
int ps[1000001]; class Solution { public: int countMatchingSubarrays(vector<int>& nums, vector<int>& pattern) { int N = size(pattern); ps[0] = -1; ps[1] = 0; for (int i = 2, p = 0; i <= N; ++i) { int x = pattern[i - 1]; while (p >= 0 && pattern[p] != x) { ...
ALGO
0.999986
5.985757
50083958-2336-401b-a326-b145a3ef0464
JooHyeongjin/FLETA_AD
GeographicLib-1.50.1/src/Geocentric.cpp
#include <GeographicLib/Geocentric.hpp> namespace GeographicLib { using namespace std; Geocentric::Geocentric(real a, real f) : _a(a) , _f(f) , _e2(_f * (2 - _f)) , _e2m(Math::sq(1 - _f)) // 1 - _e2 , _e2a(abs(_e2)) , _e4a(Math::sq(_e2)) , _maxrad(2 * _a / numeric_limits<real>::eps...
ALGO
0.998644
5.398717
d9935120-bc93-4870-b600-9332ca00ca5a
AlaminPu1007/leet-code
Leet-Code/153. Determine if Two Strings Are Close/Determine_if_Two_Strings_Are_Close.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool closeStrings(string word1, string word2) { int len1 = word1.length(), len2 = word2.length(); if (len1 != len2) return false; set<char> Map1, Map2; vector<int> item1(26, 0), item2(26, 0); ...
ALGO
0.999976
5.563352
815d0c1a-c4b8-4dc3-933e-dd5f48ca00c1
AbhiArya20/data-structure-and-algorithms-practice
02 DP/086DistinctSubsequences.cpp
#include<bits/stdc++.h> using namespace std; // LeetCode - 115 class Solution { vector<vector<int>> dp; int f(int i, int j, string &s, string &t){ if(j==t.size()) return 1; if(i==s.size()) return 0; if(dp[i][j]!=-1) return dp[i][j]; int ans =...
ALGO
0.99999
6.271544
752a309c-8764-4c59-94db-7f70b7cf115d
RyanL123/Competitive-Programming
Codeforces/1406B.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef vector<pair<int, int>> vii; typedef vector<int> vi; typedef long double ld; typedef long long ll; typedef unsigned long long ull; #define eb emplace_back #define pb push_back #define mp make_pair #define srt(x) sort(x.begin(), x.end()) #d...
ALGO
0.999964
4.070323
336e6e54-6d9d-4d12-86c3-8fdd067ef7d7
toanlinka/ThiAdvandce_SS
BFS_DFS_LienThong/Code3.cpp
#include <bits/stdc++.h> using namespace std; int Test,m,n,u,v,s; int a[1001][1001]; int Free[1001]; queue <int> q; void BFS(int s){ q.push(s); Free[s]=1; while(!q.empty()){ u = q.front(); q.pop(); for(int v=1;v<=n;v++){ if(Free[v]==0 && a[u][v]==1){ q.push(v); Free[v] = 1; } } } } int...
ALGO
0.999964
4.45736
ff68a10a-3411-48a2-87bb-7cea61bb372c
gitmanav/CppMastery
Difficulty: Medium/Indexes of Subarray Sum/indexes-of-subarray-sum.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector<int> subarraySum(vector<int> &arr, int sum) { // code here vector<int> res; int curr=0; int s=0; int e=0; for(int i=0;i<arr.size();i++) ...
ALGO
0.999572
6.39203
e8472ef2-a760-4e0d-bd49-d3e9e393e811
i12cu84/Unreal_Engine_Develop_Notes
content/cpp/c++特性/cpp14/constexpr_template.cpp
#include <iostream> using namespace std; template<class T> constexpr T pi = T(3.1415926535897932385L); int main() { cout << pi<int> << endl; // 3 cout << pi<double> << endl; // 3.14159 return 0; }
ALGO
0.969756
3.908097
58c9eee7-9e49-41a8-b6d6-18040638310c
adarboleda/estructura-de-datos
Deber1.2 (Tipos de Recursividad)/recursividadSimple.cpp
/*********************************************************************** * UNIVERSIDAD DE LAS FUERZAS ARMADAS ESPE * * Proposito: Imprimir una cuenta regresiva * * Autor: Abner Arboleda * * Fecha de creacion: ...
ALGO
0.992904
4.786831
8042490b-56cb-4ff8-bf6d-b191688571be
KrushikReddyNallamilli/oops-though-cpp
overloading.cpp
#include<iostream> #include<math.h> using namespace std; int power (int,int); double power (int,double); int main(){ int a,b,x; double y; cout<<"enter the value of a,b:"; cin>>a>>b; cout<<"enter the value of x,y"; cin>>x>>y; cout<<"the power of a,b to the base a is :"<<power(a,b)<<endl; cout<<"the power of x,y ...
ALGO
0.98337
3.935403
cf38333d-6b75-4d66-981a-f91be3d9e449
nc-77/algorithms
ACM/mu/1.cpp
#include<bits/stdc++.h> #define ll long long #define debug(x) cout<<#x<<'='<<x<<endl #define set0(x) memset(x,0,sizeof(x)) using namespace std; //#define int long long const int inf=0x3f3f3f3f; const int maxn=2e6+10; int dp[250][250]; int main() { //ios::sync_with_stdio(false); for(int i=0;i<=120;i++) dp[0][i]=1; ...
ALGO
0.999852
3.765297
909d1687-3696-4ffd-a787-6f8468367b24
ajakhotia/eyeKin
boost/boost/boost_1_57_0/libs/graph/example/vertex-name-property.cpp
using namespace boost; template < typename Graph, typename VertexNamePropertyMap > void read_graph_file(std::istream & graph_in, std::istream & name_in, Graph & g, VertexNamePropertyMap name_map) { typedef typename graph_traits < Graph >::vertices_size_type size_type; size_type n_vertices; typena...
ALGO
0.873754
5.651333
795b7567-603a-4aa8-b551-17907d341ed2
probing-lab/HyperPAYNT
storm/src/storm/automata/LTL2DeterministicAutomaton.cpp
#include "storm/automata/LTL2DeterministicAutomaton.h" #include "storm/automata/DeterministicAutomaton.h" #include "storm/exceptions/ExpressionEvaluationException.h" #include "storm/exceptions/FileIoException.h" #include "storm/exceptions/NotSupportedException.h" #include "storm/logic/Formula.h" #include "storm/utilit...
ALGO
0.988277
6.809422
04f4bca0-99ff-4908-9eb1-2bcecce812d8
Hyp3R0d/AlgorithmCompetition
动态规划/线性dp/题目/NC周赛18 D.cpp
/*多组Test下使用封装数据结构, 在函数中开对象,避免暴力清空数组造成时间浪费*/ /*STL: 数据结构 std::cin std::cout function类 lowerbound builtin max min accumulate iota stoi atoi等函数需要加上std,避免命名空间污染*/ /*数学先打表, 后对拍, 图论只会暴力就bitset搞*/ /*300兆字节 1- 2 秒*/ #include<bits/stdc++.h> using i8 = signed char; using u8 = unsigned char; using i16 = signed short int; us...
ALGO
0.999923
4.351643
49f899e2-1c33-47c7-bf62-6309dfd6a7f6
dimmarvel/oop_in_cpp_author_lafore
Topic 14 (Templates and exceptions) 3 Template of class.cpp
// tempstak.cpp // #include <iostream> using namespace std; const int MAX = 100; /////////////////////////////////////////////////////////// template <class mT> class Stack { private: mT st[MAX]; //: int top; // public: Stack() // { top = -1; } void push(mT var) // { ...
ALGO
0.915764
3.526521
50a3e98a-b503-427e-a658-de2e1f3abfb0
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_test_44_1.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2100, rev[4] = {0, 2, 1, 3}; int n; char a[N][N]; int tag[N]; int id[N][N]; void dye(int n) { for (int i = 1, c = 1; i <= 9; i += 2, c += 2) { id[i][1] = id[1][i] = id[1][i + 1] = id[i + 1][1] = c; for (int j = 2; j < i; j++) id[j][i + 1 - j] = c + (...
ALGO
0.999797
3.839811
05d764e4-e83e-46af-ba5b-9942af683cba
Ypz22/Universidad
TercerSemestre/Segundo Parcial/Estructura de datos/colasOperaciones.cpp
#include <iostream> const int MAX_SIZE = 10; int colaLineal[MAX_SIZE]; int frente = -1, fin = -1; void insertarElementoscola(int dato) { if (fin == MAX_SIZE - 1) { printf("\nLa cola est llena\n"); } else { if (frente == -1) { frente = 0; } fin++; colaLineal[...
ALGO
0.978161
5.63644
ca9af2b4-df4f-4dd9-90a5-b1c235eb8945
Edwards06/EDWARD_DEKSTOP
Exemple scoala/arr_princ.cpp
#include <iostream> using namespace std; int main(){ int arr [50][50]; int i, j, ori, ver; cout<<"Introducem dimensiunile matricii: "; cin >> ori >> ver; for(i = 0; i < ori; i++){ for(j = 0; j < ver; j++){ cin >> arr[i][j]; } } //Afisarea tabelei for(i =...
ALGO
0.998476
3.209873
1d1917b9-9124-428a-adab-b8690d5306b5
tanvirtareq/programming
codeforces/1228 c.cpp
#include<bits/stdc++.h> #define dbg(a) cout<<#a<<" "<<a<<endl #define pb push_back #define mk make_pair #define md 1000000007 using namespace std; typedef long long ll; typedef long long unsigned lu; lu x, n, csum[100], ans=1; vector<lu> v; lu power(lu b, lu p) { if(p==0) return 1; if(p==1) return b%md; lu x=p...
ALGO
0.999992
4.41927
87d2dc61-0bd8-49cb-acc1-1b1bf3c928a7
moghun/lcs_scs
lcs/lcs.cpp
// Muhammed Orhun Gale - lcs.cpp - 14/05/2024 #include "lcs.h" #include <iostream> // Constructor initializing sequences and the DP matrix LCS::LCS(std::string seq_1, std::string seq_2) : dp(seq_1.length() + 1, std::vector<int>(seq_2.length() + 1, 0)), seq1(seq_1), seq2(seq_2) { fillDP(); // Fill the DP table rig...
ALGO
0.999588
6.783049
6f59996d-a069-42d4-95c2-54083e42e0c7
Bhaveshpetkar3/leetcode
1047-remove-all-adjacent-duplicates-in-string/1047-remove-all-adjacent-duplicates-in-string.cpp
class Solution { public: string removeDuplicates(string s) { int n=s.size(); stack <char> stk; string ans; stk.push(s[0]); for(int i=1;i<n;i++) { ...
ALGO
0.99998
6.445507
33cc7fc3-b150-4e25-ba52-314f3687f69a
vtsynergy/MetaMorph
metamorph-backends/opencl-backend/metamorph_opencl_intelfpga.cpp
/** OpenCL Back-End: FPGA customization **/ #include "../../metamorph-backends/opencl-backend/metamorph_opencl.h" #define CHKERR(err, str) \ if (err != CL_SUCCESS) { \ fprintf(stderr, "Error in executing \"%...
TOOL
0.898673
4.141218
029601cf-01a3-436d-a9db-1a8b0ce9e98e
nordcap/cpp
Введение в программирование (Яндекс)/Целые числа/1.3.3.cpp
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { /* Последняя цифра Дано натуральное число, выведите его последнюю цифру. Формат входных данных На вход дается натуральное число N, не превосходящее 10000. Формат выходных данных Выведите одно целое число - ответ на задачу....
ALGO
0.990553
4.224159
84c01775-191a-4e4a-8ef9-d4a4f928f4bf
Movazed/LeetCode_problem_Set_and_daily
LeetCode_394.cpp
#include <bits/stdc++.h> using namespace std; #define ss stack<string> class Solution { public: string decodeString(string s) { ss st; for(int i = 0; i < s.length(); i++){ if(s[i] == ']'){ string ans = ""; while(st.top() != "["){ ans = ...
ALGO
0.99976
5.813853
2f8c227d-c42b-4e25-b452-8cec660666be
CoraZhang/Computer-Graphics
a4/libigl/include/igl/comb_cross_field.cpp
#include "comb_cross_field.h" #include <vector> #include <deque> #include <Eigen/Geometry> #include "per_face_normals.h" #include "is_border_vertex.h" #include "rotation_matrix_from_directions.h" #include "triangle_triangle_adjacency.h" namespace igl { template <typename DerivedV, typename DerivedF> class Comb ...
ALGO
0.999504
5.715162
09c5bed3-7a72-430f-89a6-11ab043c942d
skp544/cpp-patterns
pattern36.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cout << "Enter the Number: " << endl; cin >> n; cout << "Printing Patterns: " << endl; for (int i = 1; i <= n; i++) { int x; if (i % 2 == 0) { x = 1; } else { x = 0; ...
ALGO
0.999962
4.578413
49785832-042a-4cc7-8b5c-d140abb912bf
eth-cscs/SummerUniversity2022
iso_cpp/practicals/lab1_daxpy/starting_point.cpp
#include <cassert> #include <chrono> #include <iostream> #include <limits> #include <string> #include <vector> // Initialize vectors void initialize(std::vector<double> &x, std::vector<double> &y); // DAXPY void daxpy(double a, std::vector<double> const &x, std::vector<double> &y); // Check solution bool check(doubl...
TOOL
0.988664
5.584233
a8c7fdbb-8773-46e4-89eb-dd8690ca95d7
neeryks/cppcert
week2-02.cpp
#include<stdio.h> #include<math.h> int main(void) { double sinValue,X; printf("please enter the value of calculate sine:"); scanf("%lf",&X); sinValue=sin(X); printf("\n The sine value of %lf=%lf",X,sinValue); return 0; }
TOOL
0.937387
3.68092
7535feb9-d957-4afa-aae6-2e61d59c984d
ishandutta2007/codeforces
dk1227/normal/1082/C.cpp
#include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <cmath> #include <ctime> #include <chrono> #include <random> #include <bitset> #include <vector> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <iostream> #include <algorithm> #include <unorder...
ALGO
0.999947
3.993162
3a8ab86c-81b8-47ec-916b-91e5f3e308bb
theshameem/OJ-Solve
CODEFORCES/cf50A/cf50A.cpp
/* Solved! Time: 09:46:47 AM Date: 05-05-18 */ #include <bits/stdc++.h> using namespace std; int main(){ freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int m, n; scanf("%d %d", &m, &n); printf("%d\n", (m * n) / 2); return 0; }
ALGO
0.999015
3.469697
fc3a1f15-d340-41d5-84d8-f5cb13d9b27a
mitthhuu3110/Strivers-SDE-Sheet-Challenge
Graphs/rottenOranges.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find minimum time required to rot all oranges. int orangesRotting(vector<vector<int>>& grid) { // Code here int n = grid.size(); int m = grid[0].size();...
ALGO
0.999927
6.378118
bc76407a-d065-4d3f-b077-70220f520bc4
LeezyWannaFall/CppMatrixLibrary
core/s21_matrix_oop.cpp
#include "../s21_matrix_oop.h" S21Matrix::S21Matrix() : rows_(0), cols_(0), matrix_(nullptr) {} S21Matrix::S21Matrix(int rows, int cols) : rows_(rows), cols_(cols) { if (rows <= 0 || cols <= 0) { throw std::invalid_argument("Rows and columns must be positive integers."); } matrix_ = new double*[rows_]; f...
TOOL
0.997576
6.673063
8c84556d-f3c1-4db3-972d-ff650b21a7e5
denis-adidas/Cryptography
Ceaser cipher🤩🤩/main.cpp
#include <iostream> #include <set> #include <cmath> #include <string> #include <random> typedef struct { int maxFrequency; int minFrequency; char minChar; char maxChar; } frequency; std::string CaesarCipherEncoder(const std::string& inputString, int offset) { std::string encryptedString = inputStr...
ALGO
0.993466
5.652074
c65c646a-b815-4e81-8639-b380cf9889ad
vernonet/ESP32_PRJ
esp32_wifi_microphone_a1s_aac/lib/fdk-aac/src/libFDK/qmf.cpp
/* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android © Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION The Fraunhofer FDK AAC Codec Lib...
ALGO
0.998262
3.559059
ff9df78d-8370-4c25-9581-d3d3d5b7a7a6
rylahs/Study_Previous
CPP,CodingTest/정리 안된 문제들/3009.cpp
#include <bits/stdc++.h> using namespace std; int main_3009(void) { ios::sync_with_stdio(false); cin.tie(nullptr); int px1, px2, px3, py1, py2, py3; cin >> px1 >> py1 >> px2 >> py2 >> px3 >> py3; int px4, py4; if (px1 == px2) px4 = px3; else if (px1 == px3) px4 = px2; else px4 = px1; if (py1 == py2) ...
ALGO
0.999947
4.237252
4c79ba2f-40f4-40f2-92b7-d617dd3519c3
prateek115/DSA
DataStructures/Graphs/Adjacent_Matrix.cpp
#include<iostream> using namespace std; void AddEdge(int aj[4][4], int u, int v) { aj[u][v] = 1; aj[v][u] = 1; } void display(int aj[4][4], int V) { for(int i=0;i<V;i++) { for(int j=0;j<V;j++) cout<<aj[i][j]<<"\t"; cout<<"\n"; } } //Desired Graph // // 0---1 // | | // 3---2 // int main() { int V=4...
ALGO
0.999615
4.0039
2fbf21e6-e90b-4d0e-8dbc-9533e5e556f1
musemorgan/Practice
Practice/Chap6/return.cpp
#include <iostream> #include <string> using namespace std; double multiply(double one, double two) //must make sure that the name of the program and its parameters have data types { double answer = one * two; return answer; }; // semincolons are needed after the brackets and inside the body for syntax purposes int m...
TOOL
0.985852
3.770531
2ebcffa9-a304-4d35-847a-d2198a8cf326
ishandutta2007/codeforces
vladprog/normal/1204/A.cpp
#pragma GCC optimize("O3") #include<bits/stdc++.h> using namespace std; typedef long long ll; #define int ll typedef long double ld; typedef pair<int,int> pii; #define x first #define y second signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin>>s; int ans=0...
ALGO
0.999828
3.587203
bbca276c-7bb9-40e6-90b0-dc49f567c8e7
artiam99/GeeksforGeeks
14 Bit Magic Algoritms/2 Intermediate/35 All Elements Occur K times except 1 Find Exception.cpp
#include<bits/stdc++.h> using namespace std; int Find(vector<int> &a,int n,int k) { int bit[32]; memset(bit,0,sizeof(bit)); for(int i = 0 ; i < 32 ; i++) for(int j = 0 ; j < n ; j++) if((a[j] & (1 << i))) bit[i]++; int res = 0; for(int i = 0 ; i < 32 ; i++) res += (bit[i] % k) * (1 << i); return res;...
ALGO
0.999963
4.100182
d7c966f7-6152-48ae-84e6-6ad408a85646
kSuroweczka/HashTable
main.cpp
#include <iostream> #include <list> #include<string> #include <cstdlib> using namespace std; class HashTableChain { private: int rozmiar; int rodzaj; int* TT = new int[rozmiar]; list<int>* table; int Bucket; int func; public: void hashFunction(int* tab, int n); void deleteElem(int key)...
ALGO
0.998907
4.145472
98851b2a-1d3d-4d0f-9f77-6f436e325ce5
anonymint/Path-Planning
src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; MatrixXf::Index maxIndex; float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex); std::cout << "Maximum sum at position " << maxIndex << std:...
ALGO
0.999775
4.228817
e77ce382-09b0-4af8-a086-75881f59882c
yashjain0313/CP
dsa/cses/contests cc/Gun_Master.cpp
#include <bits/stdc++.h> using namespace std ; #define int long long const int MOD =1e9+7; const int INF= LLONG_MAX>>1; //godyash signed main() { ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int t; cin>>t; while(t--) { int a,d; cin>>a>>d; vector<int>v1; vector<int>v2; for(int i=0;i<a;i+...
ALGO
0.999639
3.851457
1accdd59-9e27-435c-9e02-b59c3e951d56
thebird-/ts-stream-server-client
boost_1_61_0/libs/graph/example/edmonds-karp-eg.cpp
// Use a DIMACS network flow file as stdin. // edmonds-karp-eg < max_flow.dat // // Sample output: // c The total flow: // s 13 // // c flow values: // f 0 6 3 // f 0 1 6 // f 0 2 4 // f 1 5 1 // f 1 0 0 // f 1 3 5 // f 2 4 4 // f 2 3 0 // f 2 0 0 // f 3 7 5 // f 3 2 0 // f 3 1 0 // f 4 5 4 // f 4 6 0...
ALGO
0.915954
5.697292
23564e2a-423e-4ae8-8240-c065497f519c
onglu1/acm
codelist/牛客专题/数据结构/第1章 区间信息维护(一)/E 智乃酱的双塔问题.cpp
// // Created by onglu on 2022/5/29. // #include <bits/stdc++.h> #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define endl '\n' #define lson (rt << 1) #define rson (rt << 1 | 1) #define Mid ((l + r) / 2) #define int long long using namespace std; const int mod = 1e9 + 7; const int N = 2e6 + 1...
ALGO
0.999744
4.171456
dae75957-162c-4ec6-8af7-6581da3a4808
jps27CSE/Problem-Solving
CodeForces/A. Calculating Function.cpp
#include<iostream> using namespace std; int main() { long long int test, sum=0; cin>>test; if(test%2==0) { sum=test/2; } else { sum = -(test/2+1); } cout<<sum; return 0; }
ALGO
0.99811
3.783345
972e1dee-9454-4777-b388-c93b39cd43bb
1tygoime/a
cses/Sorting and Searching/Movie Festival.cpp
#include <bits/stdc++.h> using namespace std; vector <pair <int, int>> v; int n; bool cmp(const pair <int, int> &a, const pair <int, int> &b){ return a.second < b.second; } int main(){ for(cin >> n; n--; ){ int x, y; cin >> x >> y; v.push_back({x, y}); } sort(v.begin(), v.end(), cmp); int endi...
ALGO
0.9996
4.796401
c219549c-9a3d-44c5-a107-edcc48c239cb
codingbus821/CodingTest
line/dfs/main.cpp
#include <iostream> #include <string> #include <vector> #include <limits.h> using namespace std; int a=INT_MAX; string b; void dfs(string str,int cnt){ if(str.length() == 1){ if(cnt < a){ a=cnt; b=str; } return; } for(int i=1;i<str.length();i++){ ...
ALGO
0.999696
4.73341
2a5f1f76-315e-4d6c-9c3c-c7341570eee9
bill20509/leetcode-practice
cpp/math/easy/326. Power of Three.cpp
class Solution { public: bool isPowerOfThree(int n) { while(n > 1){ if(n % 3 == 0){ n /= 3; } else break; } return n == 1; } };
ALGO
0.999722
6.153957
e1e5691c-cbac-4b81-918b-1e07cf920f04
faqwerly/c-
T7_22.cpp
/* *FileName: T7_22.cpp *Author: ն *E-mail: <EMAIL> *Date: 2022.4.16 *College: School of Computer Science and Information Engineering *Function: ֮ʿѲ⡣ */ #include<iostream> int boa[8][8] = {0}; int i = 0; using namespace std; bool isOut(int x, int y)//жǷ񳬹 { if (x >= 0 && x <= 7 && y >= 0 && y...
ALGO
0.999658
3.255965
9b7044bf-c872-43bb-96bd-4a4c4655c137
riz1-ali/Codeforces_Solutions
897B.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long int c,x,i,k,p,sum=0; cin>>k>>p; for(i=1;i<=k;i++) { c=i; x=i; while(c>0) { x=x*10+c%10; c/=10; } sum=(sum%p+(x%p))%p; } cout<<sum<<endl; return 0; }
ALGO
0.999861
3.577697
57348400-f7ef-4155-aaad-f0c385386356
NullAwe/competitive-programming
codeforces/gitgud/PomanNumbers.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int pow(int y) { if (y <= 0) return 1; int base = pow(y / 2); base *= base; if (y % 2 == 1) base *= 2; return base; } int main() { ll n, k; cin >> n >> k; string str; cin >> str; // Adjusts k for two values, since these two values hav...
ALGO
0.999992
4.76996
9d45ef68-7021-43d6-a782-33a28dad639c
apache/cloudberry
src/backend/gporca/libgpopt/src/operators/CPhysicalLeftAntiSemiHashJoin.cpp
#include "gpopt/operators/CPhysicalLeftAntiSemiHashJoin.h" #include "gpos/base.h" #include "gpopt/base/CDistributionSpecHashed.h" using namespace gpopt; //--------------------------------------------------------------------------- // @function: // CPhysicalLeftAntiSemiHashJoin::CPhysicalLeftAntiSemiHashJoin // // ...
ALGO
0.971632
5.826337
8fc7b82a-f73a-4e91-9a05-0c24d32019c9
KangKangOS/android_bootable_recovery
install/adb_install.cpp
#include "install/adb_install.h" #include <errno.h> #include <fcntl.h> #include <signal.h> #include <stdlib.h> #include <string.h> #include <sys/epoll.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <atomic> #include <functional> #include <map...
TOOL
0.932466
7.358328
37fd3593-08e1-4bee-a163-836d31953302
theravijangid/DSA
RECURSSION/SubsequerceOfString.cpp
#include<iostream> #include<vector> using namespace std; void printSubsequence(string str, string output, int i, vector<string>& v) { // B.C if(i >= str.length()) { v.push_back(output); return; } // EXCLUDE KA CASE printSubsequence(str, output, i + 1, v); // INCLUDE KA CASE ...
ALGO
0.994521
3.855883
a6cbf402-192e-4f65-bd47-b4e0190e9de4
15757170756/All-Code-I-Have-Done
C Programming Book/打印螺旋矩阵-方阵.cpp
/* 这个只能打印方阵, 即rows=cols */ #include <iostream> using namespace::std; int main() { while (1) { int rows, cols; cin >> rows >> cols; int** arr = new int*[rows]; for (int i = 0; i < rows; ++i) arr[i] = new int[cols]; int m = 1; for (int i = 0; i <= (rows - 1) / 2; ++i) { for (int j = i; j < cols - i;...
ALGO
0.999588
3.343905
d06ca460-f1fe-45fc-b73c-f81a174e2995
mvancompernolle/ai_project
data/fdm2dimsolver.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <ql/math/interpolations/bicubicsplineinterpolation.hpp> #include <ql/methods/finitedifferences/finitedifferencemodel.hpp> #include <ql/methods/finitedifferences/meshers/fdmmesher.hpp> #include <ql/methods/finitedifferences/operato...
ALGO
0.998719
7.298046
41853ad0-d7cb-4927-909f-f76bfd768889
kemtrinh/furry
CPP0747 - LOẠI BỎ 100.cpp
// Created by Nguyễn Mạnh Quân #include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; ++i) #define FORD(i, a, b) for(int i = a; i >= b; --i) #define F(i, a, b) for(int...
ALGO
0.999868
4.332959
92d9e162-3e4a-41d8-ad81-8eaa277bb72b
shashwatw/DSA
Dynamic Programming/LC-124-Maximum-path-sum.cpp
//* https://leetcode.com/problems/binary-tree-maximum-path-sum/description/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nu...
ALGO
0.999992
6.590392
9753e5ac-6578-4db7-9c9e-766a5d523d94
prashantdhaka1/LeetCode-Solutions
C++/find-a-good-subset-of-the-matrix.cpp
// Time: O(m * 2^n) // Space: O(2^n) // bitmasks, constructive algorithms, greedy class Solution { public: vector<int> goodSubsetofBinaryMatrix(vector<vector<int>>& grid) { unordered_map<int, int> lookup; for (int i = 0; i < size(grid); ++i) { int mask = 0; for (int j = 0; ...
ALGO
0.999866
6.246705
ffbe50c5-e404-4dd4-9a15-8b9eca041bdf
shishirmondal13/My-all-code
My Cpp code/Array insertion.cpp
#include<iostream> using namespace std; int main() { int a[5] = {1,2,3,4,5}; int position,num,i; cout<<"enter the position and number "<<endl; cin>>position>>num; for (int i =5; i >= position-1; i--) { a[i+1]=a[i]; } a[position-1]=num; cout<<"This is the new array after insert the new number"<<endl; for...
ALGO
0.999467
3.160618
849fdd6b-625e-4fd6-bb78-7fccd9f86814
lychees/ACM-Training
Note/集训队作业/2015/作业1/htahta_黄涛岸/我的代码/CF258D.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <cstring> using namespace std; int get() { int f=0,v=0;char ch; while(!isdigit(ch=getchar()))if(ch=='-')break; if(ch=='-')f=1;else v=ch-'0'; while(isdigit(ch=getchar()))v=v*10+ch-'0'; if(f)return -v;else return ...
ALGO
0.998926
3.861728
23be6cd4-ad13-4ccc-97ab-33451eabd716
pakillottk/PR1_META
BT.cpp
#include "BT.h" //CONSTRUCTORES Y DESTRUCTORES //=========================== BT::BT(const std::string& rutaFichero, Config_BT config, bool vecinos_prop, bool reinicios_prop, bool tabuActivo_prop): Metaheuristica(rutaFichero) { max_evaluaciones = config.max_evaluaciones; if(tabuActivo_prop) ...
ALGO
0.999932
4.760893
48ae2f84-a742-4200-9560-e57017298e1b
ishandutta2007/codeforces
rush_d_cat/normal/1475/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 200000 + 10; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int t; cin >> t; while (t --) { LL a,b,k; cin>>a>>b>>k; LL ans=k*(k-1)/2; map<int,int> mp; for(int i=1;i<=k;i++){ ...
ALGO
0.999762
3.622906
e4a329c3-963b-4ce9-9540-77388f673bdf
tramboi/scummvm-test
engines/saga/puzzle.cpp
#include "saga/saga.h" #include "saga/actor.h" #include "saga/interface.h" #include "saga/scene.h" #include "saga/sprite.h" #include "saga/puzzle.h" #include "saga/render.h" #include "common/system.h" #include "common/timer.h" namespace Saga { #define ITE_ACTOR_PUZZLE 176 #define PUZZLE_X_OFFSET 72 #define PUZZLE...
TOOL
0.881558
5.251229
ba05ff02-f88f-494c-bad2-2ad608d4f53b
ishandutta2007/codeforces
sutaner/normal/1428/B.cpp
#include <bits/stdc++.h> #define rep(i, l, r) for (register int i = l; i <= r; i++) #define per(i, r, l) for (register int i = r; i >= l; i--) #define srep(i, l, r) for (register int i = l; i < r; i++) #define sper(i, r, l) for (register int i = r; i > l; i--) #define erep(i, x) for (register int i = h[x]; i; i = e[i]....
ALGO
0.999923
3.184813
22935080-77de-4041-a7f5-50f0d9bd2fa6
b202001162/DSA
Stack/85. Maximal Rectangle in matrix.cpp
class Solution { public: int largestRectangleArea(vector<int> v) { // v represents the height vector int area = 0; int n = v.size(); stack <int> st; st.push(-1); for(int i = 0; i<n; i++) { while(st.size() > 1 && v[st.top()] >= v[i]) { int ...
ALGO
0.999788
6.310052
cc556037-62da-45fa-af8d-619a21ad2c34
swang109/leetcode
single_num.cpp
class Solution { public: int singleNumber(vector<int>& nums) { int result = nums[0]; for(int i=1;i<nums.size();i++){ result^=nums[i]; } return result; } };
ALGO
0.99993
5.646347
0720c36b-bc21-4af9-931d-7b76234d1ff9
ishandutta2007/codeforces
cyanic/normal/367/D.cpp
#include<bits/stdc++.h> #define rep(i,a,b) for (int i=(a); i<=(b); i++) #define per(i,a,b) for (int i=(a); i>=(b); i--) using namespace std; typedef long long LL; const int maxn = 1000005; int p[maxn], c[maxn], f[1<<20], ALL, n, m, d, x, y, s, ans; int main() { cin >> n >> m >> d; rep (i, 1, m) { cin >> x; rep ...
ALGO
0.999872
3.658457
e60d2d49-daac-4328-a509-b9674ef8ea73
Tatotavella/Workshop-3_PBATEOTW_Chile
lammps-awsem/src/lammps-9Oct12/src/USER-OMP/pair_born_coul_wolf_omp.cpp
/* ---------------------------------------------------------------------- Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include "math.h" #include "pair_born_coul_wolf_omp.h" #include "atom.h" #include "comm.h" #include "force.h" #include...
ALGO
0.999573
6.281594