uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
50f67055-57db-4a90-8ea3-96309448131a
solfrak/Render
ext/openexr/OpenEXR/IlmImf/ImfRle.cpp
#include <string.h> #include "ImfRle.h" #include "ImfNamespace.h" OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER namespace { const int MIN_RUN_LENGTH = 3; const int MAX_RUN_LENGTH = 127; } // // Compress an array of bytes, using run-length encoding, // and return the length of the compressed data. // int rleCompress...
ALGO
0.984666
5.188163
801ecc35-e8c8-4e73-8f51-b94af0c33648
alulu-zh/software
boost_1_70_0/libs/math/example/students_t_two_samples.cpp
#ifdef _MSC_VER # pragma warning(disable: 4512) // assignment operator could not be generated. # pragma warning(disable: 4510) // default constructor could not be generated. # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required. #endif #include <iostream> using std::cout; ...
ALGO
0.930309
7.085112
8c33b484-34f0-4e7e-bc0b-7710c6ba8a1e
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_8700_3.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 300005; int f[maxn], n; struct struc { long long a[maxn]; int go[19][maxn], nxt[maxn]; void build(int ty = 0) { if (!ty) { for (int i = 1; i <= n; i++) scanf("%lld", &a[i]); for (int i = n; i; i--) a[i] += a[i + 1]; } static ma...
ALGO
0.999938
3.37334
ce86f186-7361-45f4-84ff-2c47ca11e4c6
ACELab-SHU/LCTES-25-Artifact
zoozve/llvm/tools/llvm-mt/llvm-mt.cpp
#include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" #include "llvm/Support/Error.h" #include "llvm/Support/FileOutputBuffer.h" #include "llvm/Support/InitLLVM.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/PrettyStackTrace.h" #in...
TOOL
0.88836
7.679262
94a3b858-aac8-49c4-ace8-29615acd6da6
akashghadge/competitive-programming
A2OJ/Ladder1/difficulty 3/71 B. Big Segment.cpp
#include <bits/stdc++.h> using namespace std; #define en "\n" #define vi vector<int> #define vii vector<vector<int>> #define vll vector<ll> #define ll long long #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); int sol(vector<pair<int, int>> arr, int n) { int mn = IN...
ALGO
0.999972
4.757175
434a3162-7efd-49b4-a621-b6faaafb674b
Johannyjm/c-pro
AOJ/Volume21/2199_2.cpp
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep1(i, n) for (int i = 1; i < (n); ++i) using namespace std; typedef long long ll; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); while(1){ int n, m; cin >> n >> m; ...
ALGO
0.999805
3.165224
4ea4f1ee-ea0c-4e69-821e-9083f8f781a8
PulkitAsri/DSA
AtCoder/BeginnerContests/242/A_-_T-shirt.cpp
#include <bits/stdc++.h> //#include <algorithm> //#include <vector> //#include <string> //#include <math.h> #define int long long #define endl "\n" using namespace std; void solve() { double a,b,c,x; cin>>a>>b>>c>>x; double ans=0; if(x<=a){ ans=1.0; }else if(x<=b and x>=(a+1)){ ...
ALGO
0.999594
3.656434
a683fe02-c2a7-4944-8111-3d50cb78f40c
assaferan/quinary_birch
src/Integer.cpp
#include "birch_util.h" #include "Integer.h" template class Integer<Z>; template class Integer<Z64>; template class Integer<Z128>; template class Integer<W16>; const std::vector<int> hilbert_lut_odd = { 1, 1, 1, 1, 1, 1,-1,-1, 1,-1,...
ALGO
0.999254
6.302399
5fcc7639-d997-4ad8-9448-1f1daf16530d
dnoiz1/ruxcoin
src/pow.cpp
#include "pow.h" #include "arith_uint256.h" #include "chain.h" #include "primitives/block.h" #include "uint256.h" #include "util.h" // This is MIDAS (Multi Interval Difficulty Adjustment System), a novel getnextwork algorithm. It responds quickly to // huge changes in hashing power, is resistant to time warp attacks...
ALGO
0.999144
6.686211
0cadf832-0b2e-49b6-aca4-747f31ba8449
abhijiths94/gem5
src/systemc/tests/systemc/misc/unit/data/datawidth_bool_to_signed/truncation/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.96314
5.642178
16ee0a9c-36cb-43d2-9c65-c37144b898a4
nickchen111/Leetcode
Math/73. Set Matrix Zeroes.cpp
/* 73. Set Matrix Zeroes */ //Best Method class Solution { public: void setZeroes(vector<vector<int>>& matrix) { int m = matrix.size(); int n = matrix[0].size(); //此題特色在於[0,0]這個位置不能先做 先處理第一行開始的行列 將它加入到最左或者最上排中 bool row = false; bool col = false; for(int i = 0; i<m; i++){ ...
ALGO
0.998334
6.202806
11f8bd40-2fbb-48db-94dc-1eefab27d257
vivekup3424/Coding_Problems
leetcode/cpp/48.cpp
#include <bits/stdc++.h> using namespace std; int main() { } class Solution { public: void rotate(vector<vector<int>> &matrix) { vector<vector<int>> temp = matrix; int x = matrix.size(), y = matrix[0].size(); for (int i = 0; i < x; i++) { for (int j = 0; j < y; j++)...
ALGO
0.999912
5.100475
9dedd30c-30f8-4c9e-aacd-7ecbefe3b78a
zeroplusone/AlgorithmPractice
Other/2020hashcode/googleBook_v10.cpp
#include <bits/stdc++.h> using namespace std; #define ForN(i,n) for (i=0; i<n; i++) #define For1N(i,n) for (i=1; i<=n; i++) #define ForAB(i,a,b) for (i=a; i<=b; i++) #define ForNR(i,n) for (i=(n)-1; i>=0; i--) #define For1NR(i,n) for (i=n; i>0; i--) #define ForABR(i,a,b) for (i=b; i>=a; i--) #define ForBE(i,s) for (i=...
ALGO
0.999861
3.137851
a515add3-5758-407a-9395-409b60d58d52
xyb7910/cpp_fire
luogu/前缀和&差分/语文成绩.cpp
/* * @Author: Yanpb * @Date: 2025-01-03 15:36:42 * @Last Modified by: Yanpb * @Last Modified time: 2025-01-03 16:40:03 */ #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <unordered_map> #include <unordered_set> #include <queue> #define x first #define y secon...
ALGO
0.999833
3.469414
6755c8dc-a17b-4b91-a282-75b8fff1e94b
jisber/CS140
CS140/lab11/src/submit/avltree_lab.cpp
//Jacob Isber //Lab 11 //12/04/2019 //rev 1 #include <vector> #include <string> #include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include "avltree.hpp" using namespace std; using CS140::AVLTree; using CS140::AVLNode; //Function prototypes bool imbalance(...
ALGO
0.999373
5.162564
bb43dd6b-ea90-414c-8adc-fc80e9cac253
Ankan121/Buttton_FloatingActionButton_GridView
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.998784
6.761023
b4944a82-f01c-4f69-b035-028a8657d7c8
sarvex/leetcode-beef
solution/1000-1099/1049.Last Stone Weight II/Solution.cpp
class Solution { public: int lastStoneWeightII(vector<int>& stones) { int s = accumulate(stones.begin(), stones.end(), 0); int n = s >> 1; vector<int> dp(n + 1); for (int& v : stones) for (int j = n; j >= v; --j) dp[j] = max(dp[j], dp[j - v] + v); ...
ALGO
0.999891
5.506989
7d632f71-9516-47ee-8514-78d604c93b23
Radglay/cpp_qa
src/stl/sequence_containers/list/remove_if/main.cpp
#include <iostream> #include <list> int main() { std::list<int> list1 { 1, 1, 2, 3, 2, 2, 3, 3, 1, 1, 1 }; std::cout << "list1: "; for (int e : list1) std::cout << e << ' '; std::cout << '\n'; list1.remove(1); std::cout << "list1: "; for (int e : list1) std::cout << e << ...
ALGO
0.898972
5.124673
e456dae3-4d3a-43bf-949d-0c221fb6c433
anveshadixit/CrackYourPlacement_45DaysChallenge
0347-top-k-frequent-elements/0347-top-k-frequent-elements.cpp
class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { int n = nums.size(); unordered_map<int,int>mp; vector<int>v; for(int i=0;i<n;i++) { mp[nums[i]]++; } priority_queue<pair<int,int>> m; for( auto i : mp) { ...
ALGO
0.999987
6.013678
c5562729-a843-4d2e-b7d1-a7504f71c9a2
Aryasharma001/Codeforces
CodeForces/GNU C++14/1787A | Exponential Equation/192386958.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; if(n%2==0) cout<<(n/2)<<" "<<1<<endl; else cout<<"-1"<<endl; } return 0; }
ALGO
0.999886
4.301888
51a0685c-4eb4-4e04-8bd6-688bb04261ac
ishandutta2007/codeforces
s2speed/normal/987/B.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize ("Ofast") #define all(x) x.begin() , x.end() #define sze(x) (ll)(x.size()) #define mp(x , y) make_pair(x , y) #define wall cerr<<"--------------------------------------"<<endl typedef long long int ll; typedef pair<ll , ll> pll; typedef pair<int , int...
ALGO
0.999986
3.549011
ca3b0932-7993-4662-be6f-d288082a60cd
SuchitanKulkarni/CPP_Programing_Practice
Assignment No. 12/Pro19.cpp
/* 3. WAP to create array of n integers.Scan these n integers from user. Print the largest value from n integers.(use new operator) */ #include<iostream> using namespace std; int main() { int n; cout<<"Enter the n value : "<<endl; cin>>n; int * p = new int[n]; int i; cout<<"Enter the integers : "<<endl; ...
ALGO
0.998624
3.503294
73928ade-e524-400a-81a4-b9268eb65f70
ichn/3-code-for-ac
Codeforces/Codeforces Round #240 (Div. 1)/414A.cpp
#include <bits/stdc++.h> using namespace std; namespace my_useful_tools { #define rep(_i, _k, _j) for(int _i = _k; _i <= _j; ++_i) #define red(_i, _k, _j) for(int _i = _k; _j <= _i; --_i) #define reu(_i, _k, _j) for(int _i = _k; _i < _j; ++_i) #define Edges(_i, _u, _e) for(int _i = _e.head[_u]; _i != -1; _i = _e.next[...
ALGO
0.999841
3.555328
abefd663-87db-4024-8889-5a12e5b4694e
chartcode99/music_player
music/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.998501
6.76775
43eb6b23-64a2-4c39-bf43-c92d5283f104
ishandutta2007/codeforces
tinsane/normal/12/D.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <iomanip> #include <queue> #include <vector> #include <map> #include <cmath> #include <string> #include <stack> #include <set> #include <algorithm> #include <list> #include <unordered_map> using namespace std; //8739 const double PI = 3.141592653589793...
ALGO
0.999926
3.784913
66575cc6-491a-4296-9b93-5157ee23e23a
egar-garcia/CarND-Path-Planning-Project
src/Eigen-3.3/unsupported/doc/examples/MatrixSinh.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { MatrixXf A = MatrixXf::Random(3,3); std::cout << "A = \n" << A << "\n\n"; MatrixXf sinhA = A.sinh(); std::cout << "sinh(A) = \n" << sinhA << "\n\n"; MatrixXf coshA = A.cosh(); std::cout << "cosh(A) = \n"...
ALGO
0.975474
5.890235
c42b3a1d-d966-4233-ac47-af240c817a1f
carlostapiarq/TopoLite
test/Interlocking/Problem_LP_bigm.cpp
// // Created by Robin Jodon on 19.04.20. // #include <cassert> #include <iostream> #include "Problem_LP_bigm.h" using namespace Ipopt; const double COIN_DBL_MAX = std::numeric_limits<double>::max(); /********************************************************************************/ /****BIG M WITH A GIVEN LAMBDA P...
ALGO
0.999149
6.432339
15285e2c-b078-400a-9048-432c12377275
mariamnousseir/linked-list-ds
include/LinkedList.cpp
#include "LinkedList.h" // Constructor LinkedList::LinkedList() : head(nullptr), length(0) {} // Destructor LinkedList::~LinkedList() { if (head != nullptr) { Node* tail = head; while (tail->next != nullptr && tail->next != head) { tail = tail->next; } if (tail->next ==...
ALGO
0.998863
5.381511
93201253-5d19-4245-bc05-4bc6dcf24b55
jonkstro/energiapp-mobile
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
a78d5298-e6be-4254-87c0-c7ec364643c2
StyleList94/problem-solving
baekjoon/10971.cpp
#include<iostream> #include<vector> using namespace std; int n; vector<vector<int>> dist; int min(int a, int b) { return a < b ? a : b; } // 지금까지의 경로 path와 방문여부가 주어졌을 때, 최소비용을 반환한다 int shortestPath(vector<int>& path, vector<bool>& visited, int currentLength) { // 기저 사례: 모든 경로를 탐색 했을 때 if (path.size() == n) { /...
ALGO
0.999893
4.082686
1bd5f467-bae7-45f4-af86-b85be62e9e21
MaYatao/studydemo
OpenJDK12/src/hotspot/share/services/virtualMemoryTracker.cpp
#include "precompiled.hpp" #include "logging/log.hpp" #include "memory/metaspace.hpp" #include "runtime/atomic.hpp" #include "runtime/os.hpp" #include "runtime/threadCritical.hpp" #include "services/memTracker.hpp" #include "services/virtualMemoryTracker.hpp" size_t VirtualMemorySummary::_snapshot[CALC_OBJ_SIZE_IN_TY...
TOOL
0.914132
5.545416
9d2c35d2-5592-4484-a988-5f74475fdd35
TonChan0828/AtCoder
BootCampForBeginners/1_easy100/ex063.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> bool chmax(T &a, const T &b) { if (a < b) { a = b; // aをbで更新 return true; } return false; } template <typename T> bool chmin(T &a, const T &b) { if (a > b) { a = b; // aをbで更新 return true; } return f...
ALGO
0.999962
3.73181
21d6d6be-51b7-454a-8fb6-0d23a65ea1c9
ishandutta2007/codeforces
deemo/normal/612/A.cpp
#include<iostream> #include<string> using namespace std; int main(){ int n, p, q; cin >> n >> p >> q; string s; cin >> s; for (int i = 0; i * p <= n; i++){ int t = n - i * p; if (t % q) continue; cout << i + t / q << endl; for (int j = 0; j < i; j++){ for (int w = 0; w < p; w++) cout << s[j * p ...
ALGO
0.999824
3.223621
e217859c-e9c1-4ca6-b2d3-bc20f5444b0b
harshit7962/LeetCode-Solutions
Minimum Cost of ropes - GFG/minimum-cost-of-ropes.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to return the minimum cost of connecting the ropes. long long minCost(long long arr[], long long n) { priority_queue<long long, vector<long long>, greater<long long>> pq;...
ALGO
0.999917
5.825256
3624fe3b-87a1-4567-b6d2-04cf3ebc02f2
Poojan987/Competitive-Programming-CP
codeforces/DIV2_706/template.cpp
#include <iostream> #include <bits/stdc++.h> #include<set> #include<stddef.h> #include<stdlib.h> #include <unordered_set> #include<unordered_map> #include<map> #include<string> #include<ctype.h> #include <queue> // #pragma GCC optimize "trapv" typedef long long int ll; using namespace std; #define f(abcd,n) for(int ab...
ALGO
0.99981
4.189606
ecd4961e-7b8d-4a1f-ac48-0f9105c64ff7
ishandutta2007/codeforces
sonechko/normal/1307/B.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define mp make_pair #define pb push_back const int N = 1e6 + 11; int a[N]; void up() { int n,x; cin>>n>>x; int ans=1e9; for (int i=1; i<=n; i++) { cin>>a[i]; if (x==a[i]) ans=min...
ALGO
0.999899
3.781437
3439a99e-bfdd-4a5c-825f-362913ea5b9f
kriti-002/Coding-Solutions
Minimum Operations - GFG/minimum-operations.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int minOperation(int n) { //code here. if(n==0 or n==1) return 1; if(n&1) return 1+ minOperation(n-1); return 1+ minOperation(n/2); } }; //{ Driver...
ALGO
0.999954
6.30855
72d72bf3-229f-44cc-b0cc-3b88edd802f0
ahmedfawzy98/Competitive-Programming
UVa problems/solutions/401/main.cpp
#include <iostream> using namespace std; bool isPalindrome(string word){ int start = 0, end = word.length() - 1; while(start < end){ if(word[start] != word[end]){ return false; } start++; end--; } return true; } bool isMirrored(string word){ int start = 0...
ALGO
0.99882
4.124101
1b26b309-43fc-4466-a861-0a9f9e483903
NafiHasan/HabiJabi
Notebook_Generator/Notebook Generator/code/Math/Polynomial Multiplication/FFT.cpp
typedef cplx cd; //define N as a power of two greater than the size , → of any possible polynomial using cd = complex<double>; const double PI = acosl(-1); int rev[N]; cd w[N]; static cd f[N]; void prepare(int &n) { int sz = __builtin_ctz(n); for (int i = 1; i < n; i++) rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (sz -...
ALGO
0.999953
3.485861
e5e6aae5-ff06-4b6a-827e-71bdcd830f80
ashraf452b/Competitive-programming
Learning Phase/Data structure/Week 5/M18/Maximum_height.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node* left; Node* right; Node(int val) { this->val=val; this->left=NULL; this->right=NULL; } }; Node* input_tree() { int val; cin>>val; Node* root; queue<Node*> q; if(val==...
ALGO
0.999367
4.215445
cfb34759-4280-4314-b309-9063659fbd8b
Acrsahil/100_Days_DSA
Competetive_Coding/_Profitable_Interest_Rate.cpp
#include <bits/stdc++.h> using namespace std; #define F(i, n) for (int i = 0; i < n; i++) #define vi vector<int> #define ln long long int #define test int t; cin >> t; while (t--) #define ll long long #ifndef ONLINE_JUDGE #define debug(x) cerr << #x << " -> "; _print(x); cerr << endl #else #define debug(x) #endif vo...
ALGO
0.999886
3.647985
6e44c383-0f76-48a1-a768-8c8d6fa10b10
splucs/Competitive-Programming
Codeforces/Rounds/854/A.cpp
#include <bits/stdc++.h> using namespace std; int gcd(int x, int y) { if (y == 0) return x; return gcd(y, x%y); } int main() { int n; scanf("%d", &n); int a = -1000, b = 1000; for(int i=1; i<n; i++) { int j = n-i; if (i > j) continue; if (gcd(i, j) != 1) continue; if (j-i < b-a) { b = j; a = i; ...
ALGO
0.999538
3.668744
90cd1acf-e0f5-449b-a82a-58615ca5516b
rajeev82604/DSA-practice
negi sheet questions/test2.cpp
#include<bits/stdc++.h> using namespace std; void display(int arr[],int n); int main(){ int a[]={0,2,1,2,0}; int n = 5; int count0 = 0; int count1 = 0; int count2 = 0; for(int i = 0 ; i<n ; i++) { if(a[i]==0) { count0++; ...
ALGO
0.999924
3.428127
1755ac1d-bec9-482a-ad50-b25db4fcdfb1
Sajjad617/Problem-Solving-for-Cpp
CodeForce/C_Game_of_Mathletes.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define endll '\n' #define Y cout << "YES" << endll #define no cout << "NO" << endll #define nl cout << endll void game() { // string s1; // cin >> s1; int n, k; cin >> n >> k; vector<int> v(n); for (int i = 0; i < n; i++) ...
ALGO
0.99979
5.193081
2cd18baa-6072-448c-b047-36e6df34543f
das6013/Homework-University
sort/Shell Sort.cpp
// ConsoleApplication28.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> #include <cmath> using namespace std; int lengaps(int size) { int h = 0; int j = 0; while (3*h < size) { if (j % 2 == 0) { h = 9 * pow(2, j) - 9 * pow(2, j / 2) + 1; } ...
ALGO
0.999869
4.250181
feb583cb-18ad-42cc-b8a1-12872b56bd30
Sb1414/temporarily
tasks/sort.cpp
#include <chrono> #include <fstream> #include <iostream> #include <random> #include <vector> using namespace std; int insertionSort(vector<int>& arr) { int n = arr.size(); int comparisons = 0; for (int i = 1; i < n; ++i) { int key = arr[i]; int j = i - 1; while (j >= 0 && arr[j] > key) { arr[j ...
ALGO
0.987331
4.74839
a0caf476-4a22-4e44-8b92-5c336e3cd233
akhilr007/Leetcode-problems
Number of Distinct Islands - GFG/number-of-distinct-islands.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: void dfs(int row, int col, vector<vector<int>>& grid, vector<vector<int>>& vis, vector<pair<int, int>>& vec, int row0, int col0){...
ALGO
0.999883
7.106079
68f9617c-55fa-40ea-8c56-14457e4b37cc
lyz05/Sources
ACM/19天梯杯复盘/L1-5.cpp
#include <bits/stdc++.h> using namespace std; double n,m,ans; int main() { cin >> n >> m; ans = 1.0*n/m/m; printf("%.1f\n",ans); if (ans>25) cout << "PANG" << endl; else cout << "Hai Xing" << endl; return 0; }
ALGO
0.99901
3.149681
16a4d3e9-b6f4-479d-9265-c57266f6d365
004527626/university
501/src/main.cpp
#include <transition_table.h> #include <cstdlib> #include <cstdio> int main(int argc, char **argv) { if (argc != 2) { crash("Usage: ./fa_to_regex <fa_file_name>"); } transition_table table = load({argv[1]}); printf("%s\n", fa_to_regex(table).c_str()); }
ALGO
0.967016
5.327952
d0b4312b-27c2-46d3-b450-fa9370075adb
xpbeyo/computer-graphics-algorithms
computer-graphics-mass-spring-systems/main.cpp
#ifdef SPARSE #include "fast_mass_springs_precomputation_sparse.h" #include "fast_mass_springs_step_sparse.h" #else #include "fast_mass_springs_precomputation_dense.h" #include "fast_mass_springs_step_dense.h" #endif #include "read_json.h" #include <igl/get_seconds.h> #include <igl/opengl/glfw/Viewer.h> #include <Eigen...
ALGO
0.899656
5.61084
110fa757-9992-4ad9-918e-679bf9bda4d8
AungPyaePhyo2110/DataStructuresAndAlgorithms
AVLTreeNoComments.cpp
#ifndef __PROGTEST__ #include <cassert> #include <cstdarg> #include <iomanip> #include <cstdint> #include <iostream> #include <memory> #include <limits> #include <optional> #include <array> #include <random> #include <type_traits> // We use std::set as a reference to check our implementation. // It is not available in...
TEST
0.963374
6.727595
e6123c9d-d781-49f1-ab19-6ac6f357ec76
heyimShivam/Algorithm
patternsearching/naivealgo.cpp
// C program for Naive Pattern Searching algorithm #include <stdio.h> #include <string.h> void search(char* pat, char* txt) { int M = strlen(pat); int N = strlen(txt); /* A loop to slide pat[] one by one */ for (int i = 0; i <= N - M; i++) { int j; /* For current index i, check for pattern match */ for (j ...
ALGO
0.999959
6.081826
ad12ee74-2ce6-4823-9af9-f53ac028d508
gilangbayuw/pratikum3
latihan1.cpp
#include <iostream> using namespace std; int main() { int i=0; int max=0; int n,a; cout << "masukan jumlah bilangan: "; cin >> n; for (i;i<n;i++) { cout << "masukan bilangan ke-" << i+1 << ": "; cin >> a; if (a > max) max = a; } cout << "bilangan...
ALGO
0.998802
3.821308
2e6f78c8-1623-419d-963a-5a89f01d43d0
Promethe-us/gtsam
gtsam/3rdparty/Eigen/bench/sparse_lu.cpp
// g++ -I.. sparse_lu.cpp -O3 -g0 -I /usr/include/superlu/ -lsuperlu -lgfortran -DSIZE=1000 -DDENSITY=.05 && ./a.out #define EIGEN_SUPERLU_SUPPORT #define EIGEN_UMFPACK_SUPPORT #include <Eigen/Sparse> #define NOGMM #define NOMTL #ifndef SIZE #define SIZE 10 #endif #ifndef DENSITY #define DENSITY 0.01 #endif #ifnd...
ALGO
0.998552
4.187482
278a23ed-bf9c-4081-bba4-5691e1f92c0b
utsavtyagi01/Leetcode
Find_Valid_Matrix_Given_row_And_Column_Sum.cpp
class Solution { public: vector<vector<int>> restoreMatrix(vector<int>& rowSum, vector<int>& colSum) { int row = rowSum.size(); int col = colSum.size(); vector<vector<int>> result(row, vector<int>(col, 0)); int i = 0, j = 0; while (i < row && j < col) { int val ...
ALGO
0.999989
6.594373
ba2be7d1-6a50-4c42-9867-e168cdd42ed5
danielguterding/pytricubic
thirdparty/eigen3/doc/examples/nullary_indexing.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; // [functor] template<class ArgType, class RowIndexType, class ColIndexType> class indexing_functor { const ArgType &m_arg; const RowIndexType &m_rowIndices; const ColIndexType &m_colIndices; public: typedef Matrix<typename ArgType::Scalar, ...
ALGO
0.988388
7.076005
4628a72e-70da-4185-8c85-cb0568ff5020
Masuzu/RumourPropagation
BP/BP/snap-core/ff.cpp
///////////////////////////////////////////////// // Forest Fire void TForestFire::InfectAll() { InfectNIdV.Gen(Graph->GetNodes()); for (TNGraph::TNodeI NI = Graph->BegNI(); NI < Graph->EndNI(); NI++) { InfectNIdV.Add(NI.GetId()); } } void TForestFire::InfectRnd(const int& NInfect) { IAssert(NInfect < Graph-...
ALGO
0.99907
4.793166
3341e9b6-9753-4dd6-b2c4-11f7a0055e79
jayambe36/GFG-Problem-Of-The-Day
Medium/Find the N-th character/find-the-nth-character.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: char nthCharacter(string s, int r, int n) { string temp=""; for(int i=0;i<r;i++) { int j=0; while(temp.length()...
ALGO
0.999865
5.056566
8a895dcf-90ad-4673-82e3-c41103436b66
ksw51101/Algorithm
Baekjoon/Baekjoon/1091.cpp
#include <iostream> #include <vector> using namespace std; int n; // ī带 ϴ Լ vector<int> shuffle(vector<int> s, vector<int> p) { vector<int> temp(n); for (int i = 0; i < n; i++) { temp[s[i]] = p[i]; } return temp; } int main() { cin >> n; vector<int> p(n), s(n), target(n); for (int i = 0; i < n; i++) { ci...
ALGO
0.999956
3.655061
6d4e0869-4f36-40f9-b5f8-3c2597af5056
landispro/LANDIS_PRO_7.1
Harvestdll/source/MultiplePocketStandHarvester.cpp
#include <assert.h> #include "point.h" #include "system1.h" #include "GlobalVariables.h" #include "GlobalFunctions.h" #include "Stand.h" #include "SiteHarvester.h" #include "StandIterator.h" #include "BoundedPocketStandHarvester.h" #include "MultiplePocketStandHarvester.h" MultiplePocketStandHarvester::Multip...
ALGO
0.987109
4.457301
df5cc340-55fa-422e-b3ed-ea2ccb3afbc3
xakep8/cp_solutions
insomnia_cure.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int k,l,m,n,d; vector<int> v; cin>>k>>l>>m>>n>>d; for(int i=0;i<=d;){ if(i!=0){ v.push_back(i); } i+=k; } for(int i=0;i<=d;){ if(i!=0){ v.push_back(i); } i+=l; } for(int i=0;i<=d;){ if(i!=0){ v.push_back(i); } i+=m; } for(int...
ALGO
0.999891
3.070038
ec95347f-722f-4277-925b-2aa66d0965a0
k-kmw/algorithm
C++/브루트포스/2798.cpp
#include <bits/stdc++.h> using namespace std; int n, m; int card[101]; bool vis[101]; int ans; void choice(int k, int tmp) { // 한 장의 카드를 고른다. if(k == 3) { if(tmp <= m) ans = max(ans, tmp); // cout << tmp << '\n'; return ; } for(int i=0; i<n; i++) { if(!vis[i]) { ...
ALGO
0.999963
4.407035
e416bb71-e095-48fa-8933-73bfd01bd5b8
kovinz/RandomLearningProjects
C projects/6D/main.cpp
#include <iostream> #include <vector> #include <fstream> using namespace std; /** * go though connected points, remember to which component it's connected and remember that we were at this point * if we didn't attend a neighbout then start dfs from there * @param u current point * @param graph - vector of vectors ...
ALGO
0.999887
5.018795
c84c2284-444e-438b-914a-37609dce53aa
Yashkothari9/CPP-CODES
binary_subsequence_rotation.cpp
#include<bits/stdc++.h> using namespace std; int check_rot(string s,string t,vector<int> pos) { int count=0,flag=1; for(int j=0;j<pos.size();j++) { count++; int tmp=t[pos[0]]; //cout<<"tmp:"<<tmp<<" "; for(int i=0;i<pos.size()-1;i++) { t[pos[i]]=t[pos[i+1]...
ALGO
0.999994
4.219641
70a3904d-4112-4b97-81ed-e379bb119713
eduardammag/ProjetoAnaliseDeAlgoritmos
Grafos/Busca/busca_em_grafos.cpp
#include <iostream> #include <vector> // Definição do tipo vertex como um inteiro typedef int vertex; // Classe Graph para representar o grafo com vértices e arestas class Graph { public: int m_numVertices; // Número de vértices no grafo std::vector<std::vector<bool>> adj; // Matriz de ad...
ALGO
0.999626
6.804107
2af81f58-dbc0-4a58-bb59-d8ec507e107f
ishandutta2007/codeforces
fairywinx/normal/1010/C.cpp
#include <iostream> #include <vector> #include <set> using namespace std; int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } int main() { #ifdef LOCAL freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); #endif ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, k; ...
ALGO
0.999981
3.486416
7d3a7e96-26a3-4e0f-bdd2-97a35d5d050a
sarvex/leetcode-v
lcof2/剑指 Offer II 089. 房屋偷盗/Solution.cpp
class Solution { public: int rob(vector<int>& nums) { if (nums.size() == 1) { return nums[0]; } int n = nums.size(); vector<int> dp(n, 0); dp[0] = nums[0]; dp[1] = max(nums[0], nums[1]); for (int i = 2; i < n; i++) { dp[i] = max(dp[i - ...
ALGO
0.999886
6.17652
d6d20c43-7ecc-45f9-a508-a10ba2295efe
Zhu-Bei-Jian/ACM-Template
Template/图论/带花树.cpp
//带花树 一般图最大匹配 #define RG register const int MAX_P = 300 * 2 + 600 + 123; const int MAX_EDGE = 300 * 600 * 6 + 123; inline int read() { RG int x = 0, t = 1; RG char ch = getchar(); while ((ch < '0' || ch>'9') && ch != '-')ch = getchar(); if (ch == '-')t = -1, ch = getchar(); while (ch <= '9' && ch >= '0')x = x * 1...
ALGO
0.999517
3.548133
53b4c3f5-d4cb-4ce0-86a7-f674b14f4043
sarvex/leetcode-cyber
solution/1300-1399/1385.Find the Distance Value Between Two Arrays/Solution.cpp
class Solution { public: int findTheDistanceValue(vector<int>& arr1, vector<int>& arr2, int d) { int ans = 0; for (int& a : arr1) ans += check(arr2, a, d); return ans; } bool check(vector<int>& arr, int a, int d) { for (int& b : arr) if (abs(a - b) <=...
ALGO
0.999941
5.912251
1ef00842-86b5-47a5-8e00-725a5109747d
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1704_0.cpp
#include <bits/stdc++.h> using namespace std; double EPS = 1e-9; int INF = 2000000000; long long INFF = 8000000000000000000LL; double PI = acos(-1); int dirx[8] = {-1, 0, 0, 1, -1, -1, 1, 1}; int diry[8] = {0, 1, -1, 0, -1, 1, -1, 1}; inline string IntToString(int a) { char x[100]; sprintf(x, "%d", a); string s =...
ALGO
0.999529
4.421209
26cbdb33-0cd3-4e53-9aff-807200507cb9
devashish-rane/CPAlgorithms
snippets/primes.cpp
#include<bits/stdc++.h> using namespace std; #include <bits/stdc++.h> using namespace std; //segmented sieve without prime generation (returns boolean array for range [useful for ranges] ) vector<bool> segmentedSieveNoPreGen(long long L, long long R) { vector<bool> isPrime(R - L + 1, true); long long lim = ...
ALGO
0.999627
4.954928
c88a03e0-19b1-4adc-b16f-7f2e0d1ba049
duongdanday/DSA_VT_PTIT
CON9_11_TimDuongDi_theoDFS_voi_DoThiCoHuong.cpp
#include<bits/stdc++.h> using namespace std; int n, m, s, t; vector<int> adj[1001]; bool visited[1001]; int truoc[1001]; void dfs(int u){ visited[u] = true; for(int v : adj[u]){ if(!visited[v]){ truoc[v] = u; dfs(v); } } } void path(int s, int t){ memset(visit...
ALGO
0.999922
3.941492
09eba713-9bb7-464b-bb15-d4911cf8cfd9
llynv/CP-files
1741F.cpp
/* Code by: linvg Created: 19.12.2024 15:40:32 */ #include <bits/stdc++.h> using namespace std; #define int long long #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) string to_upper(string a) { for (int i = 0;i < (int)a.size();++i) if (a[i] >= 'a' && a[i] <= 'z') a[i] -= 'a' - 'A'; return a;...
ALGO
0.99991
5.70845
96c7737b-44f1-43c0-82a5-bed179c5ed66
pranay2063/Algorithms
TREE/SEGMENT-TREE/RANGE MINIMUM QUERY.cpp
//Range Minimum Query //Segment Trees Basic Application of finding minimu in a range #include<bits/stdc++.h> using namespace std; int segtree[4*1000000]; int query(int left,int right,int l,int r,int index) { if(left>r || right<l) return INT_MAX; else if(left>=l && right<=r) return segtr...
ALGO
0.999931
4.863731
e73aaa2f-b392-4b12-accb-dcf4949622ab
soli1411/hackerrank-solution
Algorithms/Greedy/Sherlock and MiniMax.cpp
//Sherlock and MiniMax hackerrank solution #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <climits> using namespace std; int main() {int n,p,q;cin>>n; vector <int> a(n); for (int i=0;i<n;i++) cin>>a[i]; cin>>p>>q; sort(a.begin(),a.end()); vector <int> ...
ALGO
0.999965
3.471021
24f8f4a1-6719-4e18-9f82-ff9ec5ae40e1
jingtaozhang18/algorithm-exercises
code-interview/第3章 二叉树问题/3-通过先序和中序数组生成后序数组.cpp
#include<bits/stdc++.h> using namespace std; int pre[10002]; int in[10002]; int tree[10002][2]; int build(int L, int R, int in_L, int in_R){ // 返回这部分的根节点 if(L==R) return pre[L]; int root=pre[L],i; for(i=in_L;in[i]!=root;++i); if(i-in_L) tree[root][0]=build(L+1,L+i-in_L,in_L,i-1); if(in_R-i) tree[root][1]=bu...
ALGO
0.999995
3.738324
23b7ada6-62eb-4852-8d71-2237bc2d6e29
bossxu/acm
dp/代码/状态压缩/zoj3471.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<queue> #include<stack> #include<vector> #include<cmath> #include<set> #include<cstdlib> #include<functional> #include<climits> #include<cctype> #include<iomanip> using namespace std; typedef long long ll; #define INF 0x3...
ALGO
0.999808
3.424334
dea6ff7a-b935-4331-b9ed-0a0efd25c403
hsiuqnav/LeetCode
LeetCode/Median of Two Sorted Arrays.cpp
#include <iostream> #include <vector> using namespace std; class Solution{ public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { int m = nums1.size(); int n = nums2.size(); if (m == 0 && n == 0) return 0; if ((m + n) % 2 == 0) { double res1 = findNumbers(nums1, nums2, (m + n) /...
ALGO
0.999996
5.812871
cde68bfe-d22c-4f43-902f-f5acdfad286b
sugikazu75/atcoder
submissions/atcoder.jp/arc050/arc050_b/Main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) #define all(v) v.begin(), v.end() int main(){ long long r,b; cin >> r >> b; long long x,y; cin >> x >> y; long long ok = 0; long long ng = r + b; while(abs(ok - ng) > 1){ long long mid =...
ALGO
0.999748
3.511516
f2d70fb9-60e5-4cec-a2c7-7defa784c90b
ishandutta2007/codeforces
74traktor/normal/1303/E.cpp
#include<bits/stdc++.h> using namespace std; int dp[405][405]; int inf = 1e9; main() { #ifdef HOME freopen("input.txt", "r", stdin); #endif // HOME ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int T; cin >> T; while (T--) { string s, t; cin >> s >> t; if...
ALGO
0.999991
5.261053
b18226d1-b5c8-4537-b0d6-83967d5c1356
remidbs/FaceDetectionProject
cascadeReader.cpp
#include <iostream> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/objdetect/objdetect.hpp> #include "cascadeReader.h" #include "image_tools.h" using namespace std; using namespace cv; int detectBestFace(string filename) { string path = "../pics/" + filename + ".j...
ALGO
0.955503
5.544467
cbb5619d-ba02-478e-be56-1cd14a1d09f7
funnychris/godot
thirdparty/oidn/mkl-dnn/src/cpu/ref_inner_product.cpp
#include "c_types_map.hpp" #include "type_helpers.hpp" #include "mkldnn_thread.hpp" #include "mkldnn_traits.hpp" #include "math_utils.hpp" #include "ref_inner_product.hpp" namespace mkldnn { namespace impl { namespace cpu { using math::saturate; using math::get_bias; template <data_type_t src_type, data_type_t wei_...
ALGO
0.999232
7.430153
c6ca54da-7d2f-496a-927d-46ff901461b1
Time1ess/MyCodes
LeetCode/167-Two Sum II-Input array is sorted/solution.cpp
// Author: David // Email: <EMAIL> // Created: 2016-09-17 14:26 // Last modified: 2016-09-17 14:26 // Filename: solution.cpp // Description: int b_search(vector<int>& numbers, int start, int end, int target) { if(end<=start) return end; int mid = (start+end)>>1; if(numbers[mid]>=...
ALGO
0.999995
5.74147
d1b3cb87-9519-4b4b-89e1-4e1181a6504c
Sameerjha236/Leetcode
2441-largest-positive-integer-that-exists-with-its-negative/2441-largest-positive-integer-that-exists-with-its-negative.cpp
class Solution { public: int findMaxK(vector<int>& nums) { sort(nums.begin(), nums.end()); int i = 0, j = nums.size() - 1; while (i < j) { int a = abs(nums[i]), b = abs(nums[j]); int c = nums[i], d = nums[j]; if (a == b && c * -1 == d || d * -1 == c) ...
ALGO
0.999968
5.27327
9df8b520-08e7-4876-8dee-6c8590c12654
ishandutta2007/codeforces
vercingetorix/normal/1473/B.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <queue> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.999912
4.04116
6af1ddea-eb2d-48a7-80e8-10ae3b675f99
Anto-Saha00/If-else-program
Task-20.cpp
#include<iostream> using namespace std; int main () { char letter; cout<< "Enter a letter: "; cin>> letter; if ( letter== 'A' || letter== 'a' || letter== 'E' || letter== 'e' || letter== 'I' || letter== 'i' || letter== 'O' || letter== 'o' || letter== 'U' || letter== 'u' ) { cout<< "vowel"; } else { ...
ALGO
0.972497
4.372379
f1e085d2-3f1e-4aac-98e1-171ef44631e9
neelesh1112/LeetCode-GFG
Medium/Add two numbers represented by linked lists/add-two-numbers-represented-by-linked-lists.cpp
//{ Driver Code Starts // driver #include <bits/stdc++.h> using namespace std; /* Linked list Node */ struct Node { int data; struct Node* next; Node(int x) { data = x; next = NULL; } }; struct Node* buildList(int size) { int val; cin>> val; Node* head = new Node(val)...
ALGO
0.999567
5.967667
a8d8192e-cb90-448a-8f5b-84ba0af5ace1
insshubh/C-CMD-Interface
tree/create-tree.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node * left_node; Node * right_node; Node(int x) { data = x; left_node = NULL; right_node = NULL; } }; Node* Binary_tree() { int x ; cout<<"enter the Node value: "; cin>>x; if(...
ALGO
0.999849
4.847442
2768238e-830d-476d-a377-ffd6c14997d9
yogurrrr/DevOps-task
Source.cpp
#define _CRT_SECURE_NO_WARNINGS #include "stdio.h" #include "stdlib.h" #define SIZE 1000 #include <string.h> #include "structures.h" #include "functions.h" int main() { // FILE* input = fopen("input.txt", "rt"); printf("Expression:\n"); //char* str = (char*)malloc(sizeof(STACK)); char str[100] ...
ALGO
0.981469
3.122694
b31d252c-7ab2-4787-94a1-2e4ff297b6bf
DurgaSravanthiP/DSA-with-Cpp
linearSearch_vectors.cpp
#include<iostream> #include<vector> using namespace std; bool linearSearch(vector<int>&vec, int key){ for(int i:vec){ if(i==key) return true; } return false; } int main(){ vector<int>vec = {1,2,3,4,5,6}; int key = 5; if(linearSearch(vec,key)){ cout<<"Element is found"<<endl; ...
ALGO
0.999545
4.944738
a6e8b485-5b0c-41d2-bfcc-92e7ef2c5190
avinashpathak06/Leetcode-Questions
0010-regular-expression-matching/0010-regular-expression-matching.cpp
class Solution { public: bool isMatch(string s, string p) { unordered_map<string, bool> memo; return isMatchHelper(s, p, memo); } private: bool isMatchHelper(const string& s, const string& p, unordered_map<string, bool>& memo) { // Check if the result has already been com...
ALGO
0.999883
6.795497
c973a87b-a7d9-48da-900f-c239613f71e8
yottachain/YTBP
libraries/chain/transaction_metadata.cpp
#include <eosio/chain/transaction_metadata.hpp> #include <eosio/chain/thread_utils.hpp> #include <boost/asio/thread_pool.hpp> namespace eosio { namespace chain { const flat_set<public_key_type>& transaction_metadata::recover_keys( const chain_id_type& chain_id ) { // Unlikely for more than one chain_id to be used ...
TOOL
0.946175
6.720354
88391cbf-107c-4f84-8280-77305e325196
swgoldtw/Cracking-Coding-Interview-From-NTU
_0303_威言.cpp
#include <iostream> #include <stdlib.h> #include <vector> using namespace std; /** 3.3 Imagine a (literal) stack of plates. If the stack gets too high, it might topple. Therefore, in real life, we would likely start a new stack when the previous stack exceeds some threshold. Implement a data structure SetOfStacks that...
ALGO
0.961487
4.054254
8ebc3441-2f43-456a-ba6c-1ab0933d1cf2
refiel-l/caffe-libs
opencv/3rdparty/openexr/Half/half.cpp
// Primary authors: // Florian Kainz <<EMAIL>> // Rod Bogart <<EMAIL>> //--------------------------------------------------------------------------- // // class half -- // implementation of non-inline members // //--------------------------------------------------------------------------- #include <assert.h> ...
TOOL
0.862186
6.89263
8928449b-42a2-416e-b482-4ef5d9df9fb2
AatirNadim/cpp-solutions
Bit Manipulation/min_flips_to_make_or_equal.cpp
// problem link --> https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/ // my solution link --> https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/discuss/3610243/C%2B%2B-oror-0ms-oror-100-faster-oror-Bit-Manipulation-oror-Short-and-Simple class Solution { public: int minFlip...
ALGO
0.999877
5.894337
8baa60ff-43dc-4c96-923e-7c89639746b5
makio93/competitive-othersites
LeetCode/Explore/Learn/Linked_List/Chapter_2/Problem_3/main.cpp
#include <bits/stdc++.h> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; // 自力AC class Solution { unordered_set<ListNode*> visited; ListNode *search(ListNode *vnode) { if (vnode == NULL) retur...
ALGO
0.999975
5.331491
556e1294-c16f-4a1b-93e0-3dfe4e80661f
22388o/elements-1
src/policy/fees.cpp
#include <policy/fees.h> #include <clientversion.h> #include <fs.h> #include <logging.h> #include <streams.h> #include <txmempool.h> #include <util/serfloat.h> #include <util/system.h> static const char* FEE_ESTIMATES_FILENAME = "fee_estimates.dat"; static constexpr double INF_FEERATE = 1e99; std::string StringForF...
ALGO
0.962067
7.24774
d54576b3-c20f-4030-894a-21b5dc665c9c
kazunetakahashi/atcoder
2017/1105_ARC079/D.cpp
#include <iostream> #include <iomanip> // << fixed << setprecision(xxx) #include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ; #include <vector> #include <string> // to_string(nnn) // substr(m, n) // stoi(nnn) #include <complex> #include <tuple> // get<n>(xxx) #include <queue> #include <stack> #include <...
ALGO
0.99985
3.337791
297bbc4a-2e81-480d-a729-d90056f81c88
enrique95ae/CS111
HW9_part4_main.cpp
/* NAME: Enrique Alonso Esposito DATE: 10/29/2016 Program Description: Creating the given pattern. */ //TO FIX: //LAST LINE THE PROGRAM SKIPS THE LAST NUMBER #include <iostream> using namespace std; int main() { int aux; for(int i=6; i>=1; i--){ for(int x=1; x<i; x++){ c...
ALGO
0.999034
3.265087
619ec986-8cad-45eb-a83e-e872cd7afd35
CAgAG/Algorithms_CPP
algorithm2/14_test/17_graph_set.cpp
/************************* * @file : 17_graph_set.cpp * @encode : UTF-8 * @note : None * @date : 2024/6/11 11 *************************/ #include "iostream" #include "vector" #include "algorithm" using namespace std; class Solution { public: vector<int> parent; void init(int n) { parent =...
ALGO
0.999896
5.161353