uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5c6e843c-26c4-4652-b5e9-7e9cfe728d43
boxuLibrary/drt-vio-init
thirdparty/eigen/doc/examples/Tutorial_ArrayClass_accessors.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXXf m(2,2); // assign some values coefficient by coefficient m(0,0) = 1.0; m(0,1) = 2.0; m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0); // print values to standard output cout << m << endl << endl; ...
ALGO
0.98405
3.53189
5abde3ef-9c6f-4f81-9210-ee133a7e9726
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_2445_28.cpp
#include <bits/stdc++.h> using namespace std; long long A, B, n; long long sum_1_to_n(long long r) { return r * (r + 1) / 2; } long long sum_is(long long l, long long r) { return sum_1_to_n(r) - sum_1_to_n(l - 1); } long long maxi(long long i) { return A + (i - 1) * B; } long long sum(long long i, long long j) { lo...
ALGO
0.999978
4.239457
2889b365-b2bc-48b5-acea-28a8ba70e732
santr4/DSA-2.0
leetcode/other/q24.cpp
21. Merge Two Sorted Lists /** * 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) {} ...
ALGO
0.999668
5.851962
1f418cc8-805c-4e38-b9d0-463e295ca08c
TuNNan2003/UnloadBase
src/observer/sql/optimizer/expression_rewriter.cpp
// // Created by Wangyunlai on 2022/12/13. // #include "sql/optimizer/expression_rewriter.h" #include "sql/optimizer/comparison_simplification_rule.h" #include "sql/optimizer/conjunction_simplification_rule.h" #include "common/log/log.h" ExpressionRewriter::ExpressionRewriter() { expr_rewrite_rules_.emplace_back(ne...
TOOL
0.983917
6.775298
065b4d1e-f250-4ecf-9e2c-74a5e460c48b
nqdat2002/Data-Structures-and-Algorithms
Ngan Xep/DSA07029 - GIẢI MÃ XÂU KÝ TỰ.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<int, int> p; typedef vector<vector<int> > vt; typedef vector<pair<int, int> > vp; const ll mod = 1e9 + 7; const int oo = 1e6 + 7; #define f first #define s second #define pb push_...
ALGO
0.999524
6.010454
3e90bb5b-474d-45ab-a78b-994ada94d6f9
kenwhiston/cursoflutter
hello_world/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.997854
6.76775
a848f27f-5b73-431d-babf-1da543fd4dec
ros2cuda/cupoch-fat
third_party/eigen/doc/examples/tut_arithmetic_matrix_mul.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { Matrix2d mat; mat << 1, 2, 3, 4; Vector2d u(-1,1), v(2,0); std::cout << "Here is mat*mat:\n" << mat*mat << std::endl; std::cout << "Here is mat*u:\n" << mat*u << std::endl; std::cout << "Here is u^T*mat:\n" << u.transpo...
ALGO
0.999284
3.830239
fe92ced8-0847-4a13-ae9b-7aa5081fb9f0
ishandutta2007/codeforces
ftiasch/normal/1657/E.cpp
#line 1 "/home/ftiasch/Documents/shoka/mod_details.h" #include <cstdint> namespace details { template <typename ModT> static constexpr ModT power(ModT a, uint64_t n) { ModT result(1); n %= ModT::MOD - 1; while (n) { if (n & 1) { result *= a; } a *= a; n >>= 1; } return result; } temp...
ALGO
0.99999
4.995164
b7b7e12e-0eb2-4ecb-9e88-4a1d04538ae6
RakhiMeena/B-Tech-CS-4th-Semester-Notes-NITK
4.experiment5/inExFragmentation.cpp
#include<bits/stdc++.h> #include<time.h> #include<limits> using namespace std; // process class to store process details class process { public: int pno; int size; int blockno; public: process() { cout<<"Enter the process number: "; cin>>pno; cout<<"Enter the size of the process: "; cin>>size; ...
ALGO
0.99534
3.140946
52af6614-93cf-426e-9875-cd37c06e1cae
AroonSankoh/MoreGames
GoFishGame_T.cpp
//GoFishGame_T.cpp //Aroon Sankoh <<EMAIL>> //Contains definitions for GoFishGame class template #include "GoFishGame_T.h" using namespace std; template<> GoFishGame<PinochleRank, Suit, PinochleDeck>::GoFishGame(int argc, const char* argv[]): Game(argc, argv) { names.erase(names.begin()); for (unsigned int i...
TOOL
0.894093
7.289805
567a973c-3338-4691-aee9-a01365f387d7
tmdghks/Problem-Solving-tmdghks
ALPS/Week2/Week 2_11_Binary Search.cpp
#include <bits/stdc++.h> using namespace std; int main() { vector<int> v = {1, 2, 3, 4, 5, 39, 102}; int target = 40; int left = 0; int right = v.size() - 1; int mid; while (left < right) { mid = (left + right) / 2; if (v[mid] == target) { cout << "Target found at i...
ALGO
0.999764
5.660466
3eb744ae-567c-4c69-9b72-fd8aebfb3885
ConnyB1/C-digo-C
Practica_1_ejercicio_1_Velazquez_Mercado_Cesar_Alejandro/Practica_1_ejercicio_1_Velazquez_Mercado_Cesar_Alejandro.cpp
//Alejandro Velazquez #include <stdio.h> int main() { int limite; int resultado = 0; printf("ingrese un número entero positivo"); scanf("%d",&limite); for (int i=1; i<=limite; i++) { resultado +=i; } printf("La suma de los primeros %d números es: %d\n", limite, resultado); ...
ALGO
0.996087
3.171091
b7ec1853-1eb1-4280-86eb-e80b76f99689
ishandutta2007/codeforces
peti1234/normal/1182/E.cpp
#include <bits/stdc++.h> using namespace std; #define vvl vector<vector<long long>> long long mod=1e9+6, mod2=1e9+7; vvl matmul(vvl a, vvl b) { int n=a.size(), m=a[0].size(), k=b[0].size(); vvl ans; ans.resize(n); for (int i=0; i<n; i++) { ans[i].resize(m); } for (int i=0; i<n; i++) { ...
ALGO
0.999993
3.63409
e3ad47c7-1a40-4e50-a152-197f7551d7c8
AdrianGarridoPantaleon/ED
EJERCICIOS INICIALES ESTRUCTURAS DE DATOS/Ejercicio10/primos.cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> using namespace std; int main() { // Variables a utilizar en el programa int numero=0; int divisores=0; int primo=0; // primo = 0 no primo = 1 // Solicitar numero entero hasta valor -1 do { cout<<"\nIntroduce un numero: "<...
ALGO
0.996995
3.395005
118a5a97-6f4a-4f4a-aefe-0c2e5c2a5535
rishabhbajpailab/CIS-22C-Group-Project
FantasySportsApplication/BST/binaryTree.cpp
#include "binaryTree.h" using namespace binarytree; template<typename Element> CBinaryTree<Element>::CBinaryTree() { root = NULL; } template<typename Element> CBinaryTree<Element>::~CBinaryTree() { root = NULL; } template<typename Element> bool CBinaryTree<Element>::treeEmpty() { return root == NULL; } template<type...
ALGO
0.999782
4.172292
b15939f2-81bd-4ff4-b10a-bcfb1707c91e
03rcooke/targ_ind
packrat/lib/x86_64-pc-linux-gnu/4.0.4/Rcpp/examples/ConvolveBenchmarks/convolve13_cpp.cpp
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // This is a rewrite of the 'Writing R Extensions' section 5.10.1 example #include <Rcpp.h> template <typename T> T convolve( const T& a, const T& b ){ int na = a.size() ; int nb = b.size() ; T out(na + nb - 1); typename T::iterator...
ALGO
0.942252
6.399588
47578990-d442-44fc-bb01-982a575d63f0
ishandutta2007/codeforces
batman/normal/133/C.cpp
////////////////////////////////////////////////////////////////// ////////////////// Sa1378 Platform Vesion 1.1.3 ///////////////// //////////////////////////////////////////////////////////////// #include <bits/stdc++.h> using namespace std; #define Sa1378 main() #define chie(x) cerr << #x << " is " << x << endl; #de...
ALGO
0.999218
3.812006
69992e8f-c924-493a-a0a6-2761c8ebc9f7
phongthanh1412/Learn-Programming
C++ cơ bản/btmang4.cpp
#include <bits/stdc++.h> #include <math.h> using namespace std; int main () { cout << "So luong test case: "; int tc; cin >> tc; while (tc--) { cout << "So luong phan tu trong mang: "; int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> a...
ALGO
0.998714
3.670593
5a824fef-2e2a-462c-b50e-6d2f219bce24
ishika-gupta21/Leetcode-Problems-Solutions
1383-maximum-performance-of-a-team/1383-maximum-performance-of-a-team.cpp
class Solution { public: int M=1e9+7; int maxPerformance(int n, vector<int>& speed, vector<int>& eff, int k) { vector<pair<int,int>> v; for(int i=0;i<n;i++) v.push_back({eff[i],speed[i]}); sort(v.rbegin(),v.rend()); priority_queue<int,vector<int>,greater<int>> pq;...
ALGO
0.99998
5.525064
735193b4-c759-4d31-8cf6-7355d62515ff
mohitdtumce/Competitive-Coding
Leetcode/dynamic-progamming/regular-expr-matching.cpp
#include <bits/stdc++.h> using namespace std; class Solution { bool isMatch(int i, int j, string &s, string &p, vector<vector<int>> &result) { if (result[i][j] != -1) { return result[i][j] == 1; } bool ans = false; if (j == p.length()) { a...
ALGO
0.999964
5.063679
4d54a7d5-8793-481a-aaca-07483b696abd
rashaveraka/SingleParticleProcessor
root-6.06.08/interpreter/llvm/src/tools/clang/lib/Tooling/CommonOptionsParser.cpp
#include "llvm/Support/CommandLine.h" #include "clang/Tooling/ArgumentsAdjusters.h" #include "clang/Tooling/CommonOptionsParser.h" #include "clang/Tooling/Tooling.h" using namespace clang::tooling; using namespace llvm; const char *const CommonOptionsParser::HelpMessage = "\n" "-p <build-path> is used to read...
TOOL
0.943265
7.94891
a61d9e66-9a6c-4432-bc3b-afe550cfa45c
busslina/video-player-test
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
182ad658-01b9-4f4f-a73a-b906ad022681
DraSoGo/Competitive_Programming
Interactive/Problems/lis/tests/main.cpp
#include "lis.h" #include <iostream> #include <cassert> using namespace std; int main() { int score = 0; vector<pair<vector<int>, int>> tests = { {{}, 0}, {{1}, 1}, {{1, 2, 3, 4, 5}, 5}, {{5, 4, 3, 2, 1}, 1}, {{10, 9, 2, 5, 3, 7, 101, 18}, 4}, {{0, 1, 0, 3, 2, 3}...
TEST
0.979225
5.706896
08a440ef-649a-4f8e-a105-a34efe3e7a37
syahidmz/LabAlgo2-TI22PA2-222310038
Tugas pertemuan ke-12(Graph2)/tugas12.cpp
#include <climits> #include <iostream> #include <queue> #include <vector> using namespace std; // Struktur data untuk merepresentasikan edge struct Edge { int node; int weight; }; // Fungsi untuk mencari rute terpendek menggunakan algoritma Dijkstra void dijkstra(const vector<vector<Edge>> &graph, int startNode,...
ALGO
0.999932
6.383162
03cc52ed-5e88-4cbd-b241-e25b78a74cce
raj-chinagundi/Leetcode_Solutions
DFS of Graph - GFG/dfs-of-graph.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to return a list containing the DFS traversal of the graph. void storedfs(int s,vector<int> &vis,vector<int> adj[],vector<int> &dfs){ vis[s]=1; dfs.push_back(s); ...
ALGO
0.999985
6.491433
4d4c43e8-1c11-4e21-a07e-401d2c2df13c
alexandraback/datacollection
solutions_1484496_0/C++/YuKiSa/daa.cpp
#include<stdio.h> int a[30],n,flag=0; int b[30]; void f(int k, int sum1, int sum2) { if (flag==1) return; if (k==n+1) { if (sum1==sum2 && sum1!=0) { int i; for(i=1;i<=n;i++) { if (b[i]==1) printf("%d ",a[i]); } printf("\n"); for(i=1;i<=n;i++) { if (b[i]==2) printf("%d ",a[i]); } printf(...
ALGO
0.999744
3.543512
8c599c90-d511-4984-a287-5a1d59012b31
takumi152/atcoder
abc136e.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <string> using namespace std; typedef long long int ll; const ll MOD = 1000000007; set<int> factorize(int n) { set<int> factor; int i = 1; while (i * i <= n) { if (n % i == 0) { factor.insert(i); factor.insert(n...
ALGO
0.999963
4.577595
189c5f70-dc89-4d5d-8b5c-84edba478709
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_9282_53.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m, k; cin >> m >> k; if (m >= n && k >= n) { cout << "yes" << endl; } else { cout << "no" << endl; } return 0; }
ALGO
0.999871
3.393717
711938bb-2712-434e-a77f-174d55306995
Tittanc/Reponame
CodeBlockZen/Loops/TermaOfAp.cpp
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int n; cin>>n; int counter=1, term = 1; while(counter <= n) { if((term*3+2) % 4 == 0) { term++; continue; } cout<<(term*3+2)<<" "; term++; counter++; } return 0; }
ALGO
0.999867
3.650757
abc3b682-1de6-4edc-86d4-80bb0cf8c972
uk-ar/competitive_programming
abc175/e/a.cpp
// vector<int> v(N); // for(int i =0;i<N;i++){ // cin >> v.at(i); // } // single line with multi param // vector of vector // vector<vector<int>> data(row,vector<int>(col)); //for(int row=0;row<N;row++){ // for(int col=0;col<N;col++){ // }} // cout << std::fixed << std::setprecision(9) <<ret << endl; #include ...
ALGO
0.99997
3.100942
d1ba78fc-36fa-457d-959a-a9b871e6ac59
laquythi/laquythi.github.io
C++/5-YNghiaCoutVaCin/main.cpp
#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { // double toan,van,dtb; // cout<<"nhap diem toan:"; // cin>>toan; // cout<<"nhap diem van:"; // cin>>van; // dtb=(toan*2+van)/3; // cout<<"diem...
TOOL
0.983618
3.158425
256f1322-7d31-4ee5-9669-8b2b64abacf5
gauravkumarjha442/Leetcode
leetcode/1130. Minimum Cost Tree From Leaf Values/s4.cpp
// OJ: https://leetcode.com/problems/minimum-cost-tree-from-leaf-values/ // Author: github.com/lzl124631x // Time: O(N) // Space: O(N) // Ref: https://leetcode.com/problems/minimum-cost-tree-from-leaf-values/discuss/339959/One-Pass-O(N)-Time-and-Space class Solution { public: int mctFromLeafValues(vector<int>& A) {...
ALGO
0.99994
5.852586
81fdfddb-ea42-487e-86e9-87f035478fda
zakki/openhsp
hsp3ll/llvm/examples/BrainF/BrainF.cpp
#include "BrainF.h" #include "llvm/ADT/STLExtras.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Intrinsics.h" #include <iostream> using namespace llvm; //Set the constants for naming const char *BrainF::tapereg = "tape"; const char *BrainF::headreg = "head"; const char *BrainF::l...
TOOL
0.901969
4.749132
a93b66f5-32c6-4064-88aa-26123ebc9411
hemantgarg1452/Stack-Sheet
day1.cpp
#include<iostream> #include<stack> using namespace std; void printElementofStack(stack <int> s){ while(!s.empty()){ cout<<s.top()<<endl; s.pop(); } } int main(){ stack <int> s; s.push(5); s.push(4); s.push(8); s.push(2); cout<<s.empty()<<endl; cout<<s.size()<<e...
ALGO
0.975938
4.564046
6d055187-3097-458c-b9e6-417a88a449f0
Pthetinh/DSA
The2014 ACM_ICPC.cpp
#include<stdio.h> #include<math.h> #include<stdlib.h> int cmp(const void *a, const void *b){ int* x =(int*) a; int* y =(int*) b; return *y - *x; } void in(int a[]){ for(int i = 0; i < 3; i++){ for(int j = 0; j < a[i]; j++){ printf("%d ", i); } } printf("\n"); } int main(){ int t; scanf("%d", &t); for...
ALGO
0.999457
3.167288
da1285d5-0a0a-4a86-8b2d-b4b6180a8909
Liesegang/Procon
AtCoder/abc140/d.cpp
#include <bits/stdc++.h> using namespace std; // Type alias using ll=long long; using ld=double; using pi=pair<int,int>; using pll=pair<ll,ll>; using pld=pair<ld,ld>; using ti3=tuple<int, int, int>; using vi=vector<int>; using vll=vector<ll>; using vld=vector<ld>; using vpi=vector<pi>; using vpll=vector<ll>; using v...
ALGO
0.999977
4.146954
b4ab00d3-7c02-48eb-b677-72e2b540fc52
iknoom/Problem_Solving
BOJ/1351.cpp
#include <bits/stdc++.h> #define x first #define y second #define sz(x) (int)x.size() #define all(x) x.begin(), x.end() #define fastio cin.sync_with_stdio(false); cin.tie(nullptr) using namespace std; using pi = pair<int, int>; const int MOD = 1e9 + 7; const int dx[] = {-1, 0, 1, 0, -1, 1, 1, -1}; const int dy[] = {0,...
ALGO
0.999871
4.588721
477e8365-eb93-465c-bc91-1b6e284c3481
ishandutta2007/codeforces
qwertypi/normal/1617/D1.cpp
#include <bits/stdc++.h> using namespace std; struct Tuple{ int a, b, c; }; vector<Tuple> I, C; int qry(int a, int b, int c){ cout << "? " << a + 1 << ' ' << b + 1 << ' ' << c + 1 << endl; int v; cin >> v; return v; } void answer(vector<int> ans){ cout << "! " << ans.size() << ' '; for(auto i : ans){ ...
ALGO
0.99966
3.233517
31862b34-79ca-475c-98a8-fe71e1e81652
awais-rafiq/chapter-6-C-
chp 6/14.cpp
#include<iostream> using namespace std; int main() { int m,n; m=10; do { n=m; do { cout<<m<<"\t"; n--; } while(n>=1); cout<<endl; m=m-2; } while(m>=1); }
ALGO
0.999638
3.33889
322c3a94-d07d-4614-912b-71079522f889
saurabhjn76/Competitive-Coding
CodeChef/Beginner/FLOW014.cpp
#include "bits/stdc++.h" using namespace std; # define MOD 1000000007 # define GETCHAR getchar_unlocked typedef long long ll; inline ll readllInt() { ll n = 0; char c; while (1){ c=GETCHAR(); if(c=='\n'||c==' ') break; n = n * 10 + c - '0'; } return n; } inline int readInt()...
ALGO
0.999811
3.183229
cbd5d9ed-8ac4-4a35-bd8f-52c17735155c
Hridyansh30/Hridyansh
LAB 3(precise location).cpp
#include<iostream> #include<cstdlib> #include<chrono> using namespace std; using namespace std::chrono; int *gen_input(int arr[], int k) { for(int i = 0; i<k ; i++) { arr[i] = rand(); } return arr; } void precise(int arr[], int size) { int pivot = 0; int low = 1; int high = size - ...
ALGO
0.99556
4.990324
ebf13d40-b27a-432f-b1fd-d0f31903ac7a
ishandutta2007/codeforces
rajat1603/normal/794/F.cpp
#include "bits/stdc++.h" using namespace std; const int N = 1e5 + 5; const int SN = 1 << 18; int n , q; int arr[N]; struct data{ long long sum; long long val[10]; int who[10]; bool iden; }; data segtree[SN]; void build(int l , int r , int node){ for(int i = 0 ; i < 10 ; ++i){ segtree[node].who[i] = i; } segtre...
ALGO
0.999477
4.016803
5075ebe8-e2ae-4960-8399-41b53f2d01e1
pogoparis/flutters_TP
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.998809
6.763549
dd3cd899-3c09-4481-abf1-12fc134e087b
KhangSimple/LapTrinhNangCao
Week5/Bai05.cpp
double* getSquare (double number){ double *square=new double; *square=number * number; return square; }
TOOL
0.913982
3.1959
6d3bcdd1-dba3-4e83-b0af-0d6c70f32312
uditsehra/Codes
Coding Blocks/Online Assignments/Recursion/SubsetSum.cpp
/* Mike is a very passionate about sets. Lately, he is busy solving one of the problems on sets. He has to find whether if the sum of any of the non-empty subsets of the set A is zero. Input Format The first line contains an integer T, which is the total number of test cases. T test cases follow. Each test case consis...
ALGO
0.999746
5.313587
d9da6e5f-0241-43eb-9d0b-5ac01982f0c4
GaisaiYuno/OI-Record-exe-deleted
Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day2程序包/answers/GD-0495/travel/travel.cpp
#define ICEY #include <algorithm> #include <cstdio> const int kN = 5005; int n, m, a[kN][kN], cnt[kN], col[kN]; bool vis[kN]; inline int Abs(const int &x) { return x < 0 ? -x : x; } inline void Swap(int &x, int &y) { if (x != y) x ^= y, y ^= x, x ^= y; } int px = 0, py = 0; int Col(const int &x, const int &fa) { v...
ALGO
0.999997
3.974309
7e2107b3-c30d-426b-af66-3a620a36ca7c
ahnayef/Code-Practice
Codes/CF/977A.cpp
#include <iostream> using namespace std; int main() { int n, k; cin >> n >> k; while (k--) { if (n % 10 == 0) { n /= 10; } else { n--; } } cout << n; return 0; }
ALGO
0.999846
3.736432
a3a3e1a8-dfdc-4310-b2de-ec000c0bead4
bothemrun/CAP-Complete-Algorithmic-Programming
Wu Yonghui/Tree Structure/uva2612.cpp
//uva2612 //TODO? #include<iostream> #include<string> #include<string.h> using namespace std; inline int max_set_size(int set[],int n){ } int main(){ int n; cin >> n; while(n){ int set[3+2*n]; memset(set,-1,sizeof(set)); bool consistent = true; int i; for(i=1;i<=n;i++){ string sen,is,truth; int j; ...
ALGO
0.983125
3.749021
b5a737cc-0845-4cb9-b58b-8b7f3fd9db41
MichaelJohmson/passport
Alphastar/CC41B/Dynamic Programming 1/pie1.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int r, c; cin >> r >> c; vector<vector<int>> grid; for(int i = 0; i < r; i++){ vector<int> temp; for(int j = 0; j < c; j++){ int a; cin >> a; temp.push_back(a); } grid.push_back(temp); } vector<vector<int>> mc (r, vector<int>(c, 0)); mc[0...
ALGO
0.999818
4.273695
229332a7-40f1-4f8d-b124-288f64ba364c
thilio/Competitive-Programming
Codeforces-EDU/Segment Tree 1/1b.cpp
#include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define ms(x,i) memset(x,i,sizeof(x)) #define dbg(x) cout << #x << " = " << x << endl #define all(x) x.begin(),x.en...
ALGO
0.999825
4.331753
5be45b5e-df80-4cfe-aef7-6ccebde29273
YOOkoishi/homework
bisai/t4.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define P 998244853 ll a[100010],p[100010]; ll fan(ll a){ return (ll)P-abs((-a+1)%P); } ll chen(ll a,ll b){ return (a * b)% P; } ll ans=0; int main(){ int n,m; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i...
ALGO
0.999971
3.60435
cc09216e-db31-41c2-a14e-af6cac5e6d24
hackifme1/Leetcode
Backtracking/Gray Code.cpp
// By Chandramani Kumar // Keep moving and must be simple bro!!!!! // Espérons le meilleur mais préparez-vous au pire 😎 /* Problem Statement : An n-bit gray code sequence is a sequence of 2n integers where: Every integer is in the inclusive range [0, 2n - 1], The first integer is 0, An integer appears no more than ...
ALGO
0.999545
6.658866
020b42a3-540d-4877-86b3-ebd0fa26e1d9
mmind/mesa-lima
src/compiler/glsl/lower_variable_index_to_cond_assign.cpp
/** * \file lower_variable_index_to_cond_assign.cpp * * Turns non-constant indexing into array types to a series of * conditional moves of each element into a temporary. * * Pre-DX10 GPUs often don't have a native way to do this operation, * and this works around that. * * The lowering process proceeds as foll...
ALGO
0.992931
7.393563
c26e079f-4313-40c4-8d93-b704a4e084d8
GuardChain-official/GuardChain-Blockchain-Core-v.1.0
src/versionbits.cpp
#include "versionbits.h" #include "consensus/params.h" const struct BIP9DeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = { { /*.name =*/ "testdummy", /*.gbt_force =*/ true, /*.check_mn_protocol =*/ false, }, { /*.name =*/ "csv", /*...
ALGO
0.986364
7.642722
00c63630-033b-4065-8e63-cf5a62ffeb4b
dzw5320/animalmov
SDE/pred_1000_steps_ahead/020_ephraim_projection_code/project.cpp
#include <RcppArmadillo.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] ////////////////////////////////////////////////////////// //// //// Function to project onto the line segment //// https://en.wikipedia.org/wiki/Vector_projection#Definitions_in_terms_of_a_and_b //////////////////////////////////...
ALGO
0.999623
6.453253
0a313088-cf62-4dfd-8548-8770270b65a6
sarvex/leetcode-clojure
solution/0200-0299/0242.Valid Anagram/Solution.cpp
class Solution { public: bool isAnagram(string s, string t) { if (s.size() != t.size()) { return false; } vector<int> cnt(26); for (int i = 0; i < s.size(); ++i) { ++cnt[s[i] - 'a']; --cnt[t[i] - 'a']; } return all_of(cnt.begin(), c...
ALGO
0.999975
6.616067
277a6930-779d-44ac-9607-28d2f5938e71
prathmesh796/Practice
DSA/Krushkals_algo.cpp
#include <iostream> #include <string.h> using namespace std; class Graph { char Vnames[10][10]; int cost[10][10], n; public: Graph(); void creat_graph(); void display(); int Position(char[]); void kru(); }; Graph::Graph() { n = 0; for (int i = 0; i < 10; i++) { for (i...
ALGO
0.999897
4.144527
cfb14037-185a-4a70-80f2-79bf91bf1311
VanLam05/CPP-CodePTIT
CPP0418 - HỢP VÀ GIAO CỦA HAI DÃY SỐ -1.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define fi first #define se second #define vi vector<int> #define vl vector<ll> #define pii pair<int, int> #define vb vector<bool> #define pib pair<int, bool> #define mii map<int, int> #define mil map<int, ll> #define mli map<ll, int> #define yes cout <...
ALGO
0.999982
3.750384
e6cc34e6-0b2f-4eba-a43a-d4334fd194ff
my-exercises/leetcode
669-TrimABinarySearchTree.cpp
/** * 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* trimBST(TreeNode* root, int L, int R) { if (root) { root->left = ...
ALGO
0.99997
6.669958
ffb388b7-df4a-4a4e-b62d-02e1087ef5b2
yaroslavkash/try
main.cpp
#include <iostream> #include <stdexcept> using namespace std; /*template <typename T> struct Node { T data; Node* next; Node* prev; Node(const T& value) : data(value), next(nullptr), prev(nullptr) {} }; template <typename T> class Queue { private: Node<T>* head; Node<T>* tail; size_t size;...
ALGO
0.990386
4.979012
ef6c8593-9167-4ab2-a2da-8d044e57a6a1
rootid/fft
data_struct/is_valid_sudoku.cpp
#include "../headers/global.hpp" bool isValidSudoku(vector<vector<char> >& board) { assert(board.size() != 9); assert(board[0].size() != 9); unordered_map<int,char> row[9]; unordered_map<int,char> col[9]; unordered_map<int,char> blk[9]; //alternative DS //int used1[9][9] = {0}, used2[9][9] =...
ALGO
0.998566
5.820924
496bd240-444e-411b-b18b-759ee98a2b0c
tymbark/NewtonRaphson
newton_rhapson/equation.cpp
#include "equation.h" Equation::Equation(int _id){ id = _id; cout << "new equation\n"; } Equation::~Equation(){ } long double Equation::f(long double _x){ long double z; if (id == 0){ z = _x *_x; result = z - 2; } else if (id == 1){ z = _x *_x; result = ((z * (z - ...
ALGO
0.999832
3.95367
3da017cb-fb1e-47f0-8721-fbfbf4ef6c2a
parthgupta26/30-Days-of-Recursion
Day1-6.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void display(vector<int> arr, int idx){ if(idx == arr.size()) { return; } cout << arr[idx] << endl; display(arr, idx + 1); } void displayReverse(vector<int> arr, int idx){ if(idx == arr.size()) { retur...
ALGO
0.9999
4.927951
47f3ddd2-e2c2-466b-b359-4bd2fe72a914
AseemBaranwal/Neetcode-250-DSA
Dynamic Programming/799.champagne-tower.cpp
/* * @lc app=leetcode id=799 lang=cpp * * [799] Champagne Tower */ #include <bits/stdc++.h> using namespace std; // @lc code=start class Solution { public: double champagneTower(int poured, int query_row, int query_glass) { // Simulate -- Each row gets the half of extra from previous row on both ...
ALGO
0.999775
6.360851
dfe10c9a-7413-41ee-872b-2e76b886510e
CarmenArreguin/tapChallenge2025
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
3d300122-6855-4f99-b6e2-597f790bd3fd
przewooz/ffe_cache
!island_ga_fitness_caching/IslandGA/Selection.cpp
#include "Selection.h" #include "BinaryCoding.h" #include "CommandParam.h" #include "GenePattern.h" #include "RandUtils.h" #include "RealCoding.h" #include "UIntCommandParam.h" #include <unordered_set> using namespace std; template <class TGenotype, class TFenotype> CSelection<TGenotype, TFenotype>::CSelection(CPro...
ALGO
0.986621
5.855903
2aacf66e-187a-42fd-b76a-2725d5552393
TusharSachdeva29/CP-template
CP-Templates-master/Tree Algorithms/Centroid_Tree.cpp
vector<pair<int, int>> edgeList; vector<bool> deleted; vector<int> subtree; inline int getD(int index, int s){ return edgeList[index].ff ^ edgeList[index].ss ^ s; } void computeSubtrees(int root, vector<int>* edges, int parent){ subtree[root] = 1; for(auto i : edges[root]){ int dest = getD(i, root);...
ALGO
0.999907
4.86215
0d9299ab-fac4-4cec-aec2-dac54fce6f6f
Archit-arch/DScpp
Sorting/MergeSort.cpp
#include<iostream> #include<vector> using namespace std; void merge(int arr[], int low, int mid, int high){ int left = low; int right = mid+1; vector<int> temp; while(left <= mid && right <= high){ if(arr[left] <= arr[right]){ temp.push_back(arr[left]); left++; ...
ALGO
0.999971
5.547845
2de28386-a8f4-4afc-9c16-aa35caaed5e0
osudrl/atrias
software/atrias_rt_ops/src/Safety.cpp
#include "atrias_rt_ops/Safety.h" namespace atrias { namespace rtOps { Safety::Safety(RTOps* rt_ops) { rtOps = rt_ops; isHalting = false; } bool Safety::motorHaltCheck(double vel, double &minVel, double &maxVel) { // The rate at which we should be decelerating (rad/s/tick) double decelRate = AVAIL_HALT_AMPS...
TOOL
0.969932
6.909136
317da9b2-2c09-4278-9708-0d8fd005c234
namtso2207/android_bionic
tools/versioner/src/Utils.cpp
#include "Utils.h" #include <err.h> #include <fts.h> #include <string.h> #include <unistd.h> #include <sstream> #include <string> #include <vector> #include <android-base/strings.h> #include "DeclarationDatabase.h" std::string getWorkingDir() { char buf[PATH_MAX]; if (!getcwd(buf, sizeof(buf))) { err(1, "g...
TOOL
0.988903
6.942002
a2dac3cd-818d-43c2-a7d1-4d6f6bf1ca0e
sarvex/leetcode-ocaml
solution/1400-1499/1471.The k Strongest Values in an Array/Solution.cpp
class Solution { public: vector<int> getStrongest(vector<int>& arr, int k) { sort(arr.begin(), arr.end()); int m = arr[(arr.size() - 1) >> 1]; sort(arr.begin(), arr.end(), [&](int a, int b) { int x = abs(a - m), y = abs(b - m); return x == y ? a > b : x > y; }...
ALGO
0.999999
5.460139
96fe222b-9e81-4f8c-85ef-3a8d384bc22d
mvturkmen/afet_acil_durum_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.998733
6.76775
38c05619-2258-4940-b124-4e834584f19e
riggskevinp/oopcpp
ExpressionTree/expressiontreenode.cpp
#include "expressiontreenode.h" #include <iostream> std::map<std::string, double> TreeNode::lookUpTable = {}; Add::Add(TreeNode* left, TreeNode* right) { leftChild.reset(left); rightChild.reset(right); } void Add::print(std::ostream &os) const { os << "(" << *this->leftChild << "+" << *this->rightChild << ")"; } ...
ALGO
0.935609
4.109133
8c700b97-04c7-41c5-8759-8faa2e99b5ef
tariq-s/dsa
Sheet/Strings/4_min_remove_to_make_parenthesis_valid.cpp
#include <bits/stdc++.h> using namespace std; string minRemoveToMakeValid(string s) { int n = s.size(); string res1 = ""; int open = 0; for (int i = 0; i < n; i++) { char c = s[i]; if (c == '(') open++; else if (c == ')') { if (open == 0) ...
ALGO
0.99982
5.437681
9afdc967-b50c-4565-b15e-d4f08c46f985
ufwt/windows-XP-SP1
XPSP1/NT/base/pnp/tools/devcon/cmds.cpp
#include "devcon.h" int cmdHelp(LPCTSTR BaseName,LPCTSTR Machine,int argc,TCHAR* argv[]) /*++ Routine Description: HELP command allow HELP or HELP <command> Arguments: BaseName - name of executable Machine - if non-NULL, remote machine (ignored) argc/argv - remaining parameters Return Value...
TOOL
0.945089
4.811278
f0f6c7cd-56d1-4c88-8765-05f12f3653ea
sbobeica/cplus_cursuri_ro
prim_numbers/main.cpp
#include <iostream> #include <math.h> /* sqrt */ using namespace std; int main() { int number = 0; cout << "what is the number you would like to check? "; cin >> number; bool prime = true; for (int i = 2; i < number; ++i) { if (number % i == 0) { prime = fal...
ALGO
0.998864
3.599695
624bca3e-69a2-46d0-a6dc-fec13951537c
mayanjain/Codeforces
Round #814/A_Chip_Game.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long #define ld long double #define ull unsigned long long #define mod 1000000007 #define mod1 998244353 #define ordered_set tree<ll, null_type,less<ll>...
ALGO
0.999938
5.761321
27fb2b9a-a554-4d53-9167-c7999dd7618e
murad034/All-Code-Semister
uva solution/uva10474.cpp
#include<bits/stdc++.h> using namespace std; int arr1[10001]; int main() { int n,m,k=0; while(scanf("%d%d",&n,&m)==2) { if(m==0&&n==0) break; ++k; for(int i=0; i<n; i++) cin>>arr1[i]; sort(arr1,arr1+n); int a; cout<<"CASE# "<<k<<":"<<...
ALGO
0.999593
3.438589
59c02d1b-6691-453b-a0c5-f5f708530688
Ph0en1xGSeek/ACM
NowCoder/coding interview/未排序数组中累加和为给定值的最长子数组长度补1.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; int main() { int n, k; while(cin >> n) { if(n == 0) { continue; } int sum = 0; int cur; int ans = -1; unordered_map<int, int> pos; pos[0] = -1; for(int i = 0; i < n; ++i) { cin >> cur; if(cur > 0) { ...
ALGO
0.999844
4.092852
4d727f33-8822-47e3-9ae0-ef6cae3b744c
vaibhavagarwal220/CS403
Assignment_4/Q2.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n,W; cin>>n>>W; vector<int> values(n+1); vector<int> weights(n+1); vector<vector<int> > Memo(n+1,vector<int>(W+1,0)); vector<vector<int> > Keep(n+1,vector<int>(W+1,0)); for(int i=1;i<=n;i++) { cin>>weights[i]; } for(int i=1;i<=n;i++) { cin>>...
ALGO
0.999982
3.858169
0c0af81c-c2e3-4ae4-b1bf-5738c1914a37
ishandutta2007/codeforces
rubikun/normal/1060/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; } #define all(x) (x).begin(),(x).end() #define fi first #define ...
ALGO
0.999902
4.219415
e5488466-fd98-44d9-a8bc-13d6ba11b93b
yzzupgo/MFTCG
Data/abc170_b/Bloody_Yulii/wa/14289094.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <stack> #include <queue> #include <cmath> #include <tuple> #include <cstdio> #include <bitset> #include <sstream> #include <iterator> #include <numeric> #include <map> #include <cstring> #include <set> #include <functional> #include <...
ALGO
0.999763
3.090377
06cbce22-a4e1-4a48-b8e7-42ff12a12a50
cheongpark/Online_Judge_code
codeup/C_CPP/1402 codeup.cpp
#include <iostream> using namespace std; int main() { int num = 0, a[1000] = { 0, }; cin >> num; for (int i = 0; i < num; i++) cin >> a[i]; for (int i = num - 1; i >= 0; i--) cout << a[i] << endl; }
ALGO
0.999916
3.319962
b6aa6513-959e-4725-83f4-57de11fec891
adhipmukherjee/LeetCode-Submissions
1470-shuffle-the-array/1470-shuffle-the-array.cpp
class Solution { public: vector<int> shuffle(vector<int>& nums, int n) { vector<int> ans; for (int i=0; i<n; i++){ ans.push_back(nums[i]); ans.push_back(nums[i+n]); } return ans; } };
ALGO
0.999954
6.183914
3e272054-3a3d-4647-9579-7060fd268e67
skrewbar/PS
Baekjoon/platinum/2243.cpp
#include <iostream> #include <cmath> #include <vector> using namespace std; int get_flavor(vector<int> &tree, int node, int start, int end, int rank) { if (start == end) { return start; // 사탕의 맛 리턴 } if (rank <= tree[node*2]) { return get_flavor(tree, node*2, start, (start+end)/2, rank); ...
ALGO
0.999957
4.978707
0bbbdeed-a756-4d77-95a6-e27048d645fb
Shashuvo/CPP
900 rating/B_Permutation_Swap.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ long long n; cin>>n; int ans=0; for(int i=1;i<=n;i++){ int x; cin>>x; ans=__gcd(ans,abs(x-i)); } cout<<ans<<endl; } }
ALGO
0.999859
3.719158
d022550f-4293-486e-abae-c3e79e9a7883
QuentinFAIDIDE/Kholors
src/Audio/UnitConverter.cpp
#include "UnitConverter.h" #include <cmath> float UnitConverter::magnifyFftIndex(float k) { // the transfo is mainly made of three steps: // log10 normalized to [0, 1] using A and B // then set to power of C to zoom in a little // then normalized to fit in [0, FREQVIEW_SAMPLE_FFT_SIZE] // this has...
ALGO
0.941531
6.22192
ba778439-67cc-49a7-b2ab-4f94df2cfabf
jki12/algorithm
'-'/b2589.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; #define x first #define y second const int MAX = 50; int n, m, ans = INT32_MIN; char board[MAX][MAX]; int vis[MAX][MAX]; int dx[] = { 0, 0, 1, -1 }; int dy[] = { 1, -1, 0, 0 }; pair<int, int> coordi[MAX * MAX]; bool ...
ALGO
0.999849
3.644116
40c5c4ff-4dae-4c84-a6e1-5a31bb28e0c3
cw26378/PathPlanningProject
src/Eigen-3.3/doc/examples/class_CwiseBinaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template binary functor template<typename Scalar> struct MakeComplexOp { EIGEN_EMPTY_STRUCT_CTOR(MakeComplexOp) typedef complex<Scalar> result_type; complex<Scalar> operator()(const Scalar& a, const Scalar& b...
ALGO
0.941178
6.700232
3154dc15-5b97-4a2f-868e-a5568fa5479c
raincross7/code-similarity
codes/train_code/problem251/problem251_491.cpp
#include <iostream> #include <vector> #include <algorithm> #include <functional> #include <cmath> #include <map> #define reps(i,s,n) for(int (i) = (s); (i) < (n); (i)++) #define rep(i,n) reps(i,0,n) using namespace std; using ll = long long; int main(){ int n; cin >> n; vector<int> h(n); rep(i,n)cin >...
ALGO
0.999743
4.246713
df5b7132-c5f3-4880-aae4-5bd6f8d0c1f3
NadidLinchestein/ProgrammingPrinciples
Part I/Chapter 3/Drills/5.cpp
/* Change the program so that it writes out "the numbers are almost equal" after writing out which is the larger and the smaller if the two numbers differ by less than 1.0/100. */ #include <iostream> #include <cmath> // for std::abs int main() { double val1, val2; while (true) { std::cout...
ALGO
0.992025
5.102518
139f5397-400d-438c-b8f5-18f218ada453
rising-turtle/RGBD-VIO
rvio/initial/solve_5pts.cpp
#include "solve_5pts.h" #include "solve_opt.h" namespace cv { void decomposeEssentialMat( InputArray _E, OutputArray _R1, OutputArray _R2, OutputArray _t ) { Mat E = _E.getMat().reshape(1, 3); CV_Assert(E.cols == 3 && E.rows == 3); Mat D, U, Vt; SVD::compute(E, D, U, Vt); ...
ALGO
0.999504
6.218173
9d989f58-8aaa-459e-a6be-d00d61de62eb
hello-fri-end/mlpack-zoq
src/mlpack/methods/radical/radical.cpp
/** * @file methods/radical/radical.cpp * @author Nishant Mehta * * Implementation of Radical class * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpack. If not, see ...
ALGO
0.999714
6.770095
be986689-7592-4f8e-99dc-96ca146a8286
meekhumor/C-
02_Patterns_in_C++/Number_rectangle.cpp
#include <bits/stdc++.h> using namespace std; int main() { system("clear"); int row; cout<<"Enter no. of rows: "; cin>>row; int column; cout<<"Enter no. of column: "; cin>>column; for (int i = 0; i < row; i++) { for (int j = 0; j < column; j++) { cout<<...
ALGO
0.950909
3.8954
2267174d-1065-4445-b694-46c6d2809f53
voidd-nulll/cpp-practice
week-2/day-1/problem-2.cpp
//// https://practice.geeksforgeeks.org/problems/longest-sub-array-with-sum-k0809/1 class Solution{ public: int lenOfLongSubarr(int A[], int N, int K) { int sum = 0, val=0; map<int,int> mp; for(int i=0; i<N; i++) { sum += A[i]; if(sum == K...
ALGO
0.999886
5.497322
d625066f-0996-4b1e-8b97-22a319655a04
zenvite2/DSAA_PTIT
_old C++/maxSumRectangleMatrix.cpp
// /* // Ta tính tất cả các đoạn con của từng row, lấy các đoạn con giống nhau // của từng row đưa vào 1 vector rồi tìm max sum contigious array. // Đó tính là kq cần tìm // */ // #include <bits/stdc++.h> // using namespace std; // int findmax(vector <int> v) { // int res = v[0]; // for (int i = 1; i < v.size...
ALGO
0.999983
5.51035
d866b728-2eca-4f1c-8c19-f017daf40852
sajjadrahman56/Computer-Graphics
Transformation/TwoD_Transformation.cpp
/** 2D Transformation Translation, Rotation and Scaling */ #include<bits/stdc++.h> using namespace std; #include<graphics.h> int main() { int n; int x1, y1, x2, y2, x3,y3; int nx1, ny1, nx2, ny2, nx3, ny3; int tx, ty, sx, sy, angle, radianAngle, mx, my; int gd, gm; gd = DETECT; ...
ALGO
0.921087
3.92489
b426c1dc-eacc-4372-8bd7-1a225493eb67
KuldeepSingh5763/Zepskill
C++/Asignments/asignment_3/lengthOfLongestSubString.cpp
#include<iostream> #include<string> #include<vector> using namespace std; int lengthOfLongestSubstring(string s) { int n=s.length(); if(n<=1){ return n; } int si=0,ei=0,len=0,count=0; vector<int>map(128,0); while(ei<n){ if(map[s[ei++]]++ > 0){ ...
ALGO
0.999899
5.271617
a8647676-13fc-4965-ab07-2de544dce498
thegamer1907/Code_Analysis
CodesNew/1221.cpp
//lol #include<bits/stdc++.h> using namespace std; int a[100005]; int read() { char c=getchar(); int x=0,f=1; while (c<'0' || c>'9') { if (c=='-') f=-1; c=getchar(); } while (c>='0' && c<='9') { x=x*10+c-'0'; c=getchar(); } return x*f; } int main() { int n=read(); for (int i=1; i<=n; i++) a[i]=read(); ...
ALGO
0.999959
3.253448
3ba0ccf4-5a3e-48c8-b138-437ddc9c595a
Smiley-2003/TCS-NQT-2024_Previous-Year-Questions
Digital_Questions_PYQ/02_primepsq_series.cpp
//Series is a mixture of series 1,1,2,3,4,7,8,15,9,14,16,40,32,72,104,27... // Series is a mixture of 3 series- // ->All the prime postion values are power of 2. // ->All the perfect square position are power of 3. // Remaining postions are sum of previous 2 values. // FOr example, if N = 15, the 15th term in the seri...
ALGO
0.999899
4.348293