uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d3fcd59c-1c54-4a14-bdab-0a76a0844854
JoshWolper/MountStHelens
eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; int main() { ArrayXXf a(2,2); a << 1,2, 3,4; cout << "(a > 0).all() = " << (a > 0).all() << endl; cout << "(a > 0).any() = " << (a > 0).any() << endl; cout << "(a > 0).count() = " << (a > 0).count() << endl...
ALGO
0.974532
3.841741
ee18e400-264c-4663-9f70-31bb5559fdf8
costashatz/3DTools
Examples/VectorsMatrices/main.cpp
#include <iostream> #include <3DTools/Helper.hpp> #include <3DTools/Matrix3D.hpp> using namespace std; using namespace Tools3D; /** * Simple Example using Vector3D and Matrix3D classes **/ int main() { //Vector Addition Vector3Df a = Vector3Df(10,7,1.5); Vector3Df b = Vector3Df(-2,1,2.1); Vector3Df c = a...
ALGO
0.889225
3.895174
7e168bb1-10ac-436e-9baf-146c9b3ee21d
shariar-opu/CFsolve
510A.cpp
#include <bits/stdc++.h> #define ll long long #define endl '\n' #define optimize() \ ios_base ::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define pb push_back #define pp pop_back #define ins insert #define pii pair<int, int> #define psi pair<string, int> #define fi(...
ALGO
0.999856
3.121242
9ecca3d8-037a-4072-a73f-8d8281f6fc52
Altu-Bitu-8/Altu-Bitu-KooJeewon
07_동적 계획법/Class_Time/2579-백준.cpp
//2579 - Silver3(̳ α׷) #include <iostream> #include <vector> using namespace std; int getMaxScore(int n, vector<int>& score) { //dp[i]: i° ܱ ?? ִ vector<int> dp(n + 1, 0); //ʱ갪 dp[1] = score[1]; dp[2] = score[1] + score[2]; //ȭ for (int i = 3; i <= n; i++) { // ĭ Ƿ ...
ALGO
0.999984
4.444661
d13495ca-f5df-4dbd-ba7a-9e417ed715ea
DS201810/DS_C-
chess.cpp.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #include<time.h> #include <string> #define BLACK 0 #define WHITE 1 #define EMPTY 2 struct Point { //点结构 int x, y; }; struct Step { //步结构 Point first, second; int value; }; int Board[19][19];//存储棋盘信息,其元素值为 BLACK, WHITE, EMPTY 之一 void change_nu...
ALGO
0.998035
3.198168
867d6977-f644-43f4-8ac9-3051983c381e
karanmanglani/LC
2227-sum-of-subarray-ranges/sum-of-subarray-ranges.cpp
using lli = long long int; class Solution { public: long long subArrayRanges(vector<int>& nums) { int n = nums.size(); vector<lli> nsi(n),psi(n),ngi(n),pgi(n); stack<int> st; for(int i = 0;i < n;i++){ while(!st.empty() && nums[st.top()] >= nums[i]) st.pop(); ...
ALGO
0.999989
4.649118
c487a237-b88f-43b1-ac5a-7065c1129fed
staeen/CPP-programs
recurMergeSort.cpp
/* Recursion Merge Sort space complexity =O(n) time complexity =O(nlogn) */ #include <iostream> using namespace std; void merge(int *arr, int s, int e) { int mid = s + (e - s) / 2; int len1 = mid - s + 1; int len2 = e - mid; int *first = new int[len1]; int *second = new int[len2]; // copy value...
ALGO
0.99992
5.286016
2c05625c-5624-453f-abd4-556019d2befa
rakesh2022/Slinding-Window
5_subtring_with_concatenation_of _all_words.cpp
https : // leetcode.com/problems/substring-with-concatenation-of-all-words/ // variation of find all anagrm of string class Solution { public: vector<int> findSubstring(string s, vector<string> &words) { unordered_map<string, int> table; vector<int> ans; if (words.size(...
ALGO
0.999297
5.715566
b1dd240e-4cc4-4e34-8e6f-90cf2eeeb62e
codeaholic-shub/ALGO-ADDICT
LEETCODE/C++/image-smoother.cpp
// Time: O(m * n) // Space: O(1) class Solution { public: vector<vector<int>> imageSmoother(vector<vector<int>>& M) { const auto& m = M.size(), &n = M[0].size(); vector<vector<int>> result(M); for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { result[i]...
ALGO
0.999359
7.086854
684da0a8-6dfa-485e-8624-72be289bd05f
YoungseokCh/problem-solving
baekjoon/6064.cpp
#include <stdio.h> int gcd(int a, int b){ if (b == 0){ return a; } else{ int r = a % b; return gcd(b,r); } } long long int lcm(int a, int b){ return a*b/gcd(a,b); } long long int year(int a, int b, int x, int y){ long long int L = lcm(a,b); for (int i=0;i<=L/x;i++){ long long int z = x+...
ALGO
0.99991
3.527216
b6062fa8-bfa6-4e34-b465-2a82f22f043b
meSAHAD/Phitron
Data_Structures/week 5/module 19/3.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class TreeNode { public: T data; TreeNode<T> *left; TreeNode<T> *right; TreeNode(T data) { this->data = data; left = NULL; right = NULL; } }; vector<int>...
ALGO
0.999924
5.159734
a9c50e4e-285d-4586-905f-50373ea4740e
om-mishra-it/CompetitiveProgramming
SumTwoArrays.cpp
//You are given two numbers 'A' and 'B' in the form of two arrays (A[] and B[]) //of lengths 'N' and 'M' respectively, where each array element represents a digit. //You need to find the sum of these two numbers and return this sum in the form of an array. vector<int> summationOfTwoArrays(vector<int>&arr1, int n, vect...
ALGO
0.999875
6.264349
c6e4145a-9bf2-4405-8b4d-1803de7a2554
kamdoumloich/Wissenschaftlisches_Rechnen_SS2019
Uebungsblatt_6/Uebung_2_und_3/trapezregel.cpp
#include "trapezregel.h" Trapezregel::Trapezregel(double a_, double b_, int size_) { a = a_; b = b_; size = size_; } Trapezregel::~Trapezregel() { a = 0; b = 0; size = 0; } double Trapezregel::qTrapez(Funktor &f, double a_, double b_) { return ((b_ - a_) * (f(a_) + f(b_))) / 2; } double ...
ALGO
0.90635
5.187016
d75f7b44-e0f4-42c1-8c4f-f92e99355501
Siddharth1121/Data-Science-Engineering
Semester 3/DS Lab/Week7/l7q2.cpp
#include <iostream> using namespace std; struct CircularQueueRepr { char *queue[5]; int max_size; int front; int rear; int count; }; int size(CircularQueueRepr *inst) { return inst->rear - inst->front; } bool isEmpty(CircularQueueRepr *inst) { return inst->count == 0; } bool isFull(CircularQueueRepr *inst) {...
ALGO
0.998405
4.916235
5e2d08b5-7e79-45b5-820b-6306d7d15cf2
f4t4nt/competitive-programming
archive/CodeForces/Regular/Rd761 Div2/paprikaandpermutation.cpp
#include <algorithm> #include <cmath> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <iomanip> #include <iterator> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <s...
ALGO
0.999467
4.817828
f3f8c0f5-db1d-4e12-be23-cba6586a38ff
filippodemartini/Esercitazione_6_Sorting
Esercizio_2/main.cpp
#include <iostream> #include <chrono> #include <vector> #include <random> #include "SortingAlgorithm.hpp" using namespace SortLibrary; using namespace std::chrono; double AVGTimeBS(vector<double>& v, const unsigned int & n) { vector<double> time; double avg_time = 0; time.reserve(n); for(unsigned int...
ALGO
0.998031
6.291238
f8936b5b-c215-433d-aef6-eb06b2296207
jki14/competitive-programming
2011/contest/BJO/proG_TLE.cpp
#include<iostream> #include<sstream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<climits> #include<algorithm> #include<vector> #include<string> #include<queue> #include<deque> #include<set> #include<map> using namespace std; #define N 51000 #define L 110 int T; int n...
ALGO
0.999368
3.75294
26097bdc-bf08-40b1-9312-2c2e7bda97f7
Wsh7Ash/LEETCODE
cpp/c501-1000/932.cpp
class Solution { public: vector<int> beautifulArray(int n) { vector<int> res = {1}; while(res.size() < n){ vector<int> temp; for(int num : res){ if(2 * num - 1 <= n){ temp.push_back(2 * num - 1); ...
ALGO
0.999919
5.281854
502917ba-8d2d-48b9-8f64-a8a3b555d34d
vijay4971/CODECHEF_SOL-n
CANDY123.cpp
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--) { int l,b; cin>>l>>b; int limit_l=0,limit_b=0; for(int i=0;;i++) { int k = (i+1)%2; if(k == 1) { limit_l+= i+1; if(limit_l>l) ...
ALGO
0.999825
3.24587
739dc6db-121b-44de-a794-acab58e39ec5
dkhonker/sysu
数据结构/数据结构实验课文件/EXP14/EXP14/for_test/source/20354068/spanforest.cpp
#include<stdio.h> #include<memory.h> #include<stdlib.h> const int maxn=5001; int *A[maxn]; int *B[maxn]; bool visited[maxn]; int d[maxn], n, edges; int dfs(int u){ //write this part by yourself //Hints, when u has an adjacent v which has not been visited, you should dfs(v) and choose the edge(u,v). //Note: whe...
ALGO
0.999583
3.324638
74c5dc11-b69e-42eb-b2ba-106f8cd89c94
iam1513/CPP-DSA
C65dPostOrderTraversalInABInTree.cpp
// PostOrder Traversal #include<iostream> using namespace std; class Node{ public: int val; Node* left; Node* right; Node(int value){ val = value; left = NULL; right = NULL; } }; void PostOrderTraversal(Node* rootNode){ // base case if(rootNode == NULL) retur...
ALGO
0.999902
5.175279
babbe548-dfc6-449b-9c6a-b8911df9cf68
aFlyBird0/LeetCodeCPlusCPlus
P0055.cpp
// // Created by BirdBirdLee on 2019/10/15. // 题目链接 https://leetcode-cn.com/problems/jump-game/ // 思路 就算全是1也能跳过去,所以只有出现0的时候才会有问题, // 扫描0的位置(最后一个不算),看看他们是否能跳到0的后一个 // #include "P0055.h" vector<int> P0055::generate() { vector<int> nums({3, 2, 1, 0, 4}); return nums; } bool P0055::canJump(vector<int> &nums...
ALGO
0.999892
4.941675
d1d7567d-ea81-4a78-aa52-cd9a481d6c33
ArpitaSatsangi/DSA-using-cpp
009. 2D array/Rotate 2D matrix by 90 degree (leetcode).cpp
class Solution { public: void rotate(vector<vector<int>>& matrix) { int row=matrix.size(); //transpose of the matrix for(int i=0;i<row;i++) { for(int j=0;j<i;j++) { swap(matrix[i][j], matrix[j][i]); } } //reverse ...
ALGO
0.999967
6.813877
c22169e9-3cfa-48e3-94ff-b186e45ced3e
9weeks-flutter-sfac/assignment-shinhye
day1/flutter_class/first_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.996783
6.763549
ada44769-f67e-4d26-b237-06d38d25070a
SteveSB/CompilerProject
FullCompilerProject/CSTokens/CSTokens/MyParser.cpp
#include "MyParser.h" #include <iostream> #include <string> MyParser::MyParser() { this->Symbol_Table = new SymbolTable(); } Class* MyParser::create_class(char* clasName, bool isInterface, InheritanceList* list_of_parent, Access_Modifier* am, Data_Storage* ds, int row, int col) { Class* clas = new Class(); clas->s...
TOOL
0.859763
3.066331
fe67f2e6-9a30-4db5-9cc4-de055655b2bf
Kallaf/LeetCode
rotate-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* rotateRight(ListNode* head, int k) { if(!head)return NULL; vector<int> arr; while(head) { ...
ALGO
0.999984
5.68122
6c87e925-61f0-4594-ac7d-cbc9653670f9
bobzsj87/llvm-307315
llvm/lib/Analysis/PostDominators.cpp
#include "llvm/Analysis/PostDominators.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SetOperations.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/Debug.h" #include "llvm/Support/GenericDomTreeConstruction.h" using namespace llvm; #...
ALGO
0.996661
7.37207
eb6f5659-9847-4e6b-9abb-bbf99f80d838
DywangIT/PTIT-Programing
PTIT-DSA/GO BAN PHIM.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define faster() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); const int MAXN = 1e6 + 5; const int MOD = 1e9 + 7; string s; void input() { cin >> s; } void solve() { ...
ALGO
0.999916
4.16502
91a7c056-6c48-4858-a6f2-657fe7d15126
Dr-Lepic/Data-Structure-Lab
Lab7/Task4.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int arr[n]; for(int i = 0; i < n; i++){ cin>>arr[i]; } vector<int> hT; for(int i = 0; i < n; i++){ if(i < 2){ cout<<-1<<endl; } hT.push_back(arr[i]); sort(hT.begin()...
ALGO
0.999818
3.770404
b10a1b3a-103a-4e02-89bd-56bd4567fbb0
mdshohed/Contest-Template
CodingTemplate/GraphTheory/Spanning trees/kruscal algorithm.cpp
#include <bits/stdc++.h> using namespace std; const int mx = 1e5+7; struct edge{ int u, v, w; bool operator<(const edge& p) const { return w < p.w; } }; vector<edge> g; int parent[mx]; int find(int n) { if(n==parent[n]) return n; return parent[n] = find(parent[n]); } int mst(int n)...
ALGO
0.999845
4.091037
db88c9c7-bc36-46c8-8b33-5f75803402e4
taufiqdanazhar/libcatid
_attic_/math/div/Modulus32.cpp
#include <cat/math/BigInt.hpp> #include <malloc.h> namespace cat { // Returns the remainder of N / divisor for a 32-bit divisor u32 Modulus32( int limbs, // Number of limbs in parameter N const u32 *N, // Large number, buffer size = limbs u32 divisor) // 32-bit number { u32 remainder = N[limbs-...
ALGO
0.989158
5.948445
5b245203-1e25-4acb-93fe-9dd3a4b4eeeb
hucancode/cp
leetcode/problems/k-th_symbol_in_grammar/solution.cpp
class Solution { public: int kthGrammar(int n, int k) { return __builtin_popcount(k-1)%2; } };
ALGO
0.999943
6.113408
1f44a8be-ee14-4b48-b72b-29d9a6170cbe
Al-amen/div2
A_Turtle_and_Piggy_Are_Playing_a_Game.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define sq(x) (x)*(x) #define PI acos(-1.0) #define endl '\n' #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; void CloSolveKori() { int l,r; cin >> l >> r; int ans = log2(r); cout << ans << endl; } int main...
ALGO
0.999054
4.787945
6fc41808-9fd9-469e-992a-1b040086ebda
stellaraccident/iree-forge
trees/llvm-project/clang-tools-extra/clang-doc/Serialize.cpp
#include "Serialize.h" #include "BitcodeWriter.h" #include "clang/AST/Comment.h" #include "clang/Index/USRGeneration.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/SHA1.h" using clang::comments::FullComment; namespace clang { namespace doc { namespace serialize { SymbolID ...
TOOL
0.930843
7.604779
0b7d8781-57b4-46b9-8e3f-6b52ea1aec97
javics2002/MotorEngine
Dependencies/Bullet/Src/src/BulletCollision/Gimpact/gim_contact.cpp
#include "gim_contact.h" #define MAX_COINCIDENT 8 void gim_contact_array::merge_contacts( const gim_contact_array& contacts, bool normal_contact_average) { clear(); if (contacts.size() == 1) { push_back(contacts.back()); return; } gim_array<GIM_RSORT_TOKEN> keycontacts(contacts.size()); keycontacts.resiz...
ALGO
0.995548
4.872777
bca9ae80-e9ce-4b63-a711-a41a6232adc4
SaraPardeshi/SaraPardeshi
GroupA2 - Hashing with collision.cpp
/* Sara Pardeshi SE-A-56 */ #include <iostream> using namespace std; class HashFunct { typedef struct hash { int key; int value; }hash; hash h[10]; public: HashFunct() { int i; for( i= 0; i < 10; i++) { h[i].key = -1...
ALGO
0.99423
4.282393
d925ba0f-ae2e-4bf9-92f0-ac136dba6495
Maynor164/Examen2Progra3
main.cpp
#include "Lista.h" #include "ArbolTrinario.h" #include "Evaluador.h" #include <fstream> #include <list> #include <vector> #include <math.h> #include <iostream> using namespace std; //2 ejercicios a realizar estan ubicados en el archivo Lista.h //Devuelve el promedio de los valores de mi_lista dada float obtenerPromed...
ALGO
0.967935
3.124856
713f092b-4f93-47fa-8024-2bf97897c759
onzinsky/ndmazes
kruskal.cpp
// Source: https://www.geeksforgeeks.org/kruskals-minimum-spanning-tree-using-stl-in-c/ // Altered by onz #include<bits/stdc++.h> #include <cmath> #include <chrono> #include "kruskal.hpp" #include "graph.hpp" #include "union_find.hpp" #include "generator.hpp" #include "clear_screen.hpp" using namespace std; using nam...
ALGO
0.999611
4.689241
f8bf2ff3-f044-477b-a58d-678f3706ad1c
bera5186/My-Competitive-Journey
CodeChef/Easy-Problems/CIELAB.cpp
#include <iostream> using namespace std; int main(){ int a,b,op; cin>>a>>b; if((a-b)%10 == 9){ cout<<a-b-1; }else{ cout<<a-b+1; } return 0; }
ALGO
0.999732
3.710829
a315cf40-18ea-41ec-8018-51152bf5a3e6
ishandutta2007/codeforces
meijer/normal/1293/D.cpp
#include <bits/stdc++.h> using namespace std; //macros typedef long long ll; typedef pair<ll, ll> ii; typedef tuple<int, int, int> iii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<iii> viii; typedef vector<ll> vll; #define REP(a,b,c) for(int a=int(b); a<int(c); a++) #define RE(a,c) REP(a,0,c) #defin...
ALGO
0.999882
4.124146
e7c6ca09-7cfe-474b-8c98-92fb82eacb77
GrayFlash/ACM_Summer_Challenge_2k20
Problem Set 1/Wait for It!.cpp
#include <bits/stdc++.h> #define LINT long long using namespace std; LINT smaller(LINT x,LINT y){ if(x>=y) return y; else return x; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); LINT n,m,k; cin>> n; LINT ar[4],c[n]; for(LINT i=0;i<n;i++){ m =0; k =0; for(int j=0;j<4;j++){ cin >> ...
ALGO
0.999916
3.634001
c1ab7adf-0f04-4b1e-9bfa-a7395bf2ec0d
ajyxwDean/OI
P2181.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; int main() { #ifdef LOCAL freopen("in.in", "r", stdin); freopen("out.out", "w", stdout); clock_t time = clock(); #endif //----------------------------- // Ctrl + / -> 注释 // Start // P2181 // n * (n-1) / 2 * (n-2) / 3...
ALGO
0.999952
4.513951
c0eb5f4b-9bea-4f8c-8f64-329375550570
DevFullStack-Franklyn-R-Silva/Calculadora-em-Dart_Flutter
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.998693
6.797273
af223e38-24fc-4554-935c-9f0a1fec0c59
Nrali282/Competitive-Coding
Leetcode/Detect Capital.cpp
/* Solution by Nirali Rathod *********************************************************** We define the usage of capitals in a word to be right when one of the following cases holds: All letters in this word are capitals, like "USA". All letters in this word are not capitals, like "leetcode". Only the ...
ALGO
0.999981
6.142503
ef81cd30-6ec4-4ecb-ade5-b3c90df445a1
Attyuttam/CompetitiveProgramming
Misc/frequency_method2.cpp
#include<bits/stdc++.h> #include<limits.h> using namespace std; int findNumOcc(int i,vector<pair<int,int> > v){ vector<pair<int,int>> :: iterator itr; int count=0; for(itr=v.begin();itr!=v.end();itr++){ if(i>=itr->first && i<=itr->second)count++; } return count; } int main(){ int n; cin>>n; vector<pair<int,in...
ALGO
0.999798
4.13552
8181266d-6711-4ca3-9285-a9893ea997db
hvdieu/mycode
Cpp/kriptogram.cpp
/* Official solution for the Kriptogram problem. Complexity: O(dataLoad + lenA + lenB), where dataLoad ~ O(n log n) Author: Goran Zuzic */ #include <algorithm> #include <functional> #include <cstdio> #include <cstdlib> #include <cstdlib> #include <map> #include <string> #include <vector> #include <iostream> ...
ALGO
0.998495
4.333889
d005dbc3-1b60-46ba-b8ed-555a7f3b3234
Muhammad-Al-Halaby/Competitive-Programming-Submissions
atcoder/abc188/C.cpp
#include <bits/stdc++.h> using namespace std; #define modulo ll (1e9 + 7) #define neig(a, u, e, v) for(int v, e = (a).head[u] ; ~e and (v = (a).to[e], 1) ; e = (a).nxt[e]) typedef long long ll; const int N = 2e5 + 9, M = 1e6 + 9, OO = 0x3f3f3f3f; const ll llOO = 0x3f3f3f3f3f3f3f3f; int main() { cin.tie(0); ...
ALGO
0.99995
3.982591
37427e1f-c883-4522-bec3-3b373d64e5de
SuriyaaVijay/code-dump
C++program/n-fibbonacci-no.cpp
class Solution { public: //Function to return list containing first n fibonacci numbers. vector<long long> printFibb(int n) { vector<long long>a(n); a[0]=1; a[1]=1; if(n==1) { return a; } for(int i=2;i<n;i++) { a[i]...
ALGO
0.999716
5.029424
0740dcf1-4bc9-4d3d-aae5-733b335da42d
AVarsi88/Parallel_SMC_on_Shared_Memory
main.cpp
/* * File: main.cpp * Author: alessandro * * Created on 7 giugno 2024, 11.46 */ #include <iostream> #include <omp.h> #include <random> #include <vector> #include <algorithm> #include "reduction_operations.h" #include "importance_sampling.h" #include "resampling.h" #include "prefix_reduction_operations.h" #...
ALGO
0.999049
3.966072
0722f9b8-ac10-441e-b6f3-388cc94f1861
sander-ali/Sobel_Laplacian_Gaussian_Median_filters
Ali.cpp
// CV_homeworks.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <opencv2/core.hpp> #include <opencv/cv.hpp> #include <opencv/highgui.h> #include <opencv2/imgcodecs.hpp> #include <iostream> #include <string> #include <cmath> using namespace cv; using namespace std; //// prop...
TOOL
0.891898
3.308119
1dc20e2d-dca4-443b-ab0a-9c6d9fda9e1b
harshul21/Love-Babber-Sde-Sheet
Array/Smallest Subarray with sum greater than a given value.cpp
//Problem Link:- //Approach 1:- //Time Complexity:- O(N*N) //Method(Not Implementing the code)- use to for loops //Approach 2:- //Time Complexity:- O(N) Sliding Window technique int func(vector<int> arr,int k){ int i=0,j=0; int n=arr.size(); int sum=0; int mn=INT_MAX; while(j<n){ while(sum...
ALGO
0.999976
5.762923
0117bbb3-2e8f-4b06-8891-e1f886edc83c
Oaik/problems-solution
UVA/UVA884.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define clr(a,b) memset(a,b,sizeof(a)) #define all(v) ((v).begin()),((v).end()) #define read freopen("input.in", "rt", stdin); #define write freopen("output.in", "wt", stdout); #define fastIO cout << fixed << setprecision(0), ios::sync_with_stdio(false)...
ALGO
0.999429
3.704516
fe35c5e0-72b2-4c7c-9acc-17d3273c48f4
3xp10it3r/LeetcodeByDG
Google-Interview-Preparation_PREMIUM/127-word-ladder/word-ladder.cpp
class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wordList) { int ans = 1; queue<string> q; q.push(beginWord); unordered_set<string> words(wordList.begin(), wordList.end()); while(!q.empty()) { int sz = q.size(); ...
ALGO
0.99999
5.88532
7de53998-34b4-4d38-8a61-c4f501f3a4b9
amarteyfio/Learning-Projects
ProductofThree/main.cpp
#include <iostream> using namespace std; int multiply(int a, int b, int c); int main() { cout << multiply(1,2,3) << endl; cout << multiply(4,5,6) << endl; return 0; } int multiply(int a, int b, int c) { return a * b * c; }
TOOL
0.999477
3.967629
8ad46a3b-c758-445f-81d1-1efbdc75aac5
inasilentway0916/Week15Exceptions
Project21/Source.cpp
//Name: Kevin Avila //Date: 04/27/22 //Class: CIS 1202.501 #include <iostream> using namespace std; class invalidCharacterException //Exception Class - Invalid Character. { }; class invalidRangeException //Exception Class - Invalid Range. { }; class caseConversionException ...
TOOL
0.959216
4.88001
0a20b3bb-fd84-44b8-a49e-b58084b2fa76
ishandutta2007/codeforces
nuip/normal/946/C.cpp
#include <string> #include <vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<functional> #include<list> #include<deque> #include<bitset> #include<set> #include<map> #include<unordered_map> #include<unordered_set> #include<cstring>...
ALGO
0.99993
3.569824
5a313562-3978-4c04-aafc-9ed971df0714
sarvex/leetcode-solidity
solution/2200-2299/2285.Maximum Total Importance of Roads/Solution.cpp
class Solution { public: long long maximumImportance(int n, vector<vector<int>>& roads) { vector<int> deg(n); for (auto& r : roads) { ++deg[r[0]]; ++deg[r[1]]; } sort(deg.begin(), deg.end()); long long ans = 0; for (int i = 0; i < n; ++i) ans +...
ALGO
0.999947
5.716618
14e6d802-8dd8-4280-8a2c-e6c56e35e8a8
LauZyHou/Algorithm-To-Practice
LeetCode/89.cpp
//https://leetcode-cn.com/problems/gray-code/solution/jian-dan-de-si-lu-44ms-by-dannnn/ class Solution { public: vector<int> ans; int n; void traceback(vector<int>& p,int w,bool tb) { /*p:回溯的数组,w:当前在该数组哪一位,tb:top or bottom,true表示走上面的路*/ if(w==n) { int val = 0; for(int i=0;i<n;i++) { val <<=1; val ...
ALGO
0.999994
5.56795
327de221-4c4e-4958-a594-aa9cfe0da3e2
ivabby/Competitive-Programming
LeetCode/LeetCode Practice Problems/160- Intersection of Two Linked Lists.cpp
class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { int n1 = 0; int n2 = 0; ListNode* t = headA; while(t != NULL) { n1++; t = t->next; } t = headB; while(t != NULL) { ...
ALGO
0.999874
5.69509
cfcf5356-4098-4b37-a1d9-da04bdd7b9b0
drdh/Courses
Algorithms/Lab/RedBlackTree/RedBlackTree.cpp
#include<cstdio> #include<iostream> using namespace std; template<typename KeyType> class RBTree{ private: //data typedef enum Color{RED,BLACK}Color; typedef struct RBTreeNode{ RBTreeNode *left; RBTreeNode *right; RBTreeNode *p; Color color; ...
ALGO
0.998602
4.169251
907868de-d580-44e7-b7ae-902c87f138f0
R4Waayush/DSA
C++ Ques/missingNum2.cpp
#include<iostream> #include<vector> using namespace std; int main(){ vector<int> a = {6,7,8,9,10,11,13,14,15}; int l = a[0]; int h = a[a.size()-1]; int diff = l-0; for(int i = 0; i<a.size();i++){ if(a[i]-i != diff){ cout<< diff+i; break; } } }
ALGO
0.999875
3.638403
16e6418f-d47e-4e3f-b80d-77cab2815d98
Kunal-2417/Leetcode_POTD
392.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long class Solution { public: bool isSubsequence(string s, string t) { int j=0; if(s.size()==0 && t.size()==0) { return true; } for (int i = 0; i < t.size(); i++) { if(s[j]==t[i])...
ALGO
0.999871
4.153059
b76655e5-cd17-42c8-ac8b-cf9c9c0050c1
Md-Noman-Biswas/Algorithms
7. Number Theory/3. Binary Exponentiation/2. Iterative Method.cpp
#include<bits/stdc++.h> using namespace std; const int M = 1e9 + 7; int binExpIter(int a, int b){ int ans = 1; while(b){ if(b&1){ ans = (ans * 1LL * a) % M; } a = (a * 1LL *a) % M; b = b >> 1; } return ans; } int main(){ int a, b; cin >> a >> b; co...
ALGO
0.999973
5.207508
7d94e549-76b3-4d96-bfbf-ebc8eae8f881
part-of-the-crew/DSA
sprint2/problemH/main.cpp
#include <iostream> #include <stack> #include <vector> #include <algorithm> using namespace std; void print(vector <int> &v) { for (auto i : v) cout << i << " "; cout << endl; } void print(int v) { cout << v; cout << endl; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); //int Nstr;...
ALGO
0.999518
4.722712
558ae078-0682-4607-9f54-02fdb1c52890
aldifebriansyah16/UTS-DASAR-PEMROGRAMAN
BAB III/Increment/main.cpp
#include <iostream> using namespace std; int main() { int i,j; i = 5; cout << "Nilai i awal : " << i << endl; cout << " Nilai ++1 : " << ++i << endl; cout << "Nilai i awal : " << i << endl << endl; j = 10; cout << "Nilai j awal : " << j << endl; cout << " Nilai j++ : " << j++ << e...
ALGO
0.999422
3.711853
251258f9-41ed-436d-a111-03ca890f0326
fengbingchun/Face_Test
src/Intel_TBB/examples/parallel_do/parallel_preorder/Graph.cpp
#include <cstdlib> #include "Graph.h" #include <iostream> using namespace std; void Graph::create_random_dag( size_t number_of_nodes ) { my_vertex_set.resize(number_of_nodes); for( size_t k=0; k<number_of_nodes; ++k ) { Cell& c = my_vertex_set[k]; int op = int((rand()>>8)%5u); if( op>i...
ALGO
0.996784
4.258839
fcdb153e-a4c6-42f4-8d3f-e69507512b01
Camwig/Animation-System-Final
bullet3/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btCompoundShape.h" #include "BulletCollision/BroadphaseCollision/btDbvt.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btAa...
ALGO
0.999597
6.925082
b94543b8-a765-455c-9e90-78e41cd858b5
PRANESHLEARNER/-CrackYourInternship
907. Sum of Subarray Minimums/Sum of Subarray Minimums.cpp
class Solution { public: int sumSubarrayMins(vector<int>& arr) { const int MOD = 1e9 + 7; int n = arr.size(); vector<int> left(n), right(n); stack<int> leftStack, rightStack; // Compute left array for (int i = 0; i < n; ++i) { while (!leftStack.empty() &&...
ALGO
0.999996
6.418065
01d0da1b-9fe4-4e63-a71d-77c90215daa4
Stele1203/C_plus
Grafovi/zad3.cpp
/* Dat je neusmjeren povezan graf sa N čvorova i M grana. Napisati program koji štampa K čvorova (K<N) koji se mogu ukloniti iz grafa a da on ostane povezan. */ bool test2(vector<vector<int>> graf,int k,int stari){ for(int i=0;i<graf.size();i++){ graf[i][k]=0; graf[k][i]=0; } if(stari >= b...
ALGO
0.993376
3.911036
39e48343-51fb-4a47-98f6-aa43b79f7889
HaoyiZhu/RealRobot
libs/pointops/src/aggregation/aggregation_cuda.cpp
#include <vector> #include <torch/serialize/tensor.h> #include <ATen/cuda/CUDAContext.h> #include "aggregation_cuda_kernel.h" void aggregation_forward_cuda(int n, int nsample, int c, int w_c, at::Tensor input_tensor, at::Tensor position_tensor, at::Tensor weight_tensor, at::Tensor idx_tensor, at::Tensor output_tensor)...
DATA
0.949172
5.514808
18da742a-9eec-4b81-862c-be9fc501303d
RuhiRj/Data-Structure-Programs
stackusinglinkedlist.cpp
#include<iostream> using namespace std; struct node { int info; struct node *next; }; void pushNode(struct node **start,int data) { struct node *n; n=(struct node*)malloc(sizeof(struct node)); n->info=data; if(*start==NULL) { *start=n; n->next=NULL; } else { ...
ALGO
0.998362
4.033691
5a55100c-f4b7-4c9a-b4a6-3a779cec14e3
shichaoy/cube_slam
object_slam/Thirdparty/g2o/g2o/stuff/string_tools.cpp
#include "string_tools.h" #include "os_specific.h" #include "macros.h" #include <cctype> #include <string> #include <cstdarg> #include <cstring> #include <algorithm> #include <cstdio> #include <iostream> #include <iterator> #if (defined (UNIX) || defined(CYGWIN)) && !defined(ANDROID) #include <wordexp.h> #endif name...
TOOL
0.901506
6.049948
ed2b7f00-38b1-43dc-afcd-9d54e53d807f
Sanketgondaliya/Rainfall_return_period_prediction-model-deploy
myenv/Lib/site-packages/sklearn/svm/src/liblinear/tron.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "tron.h" #ifndef min template <class T> static inline T min(T x,T y) { return (x<y)?x:y; } #endif #ifndef max template <class T> static inline T max(T x,T y) { return (x>y)?x:y; } #endif static void default_print(const char *buf) {...
ALGO
0.999676
5.847107
8e356b00-d8ce-4692-8199-ea68b462f22f
boundarydevices/frameworks_av
media/libstagefright/httplive/M3UParser.cpp
//#define LOG_NDEBUG 0 #define LOG_TAG "M3UParser" #include <utils/Log.h> #include "M3UParser.h" #include <binder/Parcel.h> #include <cutils/properties.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AMessage.h> #include <media/stagefright/MediaDefs.h> #include <media/stagefr...
TOOL
0.890106
6.395127
46fc793c-ebd0-4ebe-ba98-7c5fde0ccbfb
usernameisavailablee/DMPA_individual_assignments
second_individual/modules/cpp_modules/opencv/3rdparty/carotene/src/meanstddev.cpp
#include "common.hpp" #include <cmath> namespace CAROTENE_NS { void meanStdDev(const Size2D &size, const u8 * srcBase, ptrdiff_t srcStride, f32 * pMean, f32 * pStdDev) { internal::assertSupportedConfiguration(); #ifdef CAROTENE_NEON f64 fsum = 0.0f, fsqsum = 0.0f; sqsum(si...
ALGO
0.997832
6.121099
7f870915-a9df-4b46-a180-592cb5740d00
MogreBindings/EngineDeps
Mogre/Main/src/auto/MogrePixelCountLodStrategy.cpp
#include "MogreStableHeaders.h" #include "MogrePixelCountLodStrategy.h" namespace Mogre { //################################################################ //PixelCountLodStrategy //################################################################ //Nested Types //Private Declarations //Internal Declaration...
TOOL
0.884914
5.555291
668d2113-95aa-4d6b-aec5-4bac619863e5
MengLing-L/Escrow-protocol
PGC_miracl/bulletproofs/test_ipproof.cpp
#include "../common/global.hpp" #include "../depends/routines.hpp" #include "../depends/hash.hpp" #include "innerproduct_proof.hpp" void run_innerproduct_proof(InnerProduct_PP pp, InnerProduct_Instance instance, InnerProduct_Witness witness) { InnerProduct_Proof proof; auto start_time = chrono::steady_clock:...
ALGO
0.940537
5.659303
1682a817-988d-4db3-8f71-ea2ebfcf156b
SaeedJamei/ToDoList_flutter
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
8027f200-06eb-4411-b74b-9d8f9c95514c
ishandutta2007/codeforces
keshi/normal/112/A.cpp
#include <iostream> using namespace std; int main(){ string a,b; cin >> a >> b; for (int i=0; i<a.size(); i++){ if (a[i]<'a'){ a[i]+=32; } if (b[i]<'a'){ b[i]+=32; } } if(a>b){ cout << 1; } else if (a<b){ cout << -1; } else{ cout << 0; } return 0; }
ALGO
0.999984
3.382602
6a1f2e52-a245-4f04-ac32-d92434b27fde
jieqian2/Financial-Computing-in-Cpp
Assignment/how_to_lose_alap_in_unfair_coin_game.cpp
// IE523: Financial Computation // "How to lose as little as possible" by Addona, Wagon and Wilf // Written by Prof. Sreenivas // #include <iostream> #include <iomanip> #include <fstream> #include <cstdlib> #include <time.h> #include "hint.h" using namespace std; int main (int argc, char* argv[]) { I_have_not...
ALGO
0.999739
4.708599
4f827635-c5b1-4b54-bdc1-a5cc33667d7b
creamxiao/snake_robot
qpOASES-3.2.1/src/Matrices.cpp
/** * \file src/Matrices.cpp * \author Hans Joachim Ferreau, Andreas Potschka, Christian Kirches * \version 3.2 * \date 2007-2017 * * Implementation of the matrix classes. */ #include <qpOASES/Matrices.hpp> #include <qpOASES/LapackBlasReplacement.hpp> BEGIN_NAMESPACE_QPOASES /*********************************...
TOOL
0.93141
6.03202
050ab285-86fc-4367-997c-75f8aef03ac1
PaladeumBlockchain/Paladeum
src/utilstrencodings.cpp
#include "utilstrencodings.h" #include "tinyformat.h" #include <cstdlib> #include <cstring> #include <errno.h> #include <limits> static const std::string CHARS_ALPHA_NUM = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; static const std::string SAFE_CHARS[] = { CHARS_ALPHA_NUM + " .,;-_/:?@()"...
TOOL
0.98687
5.39718
8fdd4764-b179-4abd-bd24-f5ddb3944ced
testtest58/Build
Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/unorm.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_NORMALIZATION #include "unicode/udata.h" #include "unicode/ustring.h" #include "unicode/uiter.h" #include "unicode/unorm.h" #include "unicode/unorm2.h" #include "normalizer2impl.h" #include "unormimp.h" #include "uprops.h" #include "ustr_imp.h" U_NAMESPACE_USE /* quick ch...
TOOL
0.864341
7.604695
e34a0c39-28df-43c0-a1f9-71edc8e90b29
hasuq33/C-
recursion/Day4/reverse_string.cpp
#include<iostream> using namespace std; string reverse(int i , int j , string n){ while ( i < j ) { swap(n[i],n[j]); i++; j--; } return n; } string rverseRecusrsion(int i , int j , string n){ if( i > j){ return n; } swap(n[i], n[j]); i++; j--; ...
ALGO
0.99991
4.593197
10a0636e-bd44-4bd4-9a07-1228f67b237e
Push55/Control-and-Trajectory-Tracking
Control and Trajectory Tracking/project/pid_controller/eigen-3.3.7/doc/examples/QuickStart_example2_dynamic.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { MatrixXd m = MatrixXd::Random(3,3); m = (m + MatrixXd::Constant(3,3,1.2)) * 50; cout << "m =" << endl << m << endl; VectorXd v(3); v << 1, 2, 3; cout << "m * v =" << endl << m * v << endl; }
ALGO
0.999441
3.497552
7e88461c-5fa3-4d49-9215-e0381b8d16ed
SimNautilus/shoreline
ClientServerManagers/src/MeshMill_SolveMeshMotion.cpp
/* @file MeshMill_SolveMeshMotion.cpp * @details This file contains the MeshMill routine for solving for the * deformation of a volume mesh given a mesh and boundary conditions. */ // Shoreline includes #include <MeshMill.h> //stl includes #include <iostream> // SCOREC includes #include <apfMesh2.h> #inc...
ALGO
0.998556
5.476598
a8f5c0fe-c007-4363-ac30-aa341193dc37
sagsango/data-structure
Segment Tree/Diff Types of SegTrees/PointUpdate RangeQuery/PointUpdateRangeSumQuery.cpp
// https://cses.fi/problemset/result/504301/ const int maxn = 2e5+10; vector<int>t(4*maxn),a(maxn); int n,m; void built(int rt,int l,int r){ if(l==r){t[rt]=a[l];return;} int m=(l+r)>>1; built(rt<<1,l,m); built((rt<<1)+1,m+1,r); t[rt]=t[(rt<<1)]+t[(rt<<1)+1]; } void update(int rt,int l,int r,int pos,int new_val){ ...
ALGO
0.999837
4.509939
193e830a-5590-4d97-abb8-295e5a6474a5
namnguyen16082008/LUYENCODE
PRODUCT.cpp
#include <bits/stdc++.h> #define ll long long int using namespace std; ll d,a,b; ll X(ll n, ll x){ ll s=0; while (n>0){ s+=n/x; n/=x; } return s; } ll Y(ll n, ll x){ ll s=0; while (n%x==0){ s++; n/=x; } return s; } ll Cal(ll i){ return (X(b/d,i)-X((a...
ALGO
0.9998
4.343056
8cd396e2-b52b-4c04-a852-4bbb984f5d1c
mwang98/leetcode-practice
0987-vertical-order-traversal-of-a-binary-tree/0987-vertical-order-traversal-of-a-binary-tree.cpp
/* * @lc app=leetcode id=987 lang=cpp * * [987] Vertical Order Traversal of a Binary Tree */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(i...
ALGO
0.999996
6.85147
ce1a2cd9-c443-4891-9f7f-40f26b7e9728
DOSAYGO-STUDIO/rain
src/rainstorm.cpp
#define __STORMVERSION__ "3.7.1" // v2 is NIS2-v1 - non invertible state, v1 - passess all normal smhasher tests. BadSeeds not tested yet. // includes a compress step on each ingest to make it harder to invert the state even given knowledge of it #include <cstdint> #include <cstdlib> #include <cstring> #include <cstdi...
ALGO
0.993562
6.998766
a43162ec-20d8-4f19-b486-5224e7a5c08b
amchp/CompetitivePrograming
Contest/CF926/B_Sasha_and_the_Drawing.cpp
#include <bits/stdc++.h> #define fi first #define se second #define forn(i, n) for (int i = 0; i < (int)n; ++i) #define for1(i, n) for (int i = 1; i <= (int)n; ++i) #define fore(i, l, r) for (int i = (int)l; i <= (int)r; ++i) #define ford(i, n) for (int i = (int)(n)-1; i >= 0; --i) #define fored(i, l, r) for (int i = ...
ALGO
0.999885
3.827453
d611aa44-411f-4e41-a2af-9c94348d4c90
saga-gis/saga-gis
saga-gis/src/tools/grid/grid_gridding/Interpolation_Triangulation.cpp
//--------------------------------------------------------- #include "Interpolation_Triangulation.h" /////////////////////////////////////////////////////////// // // // // // // /////////////////////////////////////////////////////////// //-----------------------------------...
ALGO
0.949783
7.026357
aed90d40-edf9-422f-a581-dea31e711190
ShashankShekhar7/DailyPractice
0217-contains-duplicate/0217-contains-duplicate.cpp
class Solution { public: bool containsDuplicate(vector<int>& nums) { unordered_map<int,int>mp; int m=nums.size(); for(int i=0;i<m;i++){ mp[nums[i]]++; } for(auto i:mp){ if(i.second>=2){ return true; } } return false; ...
ALGO
0.999712
5.757986
3ac0e72a-11af-46ba-b025-a3b7fe9b2d7f
fuzzylite/fuzzylite
src/defuzzifier/WeightedDefuzzifier.cpp
#include "fuzzylite/defuzzifier/WeightedDefuzzifier.h" #include <set> #include "fuzzylite/term/Activated.h" #include "fuzzylite/term/Aggregated.h" #include "fuzzylite/term/Concave.h" #include "fuzzylite/term/Constant.h" #include "fuzzylite/term/Function.h" #include "fuzzylite/term/Linear.h" #include "fuzzylite/term/R...
ALGO
0.962637
6.503429
7f477ddf-2ad8-45cc-9cab-e82ce27150cf
MirazAli789/DSA-2024
Hashing/test.cpp
#include<bits/stdc++.h> using namespace std; int main() { int arr[5] = {1,2,3,4,5}; for(int i=0;i<5;i++){ cout<<arr[i]<<" "; } for(int i=0;i<5;i++){ arr[i]=arr[i+1]; } cout<<endl; return 0; }
ALGO
0.999537
3.137736
d3a7b7ee-32ca-4f9d-9733-330a88b29153
Hani-hue/tambahan-buat-pemdas
switchCase.cpp
#include <iostream> using namespace std; float luasPersegiPanjang(float a, float b) { return a * b; } float luasLingkaran(float a) { return 3.14 * a * a; } int main() { int pilihan; float panjang, lebar; float jejari; do { cout << "Menu" << endl; cout << "1. Luas Persegi ...
TOOL
0.926278
3.783935
53731c3b-ff3a-4249-a1f6-38dcdbba4f0f
Alaya-in-Matrix/MACE
main.cpp
#include "util.h" #include "Config.h" #include "MACE.h" #include "MACE_util.h" #include "NLopt_wrapper.h" #include <iostream> #include <boost/optional/optional_io.hpp> #include <omp.h> using namespace std; using namespace Eigen; int main(int arg_num, char** args) { // srand(rand_seed); srand(random_device{}())...
ALGO
0.99244
6.204798
eadf130c-43e1-4aa8-94de-b158d3984fba
shay-ff/cpp-files
CSES/StringAlgorithm/FindingPeriods.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #ifndef ONLINE_JUDGE #include "../debug.cpp" #else #define debug(...) #define debugArr(...) #endif #define int int64_t #define all(v) (v).begin(),(v).end() #define all...
ALGO
0.998654
4.215822
adc7dc76-460b-4ffd-acf4-81e98e634e6b
SungwookLE/PCCP
4_7주차/boj2342.cpp
#include <bits/stdc++.h> using namespace std; #define INF 987654321 typedef enum{ center = 0, up = 1, down = 3, left_ = 2, right_ = 4 } dir_e; vector<dir_e> A; int DP[100001][5][5]; int go(int left, int right, int idx){ if (idx == A.size()){ return 0; } int& ret = ...
ALGO
0.999908
4.376806
19439e72-8079-4c42-826b-f885a23fe0a7
palilo815/ps
baekjoon/2000/2443.cpp
#include <bits/stdc++.h> #define loop(i,n) for(int i=0;i<n;++i) using namespace std; int main() { int n; cin >> n; loop(i, n) cout << string(i, ' ') << string(n - 1 - i, '*') << '*' << string(n - 1 - i, '*') << '\n'; return 0; }
ALGO
0.999854
3.136484