uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
8634db0a-500c-4548-8e89-170002e5b339
thegamer1907/Code_Analysis
Implementation/2960.cpp
#include<bits/stdc++.h> using namespace std; #define eps 1e-9 #define For(i,a,b) for(int i=a;i<=b;i++) #define Fore(i,a,b) for(int i=a;i>=b;i--) #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define mkp make_pair #define pb push_back #define sz size() #define met(a,b) memset(a,b,sizeof(a)) #define iossy ios::sy...
ALGO
0.998506
4.231375
ad652948-5e87-4fa7-bcca-07f57784265e
EMLonga/PAT-Basic-Level-Practice-1001-1125
1111-1120/1113.cpp
#include <bits/stdc++.h> using namespace std; string s1, s2, ans; int num1,num2,carry,now,idx; int main() { cin>>s1>>s2; if(s1.size()<s2.size()) swap(s1,s2); string c(s1.size()-s2.size(),'0'); s2=c+s2; ans.resize(s1.size()); for(int i=s1.size()-1;i>=0;i--){ if(isdigit(s1[i])) num1=s1[i]-...
ALGO
0.999971
4.100138
dd2d8a25-9b7f-414a-a970-73bf56c298c2
apolloLemon/algorithmique_s3
TP3/corr/exo.cpp
#include <iostream> #include <array> const int TAILLE_MAX = 6; using Tableau = std::array<int, TAILLE_MAX>; struct File { Tableau tab; int tete, queue; }; File init_file() { File nouvelle_file; nouvelle_file.tete = 0; nouvelle_file.queue = TAILLE_MAX-1; return nouvelle_file; } int succ(int pos) { r...
ALGO
0.983875
4.261254
3c33e938-1086-4950-a366-5c159d4f37cc
roberteg16/Quark
clang/tools/libclang/CIndexer.cpp
#include "CIndexer.h" #include "CXString.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/Version.h" #include "clang/Driver/Driver.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/MD5.h" #include "llvm/Support/Path.h" #include "llvm/S...
TOOL
0.936616
7.697338
91e37d0e-f266-4cc1-8d94-fcd5678c07e3
moria-ai-labs/westmarch_matching_fast
bindings.cpp
#include <pybind11/pybind11.h> #include <pybind11/stl.h> // For automatic conversion of STL containers #include "edit_distance.cpp" // Include the C++ functions namespace py = pybind11; PYBIND11_MODULE(edit_distance_cpp, m) { m.doc() = "Python module for fast edit distance calculation using C++"; // Optional modu...
TOOL
0.939076
7.076982
f3fc46c6-775a-4e93-a014-622fec160424
abiola814/rasberry-pi-and-arduino-project
libraries/techsnipersss-project-1_inferencing/src/edge-impulse-sdk/tensorflow/lite/micro/kernels/softmax.cpp
// Patched by Edge Impulse to include reference, CMSIS-NN, ARC and MVP kernels #include "../../../../classifier/ei_classifier_config.h" #if 0 == 1 /* noop */ #elif EI_CLASSIFIER_TFLITE_ENABLE_CMSIS_NN == 1 #include "edge-impulse-sdk/tensorflow/lite/micro/kernels/softmax.h" #include "edge-impulse-sdk/CMSIS/NN/Include/...
DATA
0.950976
7.383677
22b15f8e-9acd-4472-9536-a15cfca904e4
udacity/CarND-MPC-Quizzes
mpc_to_line/src/Eigen-3.3/doc/examples/class_Block.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<const Derive...
TOOL
0.921724
5.93207
f9bbbdb2-b53e-4017-84d9-7e678928495f
euclio/llvm-gbz80
lib/Transforms/InstCombine/InstCombineShifts.cpp
#include "InstCombineInternal.h" #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/PatternMatch.h" using namespace llvm; using namespace PatternMatch; #define DEBUG_TYPE "instcombine" Instruction *InstCombiner::commonShiftTra...
TOOL
0.966969
5.335105
363c09d1-65e1-4dc1-b06e-44b81a8adbba
amolsatsangi/Leetcode
Medium/Find the Longest Substring Containing Vowels in Even Counts/Find_the_Longest_Substring_Containing_Vowels_in_Even_Counts.cpp
class Solution { public: int findTheLongestSubstring(string s) { vector<int> mapy(32, -2); mapy[0] = -1; int maxLen = 0; int mask = 0; for (int i = 0; i < s.size(); ++i) { char ch = s[i]; switch (ch) { case 'a': mask ...
ALGO
0.999289
5.717381
10c71814-bd1b-410c-a0aa-3b4a0b0346d2
prprprpony/oj
cf/1096D.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e5 + 87; const char * t = "hard"; int n; long long dp[N][4]; char s[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> (s+1); dp[0][1] = dp[0][2] = dp[0][3] = 1e18; for (int i = 1; i <= n; ++i) { int a; cin >>...
ALGO
0.999838
3.904407
5d681158-2cdf-44fa-b6a7-24fd06683c92
gautam-vaibhav302/Vaibhav-s-Striver-Sheet
Stack and Queue/LT_994_rotten_oranges.cpp
#include<bits/stdc++.h> using namespace std; class Solution { int mins = -1; queue<pair<int, int>> bfs_queue; public: void print_arr(vector<int> arr, string msg="\nYour array is :- "){ int n = arr.size(); cout<<msg<<" { "; if(n>0){ cout<<arr[0]; for(int i=1;i<n;i++) ...
ALGO
0.999957
5.895929
97208491-32d4-4750-bca5-03eddde7cf6f
sourcesync/NYU
SquidBall/WallEProxy/squidball/3rdparty/opencv/everything/opencv/cvaux/src/vs/enteringblobdetectionreal.cpp
/* This file contain implementation of virtual interface of CvBlobDetector this implementation based on simple algorithm new blob is detected when several successive frames contains connected componets which have uniform motion with not high speed. Also separation from border and already tracked blobs are considered. *...
ALGO
0.857411
6.876727
0dfc76f1-8968-4150-8a54-bc94d2840005
AbhJ/some-cp-files-2
codeforces663C.cpp
#include <bits/stdc++.h> // #include <numeric> #define ll long long int #define ibs ios_base::sync_with_stdio(false) #define cti cin.tie(0) #define bp __builtin_popcount #define pb push_back using namespace std;//coded by abhijay mitra const int N=2e5+10; const ll M = 1e9+7; // Mulo #define F first #define S second #de...
ALGO
0.999948
4.013813
30e521ba-cc4a-4569-994d-958add4f1886
SteepturN/oop_exercise_06
source/main.cpp
#include <iostream> #include "../header/Queue.h" #include "../header/Square.h" #include "../header/Read_input.hpp" #include "../header/iterator.h" #include "../header/QueueEl.h" #include "../header/Allocator.hpp" #include <cstdio> #include <set> #include <string> #include <algorithm> int main(int argc, char *argv[]) {...
TOOL
0.857854
3.92906
a2e501f5-fe1c-4db1-bae3-7d08c5c5c4bd
Antoniomondejar/CompetitiveProgramming
atCoderContests/dp_educational/I.cpp
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define fst first #define snd second #define str string #define fore(i,a,b) for(int i=a,ggdem=b;i<ggdem;++i) #define SZ(x) ((int)x.size()) #define ALL(x) x.begin(),x.end() #define mset(a,v) memset((a),(v),sizeof(a)) #define FIN ios::sync_with_stdio(0);c...
ALGO
0.999868
3.790352
a25e354b-6e7b-4976-85d0-cd772d4ed1b9
Disa44ay/Codeforce
cf - 734A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, a = 0, d = 0; cin >> n; cin.ignore(); string s; getline(cin, s); for (int i = 0; i < n; i++) { if (s[i] == 'A') { a++; } else if (s[i] == 'D') { d++; } ...
ALGO
0.999869
4.199438
c3756d94-2511-432e-932b-3e6258c8d9a2
eric-haibin-lin/pelotondb
src/postgres/port/path.cpp
#ifndef FRONTEND #include "postgres.h" #else #include "postgres_fe.h" #endif #include <ctype.h> #include <sys/stat.h> #ifdef WIN32 #ifdef _WIN32_IE #undef _WIN32_IE #endif #define _WIN32_IE 0x0500 #ifdef near #undef near #endif #define near #include <shlobj.h> #else #include <unistd.h> #endif #include "pg_config_path...
TOOL
0.854901
6.018101
a89fce84-84d2-459e-b74c-0f8735124f8d
artificialcoder02/leetcodesolved
1759. Count Number of Homogenous Substrings/solution.cpp
#pragma GCC optimize("O3") class Solution { public: const long long mod=1e9+7; int countHomogenous(string s) { char prev='X'; int count=0; long long ans=0; for(char c: s){ if (c!=prev){ ans=(ans+(long long)count*(count+1)/2%mod); count=...
ALGO
0.999992
5.606261
8b728c97-4fb4-4e7e-9db7-e5e23c96b003
MuhamadDwikiDarusalam/UTS_Dasar_Pemrograman-1
BAB VII/Mengurutkan Array.cpp
#include <iostream> using namespace std; int main() { int A[7]; int j, k, c, temp; cout << "Masukan niali pada elemen array : " << endl; for (c=0; c<7; c++) { //menginput elemen array cout << "A[" << c << "] = "; cin >> A[c]; } cout << "\nNilai element array sebelum...
ALGO
0.99984
3.394933
875192bf-161f-40cb-badc-439754b5335e
kangjh0214/Baek
Baekk/27323번.cpp
#include<iostream> using namespace std; int main() { float a, b; cin >> a; cin >> b; cout << a * b; }
ALGO
0.961183
3.050142
547205e2-5be0-4ae1-ac88-0b5db24ae9c5
HimanshiNayak/GFG-Solutions
Difficulty: Easy/Square root of a number/square-root-of-a-number.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // Function to find square root // x: element to find square root class Solution { public: long long int floorSqrt(long long int n) { // Your code goes here long long ans=1; long long low =1; l...
ALGO
0.999983
5.758724
b3565068-dea1-4594-b000-a7d4b671aac4
Patsch36/Hackathon_Quoridor
Graph/Algorithm/BreadthFirstSearch.cpp
// // Created by danie on 03.07.2020. // #include "BreadthFirstSearch.h" #include <cassert> #include <queue> namespace Combinatorics { BreadthFirstSearch::BreadthFirstSearch(const Graph &g_, VertexId start_id) : _g(g_), _predecessor(g_, Graph::INVALID_VERTEX_ID), _dist(g_, Graph::INVALID_VERTEX_ID) { ...
ALGO
0.999832
6.069854
ba75bb7e-893f-432b-bac0-6c44699b4874
shashankSaurav1854/Data-Structure
Tutorial/Patterns/pattern2.cpp
#include<iostream> using namespace std; /* 12345 12345 12345 12345 12345 */ int main() { int n ; cin>>n; int i = 1; while(i<=n) { int j = 1; while(j<=n) { cout << j; //n-j+1 for reverse order j++; } cout<<endl; ...
ALGO
0.999992
4.098635
06137b7a-e4ff-43f4-88df-23962ea415b9
javiamdazo/expensor
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
330b8d45-7e73-493e-9e23-2fae93ddf6f0
NangJohnBui3010/CSES-CPlusPlus
Distinct_Numbers/main.cpp
#include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; vector<int> a(n); for(int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(),a.end()); int c = 1; for(int i = 1; i < n; i++) { if(a[i] != a[i-1])c++; } cout << c; return 0; }
ALGO
0.999885
4.071695
a7692bba-be8e-4ff5-acf4-68ed94cb4419
jerryga/GGTableViewForCocos2d-x
GGTableViewForCocos2d-x/libs/cocos2dx/support/ccUTF8.cpp
#include "ccUTF8.h" #include "platform/CCCommon.h" NS_CC_BEGIN int cc_wcslen(const unsigned short* str) { int i=0; while(*str++) i++; return i; } /* Code from GLIB gutf8.c starts here. */ #define UTF8_COMPUTE(Char, Mask, Len) \ if (Char < 128) \ { \ Len = 1; ...
TOOL
0.941979
6.140511
6c257418-1324-4b9e-bf3a-c0b4d155024e
fastdodge7/Problem-Solving
baekjoon-2250.cpp
#include <iostream> #include <queue> #include <algorithm> #include <vector> #include <string> #include <cassert> using namespace std; struct Node{ int cnt = 0; int left, right; }arr[10001]; int N; int ans[10001]; int inorder[10001]; int levelOrder[10001]; int idx = 0; void inOrderIdx(int cur) { if(cur ...
ALGO
0.999977
4.240073
8a4f0772-fd6e-4f49-9c5c-ce512dbb9d38
LRL52/ACM-ICPC
2022年电子科技大学ACM-ICPC暑假集训(含数学与几何专题)/7.15/B.cpp
//ID: LRL52 Date: 2022.7.15 #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #define rep(i, a, b) for(int i = (a); i <= (b); ++i) #define ee(i, a) for(int i = head[a]; i; i = e[i].nxt) using namespace std; const int N = 1055, M = 1e7 + 55, inf = 0x3f3f3f3f; char Buf[1 << 21], *_A = Buf, *_B...
ALGO
0.999862
4.074838
8ad4eb52-71be-474a-84bd-fe504efae266
czla/leetcode-solution
hard/30_substring_with_concatenation_of_all_words.cpp
// Description: 给定一个字符串 s 和一些长度相同的单词 words。找出 s 中恰好可以由 words 中所有单词串联形成的子串的起始位置。 // // 注意子串要与 words 中的单词完全匹配,中间不能有其他字符,但不需要考虑 words 中单词串联的顺序。 // // 如果节点总数不是 k 的整数倍,那么请将最后剩余的节点保持原有顺序。 // // // Examples: 输入: s = "barfoothefoobarman", words = ["foo","bar"] // 输出: [0,9] // ...
ALGO
0.999934
6.201017
4b1105f1-1321-4c79-a13d-81477685c773
Kushagar-Mahajan/CPP-Program
circulararray.cpp
// CPP program to demonstrate use of circular array #include <iostream> using namespace std; void print(char a[], int n, int ind) { // Create an auxiliary array of twice size. char b[(2 * n)]; // Copy a[] to b[] two times for (int i = 0; i < n; i++) b[i] = b[n + i] = a[i]; // print fro...
ALGO
0.995652
4.588699
0bc9106d-09a5-4e81-ab6a-43cd0e2cae49
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J01866/explore/explore.cpp
#include<bits/stdc++.h> using namespace std; int t,n,m,k,nowx,nowy,nowd; char c[1005][1005]; int vis[1005][1005],ans; void work(int x,int y,int d,int step){ if(!vis[x][y]){ ++ans; vis[x][y]=1; } if(step>k){ cout<<ans<<endl; return ; } int newx=x,newy=y; if(d==0) n...
ALGO
0.999817
4.087454
ddafb168-1f95-41b4-a775-417ec980066d
Olssdani/Astar
src/Astar.cpp
#include "Astar.h" //constructors Astar::Astar() { start = pos_2D(0, 0); end = pos_2D(0, 0); } Astar::Astar(const pos_2D &_start, const pos_2D& _end){ start = _start; end = _end; } //Updates the end and start node. void Astar::update(const pos_2D &_start, const pos_2D &_end) { start = _start; end = _end; } //Ru...
ALGO
0.999586
3.986438
570e268f-1b0a-4303-83c0-cab315d60606
hanqikai/data_structure
ch07/BinSearch/NoRecurBinSearchMain.cpp
#include <iostream> #include <ctime> #include <cstdlib> #define MaxSize 20 using namespace std; /*ǵݹ۰ңУr[begin...end]Ѱҹؼk*/ int NoRecurBinSearch(int r[], int begin, int end, int k) { int low, high, mid; low = begin; high = end; while(low <= high) { mid = (low + high)/2; if(k < r[mid]) high = mid-1; else i...
ALGO
0.999535
3.858853
7927c93e-5edb-4847-ba14-94d53970b795
EuihyeonO/CppStudy
CodingTest/CodingTest/5025.cpp
//#include <iostream> //#include <vector> //#include <algorithm> //#include <iterator> //#include <queue> // //void Init() //{ // std::ios::sync_with_stdio(false); // std::cin.tie(nullptr); // std::cout.tie(nullptr); //} // //class TRIE //{ //public: // TRIE() // { // isFinished = false; // Node.resize(10, nullptr); ...
ALGO
0.999576
4.827278
a8016e32-39f0-49e5-9fb9-297473fc700a
nella17/NYCU_gAwr_gurA
codebook/flow/SW-mincut.cpp
// global min cut struct SW { // O(V^3) static const int MXN = 514; int n, vst[MXN], del[MXN]; int edge[MXN][MXN], wei[MXN]; void init(int _n) { n = _n, MEM(edge, 0), MEM(del, 0); } void addEdge(int u, int v, int w) { edge[u][v] += w, edge[v][u] += w; } void search(int &s, int &t) { MEM(vst,...
ALGO
0.999221
4.31666
44210252-b2b5-4390-85f7-3b51bf8bc8e0
Arpit-Verma1/CSES-Problemset
Introductry Problems/number_spiral.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; void print() { cout << "\n"; } template <typename T, typename... types> void print(const T &first, const types &...args) { cout << first << " "; print(args...); } void debug(int x) { cerr << x; } void debug(long x) { cerr << x; } void debug(lon...
ALGO
0.999817
4.428333
3fbe58e7-555b-42f3-a2da-7282014af559
taegon98/PS-Cpp
프로그래머스/lv0/120812. 최빈값 구하기/최빈값 구하기.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; int cnt[1001]; int solution(vector<int> array) { int answer = 0, max_idx, max_value = 0, ok = 0; for (auto var : array) cnt[var]++; for (int i = 0; i < 1001; i++) { if (cnt[i] > max_value) { ...
ALGO
0.99964
4.588515
53e7c9d1-8b94-4ef3-8ad7-d0b3dc4fb0de
ishandutta2007/codeforces
rqi/normal/884/B.cpp
#include <iostream> using namespace std; int main() { long long n, x; cin >> n >> x; long long sum = 0; for(long long i = 0; i < n; i++){ long long a; cin >> a; sum+=a; } sum+=n-1; if(sum == x){ cout << "YES"; } else cout << "NO"; }
ALGO
0.999983
3.845806
2378492f-7977-4e22-8c0a-b586a6a802e7
johnnyoh555/Baekjoon
24.04-2/1493_박스 채우기.cpp
// https://www.acmicpc.net/problem/1493 #include <iostream> #include <cmath> using namespace std; int x, y, z, n, a, cnt, v[21], p[21]; void dfs(int l, int w, int h) { if (cnt == -1 || !l || !w || !h) return; for (int i = 20; i >= 0; i--) { if (p[i] <= l && p[i] <= w && p[i] <= h && v[i]) { v[i]--; cnt++; df...
ALGO
0.999905
4.018448
948e82a6-ac0a-489f-bdf0-fde11685ec6e
ishandutta2007/codeforces
kevinyang/normal/632/A.cpp
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ cin.tie(nullptr)->sync_with_stdio(false); int n,p; cin >> n >> p; vector<string>arr(n); for(int i = 0; i<n; i++){ cin >> arr[i]; } vector<int>val(n+1); int cur = 0; for(int i = n-1; i>=0; i--){ if(arr[i]=="halfplus"){ cur...
ALGO
0.999319
4.044094
ff67bb36-1b15-406e-be0d-a0d8228fe205
cyruscyliu/videzzo-llvm-project
lldb/test/API/tools/intel-features/intel-pt/test/main.cpp
int fun(int a) { return a * a + 1; } int main() { int z = 0; for (int i = 0; i < 10000; i++) { // Break for loop z += fun(z); } return 0; // Break 1 }
ALGO
0.978117
3.600817
34c5bd38-140e-4119-8b23-427d7774de68
Sajalthehacker/-CrackYourInternship
0783-minimum-distance-between-bst-nodes/0783-minimum-distance-between-bst-nodes.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.999998
6.295965
e5859291-da06-423c-9fc0-5c8b1b72e6c8
angele34/cpsolutions
NOI/2024-Elims/racoon.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; /*Get dna input, check if it has a pair in the input list */ // bug: FORGOT TO PUT RACOON ROLL map<char,char> complements = {{'A','T'}, {'T','A'}, {'C','G'}, {'G','C'}}; ...
ALGO
0.999823
3.833915
51eeb5a8-ffe5-4a1c-8111-8449ad31a012
Mustafa-Hassan2001/DSA-Course
day80.cpp
#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ void printSum(int arr[][3], int row, int col){ for(int row=0; row<3; row++){ int sum = 0; for(int col=0; col<3; col++){ sum += arr[row][col]; } cout<<sum<<" "; ...
ALGO
0.999513
3.836406
b24d6593-549d-4fe1-ab1c-234548b70a57
punchdrunkard/Problem-Solving
프로그래머스/unrated/150365. 미로 탈출 명령어/미로 탈출 명령어.cpp
#include <bits/stdc++.h> using namespace std; string answer = ""; string result = "impossible"; bool flag = false; int n, m, x, y, r, c, k; const int DX[4] = {1, 0, 0, -1}; const int DY[4] = {0, -1, 1, 0}; char DIRS[4] = {'d', 'l', 'r', 'u'}; void init(int _n, int _m, int _x, int _y, int _r, int _c, int _k) { n ...
ALGO
0.999986
4.560776
185b6561-b428-4c5d-aea1-88badb2e6356
kaartikn/options-pricing-simulation
pcg-cpp-master/sample/make-partytrick.cpp
/* * This program uses pcg32_k64, a 64-dimensionally equidistributed generator * to create a party-trick generator that, after 1MB of output, produces some * output that may not look "very random" to you. ;-) */ #include <cstdio> #include <cstddef> #include <cstdint> #include <iostream> #include <random> #include...
ALGO
0.93244
4.721418
5efca409-ff0a-462a-8acd-460a34cd11ad
heavenMOJANG/ICPC
programmes_C_Cpp/.history/Codeforces/CF2131/F_20250811003741.cpp
#pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; void solve() { int n; cin >> n; string a, b; cin >> a >> b; vector<int> cnt(2 * n + 10, 0), cnt0(2 * n + 10, 0), cnt1(2 * n + 10, 0); int c0{}; for (int i = ...
ALGO
0.999718
4.755141
4f4e1efc-7b41-405b-8308-5e14c8b500ad
SachinBore/LeetcodeSolvedProblems
1370-count-number-of-nice-subarrays/count-number-of-nice-subarrays.cpp
class Solution { public: int numberOfSubarrays(vector<int>& nums, int k) { int n = nums.size(); for(int i=0; i<n; i++) { if(nums[i]%2 == 0) nums[i] = 0; else nums[i] = 1; } map<long long, long long> mp; int ans = 0; int sum = 0; mp[0]...
ALGO
0.999998
5.766629
e959f53c-d7e2-4090-8288-767cf87c624f
Johannyjm/c-pro
AtCoder/abc/abc305/tempCodeRunnerFile.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #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; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n, m, k; cin >> n >> m >>...
ALGO
0.999996
3.824397
3bfec9d9-2bf9-4f1c-84c0-59e7f52a9924
knights-1337/CSCI-111
course-files/class09/ex03_otherDiagonalOnly.cpp
#include <iostream> using namespace std; int main() { int n = 5; //Goal: Print a triangle of *s for (int row = 1; row <= n; row++) { //outer for loop for the row for (int col = 1; col <= n; col++) { //inner for loop for the column if (row + col == n + 1) cout << "*"; else co...
ALGO
0.997843
4.804928
8f95b736-5ebf-4c97-8426-8238a24a71f6
kyw04004/ProblemSolving
BOJ/1786_찾기.cpp
#include<iostream> #include<cstring> #include<string> #include<algorithm> #include<vector> #include<cmath> #include<queue> #include<functional> #include<stack> #include<map> #include<bitset> using namespace std; typedef long long ll; string T, P; vector<int> ans; vector <int> getPi(string pattern) { int m = pattern.si...
ALGO
0.99986
4.637767
2b629637-5427-4a8c-8b28-1703a57f8d19
TwilightZrui/LeetCode
145.二叉树的后序遍历.cpp
/* * @Author: TwilightZrui * @Date: 2023-05-22 15:19:40 */ /* * @lc app=leetcode.cn id=145 lang=cpp * * [145] 二叉树的后序遍历 * * https://leetcode.cn/problems/binary-tree-postorder-traversal/description/ * * algorithms * Easy (76.32%) * Likes: 1039 * Dislikes: 0 * Total Accepted: 624.2K * Total Submission...
ALGO
0.999901
6.733265
dccb113f-7124-4c7e-96b9-3d20c1517996
oxygen-hunter/Flashboom
data/leetcode_cpp/binary-search-tree-to-greater-sum-tree.cpp
// Time: O(n) // Space: O(h) /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* bstToGst(TreeNode* root) { int prev = 0; ...
ALGO
0.999926
6.415453
eaba6341-40c1-42c9-bbd4-6e6c77a9691e
sidharth-085/Striver-SDE-Sheet
Binary Search Trees/Kth-Smallest-Element.cpp
#include <iostream> 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; } ~TreeNode() { delete left; delete right; } ...
ALGO
0.999995
6.288368
72915f4e-8fa2-40b4-b475-3d04af4a89da
youngf5/practice
728B.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<windows.h> #include<time.h> #include<conio.h> #include<string> #include<vector> using namespace std; vector<int>selfDividingNumbers(int left, int right) { vector<int>A; for (int i = left; i < right + 1; i++) { bool flag=0; int num = i; while (num) {...
ALGO
0.998419
3.341171
8478dfd1-ac43-4c0b-a4e6-147f91e4f0be
Exawind/amr-wind
amr-wind/physics/multiphase/SloshingTank.cpp
#include "amr-wind/physics/multiphase/SloshingTank.H" #include "amr-wind/physics/multiphase/MultiPhase.H" #include "amr-wind/CFDSim.H" #include "AMReX_ParmParse.H" #include "amr-wind/fvm/gradient.H" #include "amr-wind/core/field_ops.H" namespace amr_wind { SloshingTank::SloshingTank(CFDSim& sim) : m_velocity(sim....
ALGO
0.99572
6.259155
41577950-fd11-46f2-918d-05aa90a9ede2
mazenmohamedmahmoudatia666/Daily-Coding-
860-Lemonade-Change.cpp
class Solution { public: bool lemonadeChange(vector<int>& bills) { int five = 0, ten = 0; int change = accumulate(bills.begin(), bills.end(), 0); // Total value of bills for (int bill : bills) { if (bill == 5) { five++; // Received a $5 bill } else ...
ALGO
0.999725
6.416002
36e5b05d-80fb-4ab4-92de-86b343055bf4
allanlaal/firefox
mozglue/misc/SIMD_avx2.cpp
/* vim: set ts=8 sts=2 et sw=2 tw=80: */ #include "mozilla/SIMD.h" #include "mozilla/SSE.h" #include "mozilla/Assertions.h" // Restricting to x86_64 simplifies things, and we're not particularly // worried about slightly degraded performance on 32 bit processors which // support AVX2, as this should be quite a minor...
TOOL
0.963349
6.936318
9d74e0c0-c36b-46c1-90a0-9ad4251a333d
FOSCODER/FreeCAD-for-rendering
src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_PolygonPerFace_2D.cpp
// File : StdMeshers_PolygonPerFace_2D.cxx // Module : SMESH // Created : Fri Oct 20 11:37:07 2006 // Author : Edward AGAPOV (eap) // #include "StdMeshers_PolygonPerFace_2D.hxx" #include "SMESH_Comment.hxx" #include "SMESH_Mesh.hxx" #include "SMESH_MesherHelper.hxx" #include "SMESH_ProxyMesh.hxx" #include...
ALGO
0.922797
6.327747
31afc4f6-ff2e-44c1-baf1-18a0004b04bb
phitronio/Conceptual-Sessions-Code
Batch 5/DS/Week 4-1/circular_game.cpp
class Solution { public: queue<int>q; int findTheWinner(int n, int k) { for(int i=1;i<=n;i++){ q.push(i); } int cnt = 0; while(q.size()>1){ int v = q.front(); q.pop(); cnt++; if(cnt==k) cnt = 0; else q.push...
ALGO
0.999991
5.747095
2f355aff-95d8-45f1-82d5-70eaaf0abb38
Phantom-HY/PH-code
c++/SYC/AC/2501/std.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; priority_queue<int> a; priority_queue<int, vector<int>, greater<int>> b; int n; int s[200005]; void fun(int k) { if (b.size() < k) while (b.size() != k && !a.empty()) b.push(a.top()), a.pop(); if (b.size() > k) while...
ALGO
0.999991
3.563422
b6907f33-63dd-4375-83b1-a681a55912f9
bigstronkcodeman/Big-Int
BigInt.cpp
#include "../include/BigInt.hpp" /* *************************************************** * BIGINT CLASS METHODS * *************************************************** */ // Default constructor BigInt::BigInt() : digits(std::vector<uint>(1, 0)), positive(true) { digits.reserve(8); } /...
ALGO
0.984631
7.158062
8fa8ebe0-4c1f-4138-8b6c-73124855a662
actium/codeforces
2000/60/2064b.cpp
#include <iostream> #include <vector> template <typename T> std::istream& operator >>(std::istream& input, std::vector<T>& v) { for (T& a : v) input >> a; return input; } void answer(unsigned x, unsigned y) { std::cout << x << ' ' << y << '\n'; } void no_answer() { std::cout << 0 << '\n'; } ...
ALGO
0.999918
4.355002
7c11bae4-c19c-44a2-a7d3-32afb11553bc
raghav161/Leetcode
2903-insert-greatest-common-divisors-in-linked-list/2903-insert-greatest-common-divisors-in-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* insertGreat...
ALGO
0.999968
5.123826
132b6dd2-360f-481a-a1d6-deeb79167f00
falcaoanderson/CompetitiveProgramming
new-CSES/cses-1072.cpp
#include <iostream> using namespace std; #define ll long long ll total(ll n){ return (n*n*(n*n-1) - 8*(n-2)*(n-1))/2; } int main(){ ll n; cin >> n; for(int i=1; i<=n; i++){ cout << total(i) << endl; } return 0; }
ALGO
0.99977
4.307876
53351e23-be10-4dd5-8b21-4d49701be761
KO0I/DIYTechShop_I3XL
misc/Marlin_ALT/vector_3.cpp
#include <math.h> #include "Marlin.h" #ifdef ENABLE_AUTO_BED_LEVELING #include "vector_3.h" vector_3::vector_3() : x(0), y(0), z(0) { } vector_3::vector_3(float x_, float y_, float z_) : x(x_), y(y_), z(z_) { } vector_3 vector_3::cross(vector_3 left, vector_3 right) { return vector_3(left.y * right.z - left.z * ri...
TOOL
0.910983
5.613548
b56fd5bc-848a-4390-89fd-4a6fd82470e5
AST-TheCoder/CP-Solutions
CodeForces/GNU C++17/1191C | Tokitsukaze and Discard Items/56940038.cpp
/******************************************************/ /******************************************************/ /** BISMILLAHIR RAHMANIR RAHIM **/ /** Al-Shahriar Tonmoy - Red_Sparkle **/ /** Department of Computer Science and Engineering **/ /** Barisal Universit...
ALGO
0.999964
3.271805
2c34fb3c-0c7f-4b27-8107-362fd6625826
Y3U18/ollvm-poject
llvm/lib/Support/DeltaAlgorithm.cpp
#include "llvm/ADT/DeltaAlgorithm.h" #include <algorithm> #include <iterator> #include <set> using namespace llvm; DeltaAlgorithm::~DeltaAlgorithm() { } bool DeltaAlgorithm::GetTestResult(const changeset_ty &Changes) { if (FailedTestsCache.count(Changes)) return false; bool Result = ExecuteOneTest(Changes); ...
TEST
0.930241
7.118645
bee04a36-ef19-490e-b1e4-bb0a10831773
freebsd/freebsd-ports-kde
www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_hash.cpp
--- core/DesktopEditor/doctrenderer/hash.cpp.orig 2023-06-14 12:14:26.656325000 +0200 +++ core/DesktopEditor/doctrenderer/hash.cpp 2023-06-14 14:23:39.149523000 +0200 @@ -4,12 +4,12 @@ #include "../common/Base64.h" #endif -#include "openssl/sha.h" -#include "openssl/md2.h" -#include "openssl/md4.h" -#include "opens...
ALGO
0.971926
7.025827
b0971c90-704d-4b8a-9f21-16d20462b981
ArchishmanSengupta/lc
1710-maximum-units-on-a-truck/1710-maximum-units-on-a-truck.cpp
class Solution { public: int maximumUnits(vector<vector<int>>& boxTypes, int truckSize) { // sorting decreasing capacity sort(begin(boxTypes), end(boxTypes),[](auto &a,auto &b){return a[1]>b[1];}); int maxUnits=0; for(auto i: boxTypes){ if...
ALGO
0.999976
6.856701
6f5a4173-bf12-4020-8073-f2abdaf6d83a
Jason1024-web/QG-HomeWork
大组作业/第一周/DuLinkedList/Sources/DuLNodeLinkedList.cpp
#include "../Headers/DuLinkedList.hpp" int Length_LinkedList(DuLNode* head) { if (head == NULL) { return 0; } DuLNode* p = head; int count = 0; while(p) { ++count; p = p->next; } return count; } DuLNode* initLinkedList() { DuLNode* head = (struct DuLNode*)malloc(sizeof(struct DuLNode)); head->data = -1...
ALGO
0.998909
3.52828
6dd89cff-ce4a-4667-ab3a-59aed6b6a638
amankbps/Competititve-Programming
A_Spy_Detected.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,x,y) for(long long i=x;i<y;i++) #define F first #define S second #define pb push_back #define eb emplace_back #define MOD 1000000007 typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef pair<int,int> pii; typ...
ALGO
0.999924
3.791332
6a8e0791-bb4e-4f7f-b673-5c1b9e287418
timothyshull/algorithms_scratchpad_old
algorithms_in_c++_pt1/ch_3_1_building_blocks/3_3.cpp
#include <iostream> #include <cmath> #include <vector> #include <random> std::random_device rd; std::mt19937 e2(rd()); std::uniform_real_distribution<> dist(0, 1); int randNum(int range) { return static_cast<int>(std::round(range * dist(e2))); } void avgAndStdDev(int range, int N) { float m1 = 0.0; float...
DATA
0.983108
5.315061
4ab70ab0-dda2-49ca-9e93-17b1cc5e802d
AQIB-NAWAB/DSA-Problems-Solutions
Week 1/Climbing Stairs/index.cpp
#include <iostream> using namespace std; // int steps(int n){ // if(n==0 || n==1) return 1; // return steps(n-1)+steps(n-2); // } // linear apprach int steps(int n){ if(n==1 || n==0) return 1; int current=1; int prev=1; for(int i=2;i<=n;i++){ int temp=current; current=temp...
ALGO
0.999988
5.067568
50776dda-0315-45d0-ac30-1464665f0e45
everwind/nlpnet
nlptools/eigen/unsupported/doc/examples/MatrixSine.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { MatrixXd A = MatrixXd::Random(3,3); std::cout << "A = \n" << A << "\n\n"; MatrixXd sinA = A.sin(); std::cout << "sin(A) = \n" << sinA << "\n\n"; MatrixXd cosA = A.cos(); std::cout << "cos(A) = \n" << cos...
ALGO
0.974755
5.878768
a2ed16e7-013a-4362-97e0-501e5a0e3c4a
ishandutta2007/codeforces
ksun48/normal/1019/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; int n; int ask(int x){ x %= n; if(x < 0) x += n; cout << "? " << x + 1<< endl; int r; cin >> r; return r; } void ans(int x){ x %= n; if(x < 0) x += n; cout << "! " << x + 1 << endl; } int main(){ cin >> n; if(n % 4 == 2){ cout << "! " <<...
ALGO
0.99994
3.275825
24be174e-c711-4d92-91b6-bef2921e9f53
soon-yau/SDCND_Term3
CarND-Path-Planning-Project/src/Eigen-3.3/doc/snippets/Triangular_solve.cpp
Matrix3d m = Matrix3d::Zero(); m.triangularView<Eigen::Upper>().setOnes(); cout << "Here is the matrix m:\n" << m << endl; Matrix3d n = Matrix3d::Ones(); n.triangularView<Eigen::Lower>() *= 2; cout << "Here is the matrix n:\n" << n << endl; cout << "And now here is m.inverse()*n, taking advantage of the fact that" ...
ALGO
0.998961
3.691875
1f12df1d-2550-455f-8c63-a3bf37c8a54c
JRgit03/Algorithm
contest/UCup2/J_.cpp
#include <bits/stdc++.h> using namespace std; const int N = 110; int n,t; int sx,sy,ex,ey; int x[N],y[N]; vector<array<int,3>> path; double get(int x1,int y1,int x2,int y2){ int dx = x2 - x1 , dy = y2 - y1; return sqrt(dx * dx + dy * dy); } int main(){ cin>>n>>t; cin>>sx>>sy>>ex>>ey; for(int i=1;i...
ALGO
0.999967
3.741944
a6486222-235c-449b-bf2f-d8ff3c52ec70
nickstevensMU/HawkScan
droneProjectFinal/public/assets/py/opencv-python-4.5.4.60/opencv/samples/cpp/tutorial_code/features2D/AKAZE_match.cpp
#include <opencv2/features2d.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <iostream> using namespace std; using namespace cv; const float inlier_threshold = 2.5f; // Distance threshold to identify inliers with homography check const float nn_match_ratio = 0.8f; // Nearest neighbor mat...
ALGO
0.986921
6.1825
58494f04-3da4-44e1-a352-cd8e884934cb
rdbyk/balisc
scilab/modules/elementary_functions/src/cpp/cos.cpp
#include "cos.hxx" extern "C" { #include "balisc_elementary.h" } using types::Double; namespace balisc { Double* cos(Double* x) { bool is_complex = x->isComplex(); Double* y = x->getRef() > 1 ? new Double(x->getDims(), x->getDimsArray(), is_complex) : x; int n = x->getSize(); if (is_comp...
TOOL
0.963607
5.842242
e6615dd4-b905-4a03-afa1-95820b489784
shanu333/Practice-Codes
codechef/lunchTime/l8_2.cpp
#include <iostream> #include <cstdio> #include <vector> #include <map> using namespace std; #define ll long long map<char, vector<int> > m; int main() { string s; cin >> s; int c = 0; for (int i = 0; i < (int)s.size(); i++) { m[s[i]].push_back(i+1); } int i, j, k , l; l = (int)m['...
ALGO
0.999795
3.056925
48ecba42-29c8-4e97-a403-fc2972e5d55b
mitchellnouhan/leetCode
tries/implementTrie.cpp
class Node { public: unordered_map<char, Node*> letters; bool eow; Node(){ eow = false; } }; class Trie { public: Node* root; Trie() { //init root root = new Node(); } void insert(string word) { Node* cur = root; for(char c: word){ ...
ALGO
0.999531
5.653626
9c01289b-7082-4946-a972-c23ca8c97322
mostyniko/Sport-Programming
Теория графов/cycles (unoriented graph).cpp
// cycles in unoriented graph #include <bits/stdc++.h> using namespace std; vector<int> g[200001]; int color[200001]; int n, m; bool flag = false; enum { WHITE, GREY, BLACK }; void dfs(int v) { color[v] = GREY; for(int u : g[v]) { if(color[u] == GREY) { flag = true; return; } else dfs(u); } color[v...
ALGO
0.999967
4.998246
13e94902-6b1e-412f-8941-8b6299a7c7fa
ishandutta2007/codeforces
kotamanegi/normal/1320/B.cpp
#define _CRT_SECURE_NO_WARNINGS #pragma comment (linker, "/STACK:526000000") #include "bits/stdc++.h" using namespace std; typedef string::const_iterator State; #define eps 1e-11L #define MAX_MOD 1000000007LL #define GYAKU 500000004LL #define MOD 998244353LL #define seg_size 262144 * 2LL #define pb push_back #defin...
ALGO
0.999786
4.249905
be4b1e3f-0ccc-459d-abbc-feb979cd220d
ubAI6689/CodeForces
Practise/800/src/20220803_1301_WordNet.cpp
/* https://codeforces.com/problemset/problem/59/A Vasya is very upset that many people on the Net mix uppercase and lowercase letters in one word. That's why he decided to invent an extension for his favorite browser that would change the letters' register in every word so that it either only consisted of lowercase ...
ALGO
0.999399
5.690277
8a46f040-d3bc-45db-b172-56039300bfba
gogiung/algorithm
2304 창고 다각형/소스.cpp
#include <iostream> #include <stack> using namespace std; stack<int> st; int n; int arr[1001]; int pos, len; int first = 1001, last, longest; int result; int main() { cin >> n; while (n--) { cin >> pos >> len; arr[pos] = len; if (last < pos) last = pos; if (first > pos) first = pos; if (len > arr[longe...
ALGO
0.999721
3.662419
bb23b5b0-ad93-479d-b07d-b5de9f228f79
SHOEBILL04/CP_Diary
CF/taxi1.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); int n; cin >> n; int four{0}, three{0}, two{0}, one{0}; int arr[n]; int number = 0; for(int i = 0; i < n; i++) { cin >> arr[i]; } for(int i = 0; i <n...
ALGO
0.999957
4.286223
020a479b-fe45-4567-b64b-6cbef7dc2dbb
Rutusolanki10/c-project-4
project 3 c++/question2.cpp
//develop a program to find the largest elemenrt for given 2d array #include<iostream> using namespace std; int main() { int rows, cols,i,j; cout << "Enter the array's row size: "; cin >> rows; cout << "Enter the array's column size: "; cin >> cols; int arr[rows][cols]; cout << "\nEnter array...
ALGO
0.997476
3.641021
637b34de-2b1d-479f-90d2-0af191beae64
Amjad1Qasem/pharma_assist
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.998859
6.785645
2ac12297-d0bc-4671-8a91-744c4e3016a7
bleugreen/avl25
avl25/AVL.cpp
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <stack> #include "AVL.h" using namespace std; AVL::AVL(){ head = NULL; size = 0; } bool AVL::search(string s, Node* head){ if (head == NULL){ return false; } if (s.compare(head->data) == 0){ return true; } if (...
ALGO
0.997473
3.829867
db60406e-dd91-4eb6-bd82-0fc19521073b
KevinMathewT/Competitive-Programming
StrangeSwaps.cpp
#include <bits/stdc++.h> #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; typedef vector<vl> vvl; #define F0(i,n) for (ll i = 0; i < n; i++) #define F1(i,n) for (ll i = 1; i <= n; i++) #define CL(a,x...
ALGO
0.999963
3.355445
92331850-a0e7-45d1-a89d-cb5e80308f24
captpikachu/algoarena
collecting_numbers.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; map<int,int> v; for(int i=0;i<n;i++){ int a; cin>>a; v[a]=i; } stack <int> s; s.push(0); int round=0; auto prev = 0; while(s.top()!=n){ auto curr=v.find(s.top()+1)->second+1; if(curr>=prev) {s.push(s.top()+1); prev = curr;} ...
ALGO
0.999932
3.804345
5e613206-1cd3-4516-8d88-97033145a1d4
solareenlo/atcoder
05_AtCoder-Beginner-Contest/abc106/C/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int64_t k; cin >> k; for (int i = 0; i < min(int64_t(s.size()), k); i++) if (s[i] > '1') { cout << s[i] << '\n'; return 0; } cout << 1 << '\n'; return 0; }
ALGO
0.999538
3.962689
f32bb511-3761-426b-a2eb-f10f4b05d3ea
Ashutosh-0506/Striver-DP
L23_BUnboundMemo.cpp
//***********************************ASHUTOSH KUMAR***********************************// /* कर्मण्येवाधिकारस्ते मा फलेषु कदाचन। मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि॥ Karmanye vadhikaraste Ma Phaleshu Kadachana, Ma Karmaphalaheturbhurma Te Sangostvakarmani, The meaning of the verse is :— You have the right to wo...
ALGO
0.999979
5.061964
7c1757e8-0472-4dd4-a6a0-c8d57e1098ea
psucurran/NoiseNinjas
code/Wiener_Trainer/Wiener_Trainer/Wiener_Trainer/eigen-dir/doc/snippets/Tutorial_solve_triangular.cpp
Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; Vector3f x = A.triangularView<Upper>().solve(b); cout << "The solution is:" << endl << x << endl;
ALGO
0.999913
3.055453
35848137-409c-48d5-b16a-8580c3c8644c
Azharul-Raj/xcpc
practiceProblem/day3/F.cpp
/** * author: raj_001 * created: 2024-08-12 18:39:13 **/ #include <bits/stdc++.h> #define nl '\n' #define int long long int using namespace std; #define INF 1e18 #define pb push_back #define ppb pop_back #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() void solve() { int n; cin >...
ALGO
0.999994
5.579733
c16afd5b-d47e-46d0-8a5b-54b73424af55
ryo8998/educational90
016_3_minimum_coins.cpp
#include <bits/stdc++.h> using namespace std; int main(){ long long N, A,B,C; cin >> N; cin >> A >> B >> C; long long minCount = 10000; for(int i=0; i<10000; i++){ if(A * i > N) continue; for(int j=0; j<10000; j++){ if(N - (A*i + B*j) < 0) continue; long long...
ALGO
0.999399
3.570505
a6274ff9-0546-41ed-a72f-8bb065d4dd53
Akash-1006/C-Programming
Pattern 3.cpp
#include <stdio.h> int main() { int i,j,k,l=1; printf("Enter the number of rows:"); scanf("%d",&k); for (i=1;i<=k;i++) {for (j=1;j<=i;j++) { printf("%d ",l); l++; } printf("\n"); } }
ALGO
0.999143
3.18926
e2bc8afa-e33b-4065-8f8f-41e06d6a5e5b
yead-study/CSE_4302
210041247_lab12_task2.cpp
#include<iostream> using namespace std; #define arrsize 10 template<class T> T nth_max(T arr[],int n) { T funarr[arrsize]; for(int i = 0; i< arrsize;i++) { funarr[i] = arr[i]; } for(int i = 0; i< arrsize-1;i++) { for(int j= 0; j < arrsize-1; j++) { if(funar...
ALGO
0.999424
3.231947
4561c9d1-2f9c-4c9a-92b2-19103849651d
Alok-kumar-Maurya/codes
753a.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define PI 3.1415926535897932384626 typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vpii; typedef vector<vi> vvi; #define debugxy(x,y) cout<<"[ "<<x<<" "<<y<<" ]"<< endl #define debugx(x) cout <<"[ "<< x <<" ]"<<endl int32_t ma...
ALGO
0.999957
3.598675