uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
db16c8a4-98fe-4322-9782-5c27197f8e52
shpsi/uva
1154/a/a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<string, int> psi; typedef pair<string, string> pss; #define pb push_back #define PI acos(-1.0) #define EPS 1e-4 #define mp make_pair #define all(x) x.begin(), x.end() #define fastio ios_base::sync_with_stdio(fal...
ALGO
0.999568
3.542517
dc495605-b103-4c2a-aea0-649b66248da9
robert2653/CSES
Sorting and Searching/Josephus_Problem_II.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> struct Fenwick { // 全部以 0 based 使用 int n; vector<T> a; Fenwick(int n_ = 0) { init(n_); } void init(int n_) { n = n_; a.assign(n, T{}); } void add(int x, const T &v) { fo...
ALGO
0.999993
3.936263
3b46dcd6-f76c-4587-9311-319a7b137224
Koios1143/Algorithm-Code-Saved
UVA/UVa598.cpp
//By Koios1143 #include<bits/stdc++.h> #define LL long long #define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); #define pii pair<int,int> using namespace std; int t;string s,tmp; vector<string> input; vector<string> news; vector<string> ans; bool used[100]; void dfs(int depth, int size, int last){ if(depth...
ALGO
0.991685
3.316235
c61cfaf8-171b-4e29-b97d-2df6db16fae2
shivam-singh084/C_plus_plus--DSA
Pattern/numberPattern1.cpp
#include<iostream> using namespace std; int main(){ int rows; cin >> rows; int i = 1; while( i<= rows){ int j = 1; while(j <=rows){ cout << i << " "; j++; } cout << endl; i++; } return 0; }
ALGO
0.999764
4.051347
d3e673ae-e967-46dd-a97a-7f4b642a312d
mandeep-chhabra/Data-Structure-and-Algorithms
Queue/ReverseFirstKElements.cpp
#include <iostream> #include <queue> #include <stack> using namespace std; // Function to reverse the first k elements of the queue queue<int> reverseFirstK(queue<int> q, int k) { if (k > q.size()) return q; stack<int> st; // Push the first k elements into the stack for (int i = 0; i < k; i++...
ALGO
0.99996
5.232791
f0d0d11e-9c5b-4fd7-97c3-847ead6e9e11
VinothKumar-vkv/Leetcode_solutions
0937-online-stock-span/0937-online-stock-span.cpp
class StockSpanner { private: std::stack<std::pair<int, int>> st; // pair<price, index> int ind; public: StockSpanner() { ind = -1; while (!st.empty()) st.pop(); } int next(int price) { ind++; while (!st.empty() && st.top().first <= price) { st.pop()...
ALGO
0.999459
6.338496
6b48fd31-731e-473f-b523-6e8cc4e6e8cd
Rinnegatamante/eldritch-vita
Code/Projects/Eld/src/eldwbscenehelpers.cpp
#include "core.h" #include "eldwbscenehelpers.h" #include "wbscene.h" #include "wbentity.h" #include "Components/wbcompeldtransform.h" #include "mathcore.h" #if BUILD_DEBUG #define BEGIN_ITERATING_ENTITIES do{ m_IteratingEntities = true; } while(0) #define END_ITERATING_ENTITIES do{ m_IteratingEntities = false; } whil...
TOOL
0.861105
5.766973
1b620b0f-6f8a-4dc0-b26c-2e2762630f4d
softweight/My_OJ
Leetcode/Problem/#938_Range_Sum_of_BST/938.cpp
#include<iostream> #include<vector>; using namespace std; 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), left(...
ALGO
0.999996
6.160478
53f3f54a-e7fc-41a3-908f-28269693a622
JedraJacek/school
zsl/programowanie obiektowe/21.09.16/Zadanie 2/main.cpp
#include <iostream> using namespace std; class rectangle{ public: float a; float b; float rectangleArea(float a, float b); float rectangleCircumference(float a, float b); }; float rectangle::rectangleArea(float a, float b){ float Area = a*b; cout << Area << endl; }; float rectangle::rectangleCircu...
TOOL
0.962548
4.59361
2eaee3bc-b420-492b-a153-fd4adfca52ea
abelkm99/competitive_programming
2357-make-array-zero-by-subtracting-equal-amounts/2357-make-array-zero-by-subtracting-equal-amounts.cpp
class Solution { public: int minimumOperations(vector<int>& nums) { sort(nums.rbegin(), nums.rend()); while(nums.size() and nums.back() == 0) { nums.pop_back(); } reverse(nums.begin(), nums.end()); int sm = 0; int cnt = 0; for (int i = 0; ...
ALGO
0.999976
6.135953
c3bdfa8d-18e4-43dc-a406-88832231495c
sushant054/Numerical_computing
random/sys_of_linear_eqn/gaussian2/gaussian.cpp
#include "gaussian.hpp" #include <iostream> void printMatrix(std::vector<std::vector<double>>& mat) { for (const auto& row : mat) { for (double element : row) { std::cout << element << " "; } std::cout << std::endl; } } void gaussianElimination(std::vector<std::vector<doubl...
ALGO
0.999906
4.232776
bd323e53-fe15-43dc-8893-02ac9b78e2f5
j1lecks/-vue-components
src/Columns/ColumnDecimal.cpp
#include <Common/Arena.h> #include <Common/Exception.h> #include <Common/HashTable/HashSet.h> #include <Common/HashTable/Hash.h> #include <Common/RadixSort.h> #include <Common/SipHash.h> #include <Common/WeakHash.h> #include <Common/assert_cast.h> #include <Common/iota.h> #include <Core/DecimalFunctions.h> #include <C...
TOOL
0.887147
7.931605
97223cbd-3dfc-4202-bef4-5680b56e3189
Ginakira/Code-Archive
Luogu/CF96A-YoungPhy.cpp
#include <iostream> using namespace std; int main() { int n, x = 0, y = 0, z = 0, t1, t2, t3; cin >> n; for (int i = 0; i < n; ++i) { cin >> t1 >> t2 >> t3; x += t1, y += t2, z += t3; } if (!x && !y && !z) cout << "YES"; else cout << "NO"; return 0; }
ALGO
0.999865
3.855203
2adc3665-9d88-4b42-a107-36e06334d691
rikhilramaswamy/code_stash_up
graphs/rainfall_challenge.cpp
#include<climits> typedef vector<int> vi; typedef vector<vi> vii; typedef pair<int, int> npair; typedef vector<npair> vpair; #define pb push_back vpair get_neighbors(int i, int j, int m , int n,vii & elevation_map){ vpair temp; temp.pb(npair(-1,0)); // up neighbors temp.pb(npair(1,0)); temp.pb(npair(0...
ALGO
0.999792
5.921113
eccecadd-411f-421a-9c52-7631dc3209af
MaghodiyaVivek/23dec_vivek_se
Assignment/Modual-3.2/program-5.cpp
/* A A B A B C A B C D A B C D E */ #include <stdio.h> int main() { int v, j; for(v=1; v<=5; v++) { for(j=1;j<=v;j++) { printf("%c ",'A' + j-1); } printf("\n"); } }
ALGO
0.999016
3.288414
3e95662f-11f6-4b26-8437-26ceafefd228
Marawan-Mohamed/Problem-Solving-training
level-1/Atcoder/Phase 1-2/B_Booby_Prize.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define frni(i, a, n) for(int i = a; i < n; ++i) #define SHORT_MAX ((short)0x7FFF) #define SHORt_MIN ((short)0x8000) #define USHORT_MAX ((unsigned short)0xFFFF) #define LL_MAX ((long long)0x7FFFFFFFFFFFFFF...
ALGO
0.999847
3.843788
9011601f-b716-44b3-ab05-60cfb9144e40
maxim-palshin/cpp_samples
Samples/correlRatio/main.cpp
/* calc correlation Ratio for dataset age|brand| ___|_____| 27 | 1 | 33 | 2 | 16 | 3 | 29 | 3 | 32 | 2 | 23 | 1 | 25 | 2 | 28 | 1 | 22 | 3 | 18 | 3 | 26 | 2 | 26 | 1 | 15 | 3 | 29 | 2 | 26 | 3 | */ #include <...
ALGO
0.959618
6.090215
80d11cb0-b497-45ae-a4ab-963a91fd67d9
tiankonguse/ACM
manger/递推/递推/习题/source/杜昆泰/domino.cpp
#include <fstream> using namespace std; long long f[10000]; // f[i]ָ2*iҪijθ ifstream fin("domino.in"); ofstream fout("domino.out"); int main(void) { long all,i; fin>>all; f[0]=f[1]=1; for(i=2;i<=all;i++) f[i]=f[i-1]+f[i-2]; fout<<f[all]<<endl; fin.close(); fout.close(); return 0; }
ALGO
0.999713
3.815473
781b9386-93c5-445d-86f8-5d0c0aaea66d
iampranjaldangwal/Leetcode
0070-climbing-stairs/0070-climbing-stairs.cpp
class Solution { public: int climbStairs(int n) { if(n==0||n==1) return 1; int prev=1,curr=1; for(int i=2;i<=n;i++){ int temp = curr; curr = prev + curr; prev = temp; } return curr; } };
ALGO
0.999973
5.981488
ba7fc49f-9fca-48c2-a352-84047b25f1e1
jzakka/LeetCode
0008-string-to-integer-atoi/0008-string-to-integer-atoi.cpp
class Solution { public: bool isDigit(string::iterator iter) { return '0' <= *iter && *iter <= '9'; } int myAtoi(string s) { long result = 0; auto start = s.begin(); // trim leading whitespace while (*start == ' ') start++; bool isNeg = false; if (*s...
ALGO
0.999315
5.522893
490dd590-790a-4e3e-9914-15fc982e9462
shbhshs/codechef_programs
CHSQARR.cpp
#include<bits/stdc++.h> typedef long long ll; using namespace std; int arr[1001][1001]; int aux[1001][1001]={0}; int Max[1001][1001]; int Max2[1001][1001]; int main() { int n,m,maxc; scanf("%d %d",&n,&m); for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) scanf("%d",&arr[i][j]); //auxiliar...
ALGO
0.9999
3.238212
0c36a752-2a60-4c5f-bd4f-e0e30442aa18
kmjp/procon
atcoder/abc301-350/abc322/d.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999927
3.886127
fc7b4c38-0603-4d72-ad86-2388019161cd
OmayaLise/Engine_2.0
PotatOS_Engine/Libs/physx/source/geomutils/src/intersection/GuIntersectionRayBox.cpp
#include "foundation/PxVec3.h" #include "foundation/PxMathIntrinsics.h" #include "foundation/PxFPU.h" #include "GuIntersectionRayBox.h" #include "GuIntersectionRayBoxSIMD.h" using namespace physx; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////...
ALGO
0.999657
6.309402
862e1c64-a2ea-443a-b06a-3c7c365a163c
sst2020/hsy-cpp
buct-cpp/免费馅饼.cpp
// // Created by hsy on 2024/10/10. // #include <bits/stdc++.h> using namespace std; const int N = 100010; int dp[11][N]; int n; void solve() { int Max = -1; memset(dp, 0, sizeof(dp)); int x, t; for (int i = 0; i < n; i++) { scanf("%d%d", &x, &t); dp[x][t]++; Max = max(Max, t...
ALGO
0.999357
4.434169
d32a422c-bdce-4629-aeb8-aa1fcb2778e2
bill871121/-algorithm
test1/test1/main_pricing_options.cpp
#include <iostream> #include <vector> #include <cmath> // standard C mathematical library #include <algorithm> // defines the max() operator using namespace std; #include "Asian_options.h" #include "bernudan_option.h" #include "BS_option.h" #include "lookback_option.h" int main(int argc, char const *argv[]) { // ...
ALGO
0.999153
4.832818
cb7fc568-4464-40c4-801c-cfe3224d120d
GrootTheDeveloper/OLP-ICPC
2025/C++/vinhdinhcoder/dp/dplaga1.cpp
#include <bits/stdc++.h> const int mod = 1e9 + 7; using namespace std; struct BigNum { string s; BigNum(string t = "0") { if (t.empty()) s = "0"; s = t; } BigNum operator + (const BigNum &other) { vector<int> fi,se; string a = s; string b = other.s; ...
ALGO
0.999963
4.682788
0f13791d-42cd-4ef1-94aa-5ac5a479685c
bhavinmoriya/Learning-C-
Algorithms/GoldsmidthInv.cpp
#include <iostream> #include <cmath> // For abs() and pow() using namespace std; // Function to perform Goldschmidt's division double goldschmidt_division(double dividend, double divisor, int max_iterations = 50) { // Step 1: Initial approximation of the reciprocal of the divisor cout << "Choose the reciproc...
ALGO
0.999829
6.867223
2db0b47e-b79e-4585-bf6b-b0718e70ea2d
Luyoung0001/Alpha_A
chap1_lang_basic/forn5.cpp
#include <iostream> using namespace std; // 训练1-14: 输入一个整数n (0< n <10),输出n !。 // 这里采用递归的方法来实现 int jie(int n) { if (n == 1) { return 1; } return n * jie(n - 1); } int main() { int n; cin >> n; cout << jie(n) << endl; return 0; }
ALGO
0.999852
4.207176
a3cf2f00-20ff-463d-bb9b-447e7df9f929
DrSwad/CP
Submissions/Codeforces/1779/1779B.cpp
#include <bits/stdc++.h> using namespace std; void test_case() { int n; cin >> n; if (n == 3) cout << "NO\n"; else if (n % 2 == 0) { cout << "YES\n"; for (int i = 0; i < n; i += 2) { if (i) cout << " "; cout << "1 -1"; } cout << "\n"; } else { cout << "YES\n"; int a = (...
ALGO
0.999838
3.929721
4eb4a90c-730b-4dd1-b30a-dc19c84d6b1f
quyifei23/gem5-for-CXL
gem5/src/systemc/tests/systemc/misc/v1.0/dash4/speed.cpp
/***************************************************************************** speed.cpp -- Definition of the speedometer. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*************************************************************...
ALGO
0.873634
6.056402
b26621b0-462c-4f8c-90a8-459677aab56a
florian-coder/Olympiad-Problems
dfs.cpp
#include <iostream> #include <queue> #include <vector> #include <fstream> #define INF 1000005 #define dim 100001 using namespace std; ifstream in("dfs.in"); ofstream out("dfs.out"); vector <int> graf[dim]; int n, m; bool visited[dim]; void dfs(int s) { visited[s]=true; for(int i=0;i<graf[s].size();i++) { ...
ALGO
0.999639
4.586067
c66c29d8-8fcd-43cb-a76b-34916296f7f5
kingarthur11/leetcode
solution/1100-1199/1106.Parsing A Boolean Expression/Solution.cpp
class Solution { public: bool parseBoolExpr(string expression) { stack<char> stk; for (char c : expression) { if (c != '(' && c != ')' && c != ',') stk.push(c); else if (c == ')') { int t = 0, f = 0; while (stk.top() == 't' || s...
ALGO
0.999778
5.897534
8098e0fa-fe79-4578-891e-84d1b9c276ad
ishandutta2007/codeforces
golovanov399/normal/1716/F.cpp
#include <bits/stdc++.h> #include <cstdint> #include <istream> #include <ostream> using std::istream, std::ostream; template <uint32_t base> struct Montgomery { using i32 = int32_t; using u32 = uint32_t; using u64 = uint64_t; static constexpr u32 mod() { return base; } static constexpr u32 np = []() { u3...
ALGO
0.999916
4.083734
395c861b-67ed-4683-946b-f68aefbf99da
Shubh08am/Leetcode_DSA_Problems-Solutions
382. Linked List Random Node.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* dummy ,*hd;...
ALGO
0.999513
5.272256
cd311121-600f-4d21-adff-61308ae19759
boyplus/competitive-programming
TOI/TOI6/hotel.cpp
#include <cstdio> int main(){ int n; long long sum = 0; scanf("%d",&n); while(n>=15){ n-=15; sum+=3000; } if(n==14 || n==13 || n==12 || n==11 || n==10 || n == 9) sum+=3000; if(n == 8) sum = sum+1500+800+500; if(n == 7) sum+=2300; if(n==6) sum+=2000; if(n==5 || n==4) sum+=1500; if(n == 3) sum+...
ALGO
0.994515
3.533223
29c45b69-0d45-46b9-bcb2-550b78382e13
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_2423_9.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long t; cin >> t; while (t--) { long long n, a, b; cin >> n; for (int i = 0; i < n / 2; i++) { cin >> a >> b; cout << -b << " " << a; } cout << endl; } }
ALGO
0.998538
3.128146
2df552bb-5f41-4b02-a953-6b842edc26dd
ashutoshadhao/Leetcode
0692-top-k-frequent-words/0692-top-k-frequent-words.cpp
class comp { public : bool operator()( pair<int,string> &a , pair<int,string> &b ){ if( a.first == b.first ) return a.second < b.second ; return a.first > b.first ; } }; class Solution { public: vector<string> topKFrequent(vector<string> &words, int k) { ...
ALGO
0.999997
5.785842
0bc17c3b-8124-41a7-b6a6-de7fc75f7d24
kryptonite43/Algorithm_study
BOJ/cpp/17826.cpp
#include <iostream> #include <cstdio> using namespace std; int main() { int arr[51], hong; arr[0] = 0; for (int i=1; i<=50; i++) { cin>>arr[i]; } cin>>hong; for (int i=1; i<=50; i++) { if (arr[i]==hong) { if (i<6) printf("A+\n"); else if ...
ALGO
0.998694
3.362305
809526fa-8a1c-4476-b799-f0c5e317dd84
Ellisontung/Solved_Leetcode_questions
125-valid-palindrome/125-valid-palindrome.cpp
class Solution { public: bool isPalindrome(string s) { for(int i = 0, j = s.size()-1 ; i<j ; i++,j--){ while(!isalnum(s[i]) && i<j) i++; while(!isalnum(s[j]) && i<j) j--; if(toupper(s[i])!=toupper(s[j])) return false; } return true; } };
ALGO
0.999365
6.236931
109c5452-8b7a-432a-8503-e6ff8740a435
JustAG7/Competitive_Programming
ICPC/2024/The 2023 ICPC Asia Taoyuan Regional Programming Contest/D.cpp
#include<bits/stdc++.h> using namespace std; /*BITWISE*/ #define mask(n) (1LL << (n)) #define testBit(n, bit) ((n) & mask(bit)) #define flipBit(n, bit) ((n) ^ mask(bit)) #define cntBit(n) (__builtin_popcountll(n)) /*SHORTCUTS*/ #define endl '\n' #define fi first #define se second #define mp make_pair #define pb push_...
ALGO
0.999711
4.977913
84f3ca38-1e71-43b5-a3c0-d04792214912
watermelonlh/Interview-Qs
leetcode/Search.for.a.Range.cpp
class Solution { public: vector<int> searchRange(int A[], int n, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function vector<int> ans(2); ans[0] = -1, ans[1] = -1; int l = 0, r = n - 1; while (l < r) { int mid...
ALGO
0.99986
6.404462
ccd1c5e8-53be-4507-ac5a-48569979e454
ishandutta2007/codeforces
interestinglsy/normal/1264/D2.cpp
// InterestingLSY // codeforces&github: interestingLSY, qq: 2659723130 // #ifdef intLSY #include <intlsy/stdc++.h> #else #include <bits/stdc++.h> #endif #include <bits/c++0x_warning.h> using namespace std; #define il inline #define elif else if // Type #define ld double #define ll long long #define ull unsigned ll /...
ALGO
0.99994
3.909317
733c0c94-40b8-4d0e-aae6-b9d9ea2445c4
Samuelhcq/Graphes
TP1/code/graphs/graphListAdj.cpp
#include "graphListAdj.hpp" #include <algorithm> GraphAdjSet::GraphAdjSet(std::string &filename) { import_dimacs_file(filename, *this); } GraphAdjSet::GraphAdjSet(vertex nb_vertices, float proba_edges, vertex seed) { generate_random(nb_vertices, proba_edg...
ALGO
0.975302
5.556509
f8416aa7-14cd-4c89-8ec5-463c61b50e3a
ren517/lanqiao
dfs/数字接龙1.cpp
#include <iostream> using namespace std; const int N = 15; int n, k; int arr[N][N]; int ans[1000]; bool mark[N][N][N][N]; bool vir[N][N]; int dx[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1}; int f = 0; void dfs(int x, int y, int dep) { if (f) return; if (x == n && y == n &...
ALGO
0.99988
3.907072
8c981859-f2fb-4a74-83a4-cfaa0a71f338
nishantbhardwaj2004/DSA-in-Cpp
Loops 1/assignment on loop/GP.cpp
#include <iostream> using namespace std; int main(){ cout<<"Enter a Number : "; int n; cin>>n; int a = 3; for( int i=1;i<=n;i++){ cout<<a<<endl; a = a * 4; } }
ALGO
0.999808
3.381524
22adbf10-a8a8-4875-8d70-7fd2c6cf5603
Pratham754/leetcode
153-find-minimum-in-rotated-sorted-array/find-minimum-in-rotated-sorted-array.cpp
class Solution { public: int findMin(vector<int>& nums) { int left = 0, right = nums.size()-1; while(left<right){ int mid = left + (right-left)/2; if(nums[mid] <= nums[right]){ right = mid; } else left = mid+1; } return ...
ALGO
0.999988
5.93355
8f1f7828-19ec-4dac-a06f-f61f918b0f1b
ishandutta2007/codeforces
_ss/normal/1058/B.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double const ll maxn=1e2+1; struct toado { ld x,y; }; int n,m,d; toado a[10]; ld s=0; ld area(ld x1,ld y1,ld x2,ld y2,ld x3,ld y3) { return abs((x2-x1)*(y2+y1)+(x3-x2)*(y3+y2)+(x1-x3)*(y1+y3))/2; } bool check(ld x,ld y) { l...
ALGO
0.99995
4.170416
00467f9b-0373-4c2c-a98a-2ce24c017be5
KremaktalanA/Jutge-Problems
P38045.cpp
#include <iostream> #include <math.h> using namespace std; int main() { double x; cout. setf(ios::fixed); cout. precision(6); double arr = 0; int qua = 0; while (cin >> x) { qua = pow(x,2); arr = sqrt(x); cout << qua << " " << arr << endl; } }
ALGO
0.996655
3.616308
274c7089-8c34-46bd-a1fc-f240100ae0b6
Xuechun-Hu/possion_reconstrction
libigl/include/igl/copyleft/cgal/half_space_box.cpp
#include "half_space_box.h" #include "assign_scalar.h" #include <CGAL/Point_3.h> #include <CGAL/Vector_3.h> template <typename DerivedV> IGL_INLINE void igl::copyleft::cgal::half_space_box( const CGAL::Plane_3<CGAL::Epeck> & P, const Eigen::MatrixBase<DerivedV> & V, Eigen::Matrix<CGAL::Epeck::FT,8,3> & BV, Eig...
ALGO
0.999624
6.590269
eeb2145d-9436-4c53-be70-26ea71011ee4
gamilian/acwing
cat.cpp
#include <iostream> using namespace std; typedef long long LL; const int mod = 1e9 + 7; int qmi(int m, int k, int p) { int res = 1; while (k) { if (k & 1) res = (LL) res * m % p; k >>= 1; m = (LL) m * m % p; } return res; } int main() { int n; cin >> n; int res =...
ALGO
0.999973
4.718953
bac9f80f-17a4-42a6-982f-28e155755671
Tushar1805/coding_roadmap
DSA/Binary Search/BS on 1D array/2.cpp
// Given a sorted array arr[] of size n without duplicates, and given a value x. // Floor of x is defined as the largest element k in arr[] // such that k is smaller than or equal to x. Find the index of k(0-based indexing). #include<bits/stdc++.h> using namespace std; int findCeil(vector<long long> &arr, long long n...
ALGO
0.999907
5.403375
c2f0b542-6b48-4e48-ac1f-0b02ebefc40e
divyansh2212/Practice-Problems
Broken_Dreams.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int t; cin >> t; while (t--) { int n, k; cin >> n >> k; string s; cin >> s; } return 0; }
ALGO
0.999479
3.802341
ab3bfdca-ff5f-458e-883c-9b7894be043c
manikanta2901/ubuntu
.history/imp/cpp/Algorithm/DynamicPrograming/BinomialCoefficient_20210117163819.cpp
//Its is similar to fabinocci series #include<bits/stdc++.h> using namespace std; int GetBinomialValue(int n, int k){ int dp[n + 1][k + 1]; for(int i = 0; i <= n; i++){ for(int j = 0; j <= min(k,i); j++){ if(j == 0 || j == i){ dp[i][j] = 1; }else{ ...
ALGO
0.999989
5.046564
4e53cbac-0d52-46d1-aa32-953754a3615c
sidjha57/Coding
C++/Codeforces/A_Counterexample.cpp
//template #include<bits/stdc++.h> //#include<ext/pb_ds/assoc_container.hpp> //#include<ext/pb_ds/tree_policy.hpp> //#include <ext/pb_ds/trie_policy.hpp> //using namespace __gnu_pbds; using namespace std; //typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds; //typedef trie<strin...
ALGO
0.999786
3.533619
01ff47dd-cc28-4ea9-8a2e-7f08e2810f6b
moti9/iCode
cp/Blobby_Volley_Scores.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 void solvehere() { int n; cin >> n; string s; cin >> s; int sa = 0, sb = 0; char server = 'A'; for (int i = 0; i < n; i++) { if (server == s[i]) { if (server == 'A') ...
ALGO
0.999778
4.841529
7a83c753-26e3-4922-b097-8306920a66c8
SysoutSunny/Programmers
C++/Level 0/arr_2multyple.cpp
#include <string> #include <vector> using namespace std; // ܼϰ 迭 // push_back ؼ ־µ ٸ for(auto a : numbers) ȸ vector<int> solution(vector<int> numbers) { vector<int> answer; for (int i = 0; i < numbers.size(); i++) { answer.push_back(numbers[i] * 2); } return answer; }
ALGO
0.999713
4.883121
80a52352-e5f8-4f17-8cd3-a1ee55821257
burninghell2002/competitive_solution
Shruti/reverse_string.cpp
//https://practice.geeksforgeeks.org/problems/reverse-words-in-a-given-string5459/1 #include<iostream> using namespace std; string reverse(string s) { string ss="",helper=""; int ind=0; for(int i=0;i<s.length();i++){ if(s[i]!='.'){ helper+=s[i]; c...
ALGO
0.997354
3.22612
4753ad45-efbb-46c2-ae06-90a7f533df1d
raj200501/Quantum-Computing-Simulation-Framework-QCSF
quantum_simulation/quantum_state.cpp
#include "quantum_state.h" #include <cmath> #include <iostream> QuantumState::QuantumState(int num_qubits) : num_qubits(num_qubits) { int dim = 1 << num_qubits; state_vector.resize(dim, {0, 0}); state_vector[0] = {1, 0}; // Initialize the state to |0> } void QuantumState::apply_gate(const QuantumGate &gat...
ALGO
0.996712
5.871845
f345a0b3-2c61-4ebe-9f71-bdf782802ec1
AmrishKhanna/algos_ds
Strings/Anagrams.cpp
#include <iostream> #include <string> #define NO_OF_CHAR 256 using namespace std; // // Time Complexity : O(n) // Space Complexity : Constant space of 256 // bool isAnagram(const string &s1, const string &s2) { if(s1.length() != s2.length()) return false; int arr1[NO_OF_CHAR] = {0}; int arr2[NO_OF_CHAR] = {0};...
ALGO
0.999961
4.853316
285ba46b-cf2b-4c75-92c4-6ea62de52edc
Maawiya06/GFG-Content
Difficulty: Easy/Parenthesis Checker/parenthesis-checker.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool isBalanced(string& s) { // code here stack<char> st; for(int i = 0; i < s.length(); i++){ char ch = s[i]; if(ch == '(' || ch == '[' || ch == '{...
ALGO
0.988174
6.28777
1e598168-cc7e-4071-8e44-9e8dbd4dd56b
Randy1812/DSA
07 Queue/05_double_ended_queue_using_linked_list.cpp
#include<iostream> using namespace std; struct Node { int data; Node *prev,*next; }*front=NULL,*rear=NULL; void enqueue_front(int x) { Node *t = new Node; if(!t) { cout<<"Memory Overflow. Queue is full.\n"; return; } else { t->data=x; t->next=NULL; t->prev=NULL; if(front==NULL) ...
ALGO
0.999955
3.873687
dcc0967d-13ea-40d8-a3e7-07aa52bd2f68
Tommimon/advent-of-code-2022
Tommimon/d17/part1and2.cpp
#include <iostream> #include <fstream> #include <vector> #include "py++.hpp" using namespace std; using namespace py; #define ROCK_NUM 2022 const int h = ROCK_NUM*100+10; bool collision(char grid[h][7], vector<string> rock, int x, int y) { for (int i = 0; i < rock.size(); ++i) { for (int j = 0; j < rock...
ALGO
0.998274
3.919167
43f76b92-39c9-40e9-b707-7097660888b3
brijs/udacity-self-driving-c5-project
project/starter_files/velocity_profile_generator.cpp
/********************************************** * Self-Driving Car Nano-degree - Udacity * Created on: September 20, 2020 * Author: Munir Jojo-Verge **********************************************/ /** * @file velocity_trajectory_generator.cpp **/ #include "velocity_profile_generator.h" #include <cfloat> ...
ALGO
0.998325
6.346406
6d7d4f82-79de-4754-9d30-6b42a28e8625
Mr-DarkTesla/Algo-mipt-course
s02/c05/C.cpp
#include <iostream> #include <set> #include <map> #include <string> #include <vector> class Solver { public: void Input() { std::cin >> str_1_; std::cin >> str_2_; } void Request() { if (str_1_.length() > str_2_.length()) { std::cout << 0; return; } Prepare(); size_t ans =...
ALGO
0.99998
5.551263
5dce9cb5-611f-48db-bcb9-b8f08fef426b
gauravsane/cricketGame1
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
4d8f260b-f8d7-4e1c-a542-ed0fb15eaf79
PedroDSFerreira/uni-so
03/code/counter/utils.cpp
#include "utils.h" #include "dbc.h" #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> // #define EXCEPTION_POLICY // #define EXIT_POLICY // DEFAULT #if defined __cplusplus && defined EXCEPTION_POLICY #define check_alloc(pnt) \ if ((p...
TOOL
0.86121
5.312387
88e7cc9b-9499-4150-9288-00710aef7938
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10117_17.cpp
#include <bits/stdc++.h> using namespace std; const int p = 500005; int a[p], b[p], t, x, y, n, res, z, m[710][710]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for (int i = 0; i < n; i++) { cin >> z >> x >> y; if (z == 1) { a[x] += y; for (int i = 1; i < 701; ...
ALGO
0.999626
3.69525
c2d632c0-7b0f-44bd-874d-2c646a517d41
luyencode/cpp-solutions
solutions/btaDn3kC.cpp
/* Sưu tầm bởi @nguyenvanhieuvn Thực hành nhiều bài tập hơn tại https://luyencode.net/ */ #include<stdio.h> #include<conio.h> #include<math.h> #define MAX 100 void nhap (int a[], int &n) { do { printf("\nNhap so phan tu: "); scanf("%d", &n); if(n <= 0 || n > MAX) { ...
ALGO
0.997531
3.475192
cd36f50a-50a2-446d-8a1c-3665dd070517
vvm1004/Algorithm
HoanVi.cpp
#include <iostream> using namespace std; bool check[100]; int hoanVi[100]; void printHoanVi(int hoanVi[100], int n){ for(int j=1; j<=n; j++){ cout<<hoanVi[j]; } cout<< "\n"; } void timHoanVi(int k, int n){ for(int i=1; i<=n; i++){ if(check[i]){ hoanVi[k] = i; if(k==n){ printHoanVi(hoanVi...
ALGO
0.999882
4.182223
abdfc9d1-c325-4b1c-8624-65811835c8d7
MatheusOliveira2/CG
SistemaSolar/vart/source/naturalinterpolator.cpp
/// \file naturalinterpolator.cpp /// \brief Implementation file for V-ART class "NaturalInterpolator". /// \version $Revision: 1.2 $ // The NaturalInterpolator has been replaced with NoisyDofMover #include "vart/naturalinterpolator.h" #include <cmath> // FORMULA: // (sin((x*overshoot+1.5)*pi)+1)/2*offset // where ov...
ALGO
0.961158
6.241178
c44ebf2d-c69b-4dff-868a-4b9976cfe966
mattiasve/LINMA2710-Scientific-Computing
hw2/codes/main.cpp
#include <stdio.h> #include <iostream> #include <Fade_2D.h> #include <cmath> #include <tuple> #include <armadillo> #include <assert.h> #include "solver.hpp" void write_solution(const char fname[], vector<double> x, vector<double> y, vector<double> u) { FILE* f = fopen(fname, "w"); if (f == NULL) { per...
ALGO
0.99977
5.766292
00147af9-2ad6-425f-b5d9-6415ef1bdf04
ifradK/Competitive-Programming-Solutions
C++ Programs/Fair Game.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; main() { int i,n,b,c,bcnt=0,ccnt=0; cin>>n; int a[n]; for(i=0;i<n;i++) { cin>>a[i]; } c=a[0]; for(i=1;i<n;i++) { if(c!=a[i]) { b=a[i]; break; } } for(i=0;i...
ALGO
0.999987
3.149478
b9ce71bb-682e-4d1b-a848-6c87a985d1c3
Parth-Thakar/Practice-Questions-C-
CheckSubste.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; bool binary(int arr[],int size,int key) { int start = 0; int end = size-1; int mid = start+(end-start)/2; while(start<=end) { if(arr[mid]==key) { return true; } if(key>arr[mid]) { start = mid +1; } else if(key<arr[mid]) { en...
ALGO
0.999854
4.453517
bce57b8f-46b2-46b8-bbe4-e563d61d6ed0
UET-2425HK2-INT2210-01/23021448-CTDL-GT
Lect5_Assignments/Lect5_assignment.cpp
#include <iostream> #include <vector> using namespace std; // Số lượng nút tối đa const int MAXN = 1005; // Danh sách kề để lưu cây vector<int> adj[MAXN]; // Mảng lưu cha của mỗi nút int parent[MAXN]; // Mảng lưu chiều cao của mỗi nút int height[MAXN]; // Vector để lưu kết quả duyệt vector<int> preorder, postorder...
ALGO
0.999996
5.947541
0e30e6ca-b869-4529-bb4b-7642567514ea
sarvex/leetcode-java
solution/0900-0999/0905.Sort Array By Parity/Solution.cpp
class Solution { public: vector<int> sortArrayByParity(vector<int>& nums) { for (int i = 0, j = nums.size() - 1; i < j;) { if (nums[i] & 1) swap(nums[i], nums[j--]); else ++i; } return nums; } };
ALGO
0.999998
5.634002
d9557ef1-e8db-483d-9ef9-39b0387ad18f
KaMeHb-UA/X-Ray-1.6
src/utils/xrAI/compiler_smooth.cpp
#include "stdafx.h" #include "compiler.h" #include "cl_intersect.h" // MagicFM #pragma warning(disable:4995) #include <MgcAppr3DPlaneFit.h> #pragma warning(default:4995) const float RCAST_DepthValid = 0.2f; IC void BoxQuery(Fbox& BB, bool exact) { if (exact) XRC.box_options (CDB::OPT_FULL_TEST); else XRC.box_o...
ALGO
0.998982
5.374441
df1bba71-64ef-4e97-8ae7-f7f5aba43e12
Sabrina-Prity/XPSC_Batch_04
Week-14/Day-7/C_Colorful_Table.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while(t--) { int n,k; cin >> n >> k; vector<pair<int,int>> v; for(int i=1; i<=n; i++) { int x; ...
ALGO
0.999882
3.849594
96d2a597-791d-473f-8e84-6d17b44594dd
luqmanarifin/cp
Codeforces/895E.cpp
#include <bits/stdc++.h> using namespace std; struct item { item() {} item (int v, int len) : len(len) { x = (double) v * len; a = b = push = 0; } double x, a, b; int len; bool push; }; struct segtree { segtree(vector<int> a) : a(a), n(a.size()) { num.resize(n << 2); build(1, 0, n - 1);...
ALGO
0.999657
4.289225
99e748f8-8914-46ec-a562-58a320a1fe7d
aaryan182/dsa-prac
S-8BitManipulation/L-2InterviewProb/2_singleno.cpp
// https://leetcode.com/problems/single-number/ class Solution { public: int singleNumber(vector<int>& nums) { int singleno = 0; for (int num : nums) { singleno ^= num; } return singleno; } };
ALGO
0.999054
5.72543
6cd64932-83ee-425c-983b-69bde92c94d6
rajeeb7341/CodeChef
FLOW009.cpp
#include<iostream> #include<iomanip> using namespace std; int main() { int n; cin>>n; double q,p; double cost; for(int i=0;i<n;i=i+1) { cin>>q>>p; if(q>1000){ cost=q*p*0.9; } else { cost=q*p; } cout<<fixed<<setprecision(6)<<cost<<endl; ...
ALGO
0.996428
3.809539
1adc9912-256a-4bec-8b9d-eb9208807351
hzy9819/std_model
Graph/Graph_base.cpp
// 邻接表 /* 描述一条有向边 to:指向的点 next:下一条边 w:边权 */ struct Edge { int to, next, w; }; /* 加入一条边 x,y:边 x->y w: 边权 e: 边数组 lst: 邻接表头(初始值为-1) d:边数(每次插入+1) */ void add(int x, int y, int w) { e[d].to = y, e[d].next = lst[x], e[d].w = w, lst[x] = d++; } /* 实例:遍历一个点所有的相邻点 x: 遍历点 */ void For(int x) { for(int i = lst[...
ALGO
0.999533
4.546507
3a230fb6-100c-43ca-98c9-bfa4ad4d0390
jkbells/C-Crash-Course
Bit Manipulation/Q # 1/bitman.cpp
#include<iostream> using namespace std; int getbit(int n,int pos) { return ((n & (1<<pos))!=0); } int setbit(int n,int pos) { return (n | (1<<pos)); } int clearbit(int n,int pos) { int mask = ~(1<<pos); return (n & mask); } int updatebit(int n,int pos,int value) { int mask = ~(1<<pos); n = n...
ALGO
0.971259
4.902618
ea433c8d-26f5-43d8-9a8d-4f7328e28ae3
vsrimanvith/Leetcode-Submissions
1610-xor-operation-in-an-array/1610-xor-operation-in-an-array.cpp
//Author: Sri Manvith Vaddeboyina class Solution { public: int xorOperation(int n, int start) { int k=0; for(int i=0;i<n;i++) { k^=start+2*i; } return k; } };
ALGO
0.999899
4.806452
00279799-02ca-4df8-99e4-cf5bd5aafa74
al3x-X-y/CP-Solves
Minimum_cost_for_climbing_stairs.cpp
/* You are given an integer array cost where cost[i] is the cost of ith step on a staircase. Once you pay the cost, you can either climb one or two steps. You can either start from the step with index 0, or the step with index 1. Return the minimum cost to reach the top of the floor. Example 1: Input: cost = [10,15,20]...
ALGO
0.999951
5.756882
bd8a582d-1799-4202-9112-8748601beb2e
rafalbachorz/smina-code
src/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); Eigen::VectorXf v(4); mat << 1, 2, 6, 9, 3, 1, 7, 2; v << 0,1,2,3; //add v to each row of m mat.rowwise() += v.transpose(); std::cout << "Broadcasting result: " << std::...
ALGO
0.995105
4.296038
4857e618-6b24-4b49-a2c9-36032ec283fd
RavenColEvol/competitive-journey
Easy/Hackerearth/gameOfNumber.cpp
#include<bits/stdc++.h> using namespace std; int main() { int len ; cin >> len; int arr[len]; for(int& i : arr) cin >> i ; for(int i = 0; i < len ; i++) { bool flag = true; for(int j = i + 1; j < len; j++) { if(arr[j] > arr[i]) { for(int k = j + 1; k < len; k++) { if( arr[k] < arr[j]) ...
ALGO
0.999954
3.543792
d6c57bc7-13b6-4c28-842a-6fa6d5b21783
shubhampal39/programming
coding_blocK_cp/mathematics/unsolved/power(logn).cpp
#include<iostream> using namespace std; int powerof(int n,int p) { if(p==0) {return 1;} int ans=powerof(n,p/2); if(p%2==0) { return ans*ans; } else { if(p>0) { return n*ans*ans; } else { return (ans*ans)/n; } } } int main() { int n,p; cin>>n>>p...
ALGO
0.999943
4.438002
0b3ed8cc-e452-4e2b-811d-fa60ee29865b
lilelr/IterationLinkList
1/indexed_priority_queue_min_heap.cpp
// // Created by lilele on 2024/5/4. // #include <iostream> #include <vector> #include <algorithm> class IndexedPriorityQueueMin { public: // Constructor initializing vectors IndexedPriorityQueueMin(size_t size) : data(size + 1, INT_MAX), indices(size + 1, 0), heapSize(0) {} // Function to change the prio...
ALGO
0.999953
6.196505
a1266051-e170-4597-ba9b-3a8f0e79f222
jainrishabh98/CP
cf1295C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while (t--) { string s, t, c; cin >> s >> t; int n = t.length(); int m = s.length(); vector<int> v[26]; ...
ALGO
0.999885
4.040554
940b0c2d-f7c0-402c-8199-85af3efafbdf
revyos-rocm/llvm-project-rocm
llvm/tools/llvm-mca/CodeRegion.cpp
#include "CodeRegion.h" namespace llvm { namespace mca { bool CodeRegion::isLocInRange(SMLoc Loc) const { if (RangeEnd.isValid() && Loc.getPointer() > RangeEnd.getPointer()) return false; if (RangeStart.isValid() && Loc.getPointer() < RangeStart.getPointer()) return false; return true; } void CodeRegio...
TOOL
0.874219
7.916625
c274241c-9be7-4de7-8073-f0f2e2b11eb6
codulluiandrei/pbinfo
pbinfo-972/main.cpp
#include <iostream> #include <string.h> using namespace std; char carac[300]; char voc[] = "aeiou", cons[] = "bcdfghjklmnpqrstvwxyz"; int rez = 0; int main() { cin.get(carac, 300); for (int i = 1; i < strlen(carac) - 1; ++i) if (strchr(voc, carac[i]) &&strchr(cons, carac[i - 1]) && strchr(cons, carac[i ...
ALGO
0.999242
4.002044
49031638-f95b-4bec-aa23-55d0ed7bbd8a
otavioon/COLA-2022-Tools
datasets/src/algo/codenet/2/s123977039.cpp
#include<algorithm> #include<iostream> #include<cstring> #include<string> #include<vector> #include<cstdio> #include<cmath> #include<map> #include<set> using namespace std; int n; pair <int,int> a[200005]; int main() { cin>>n; for(int i=0;i<n;i++) scanf("%d",&a[i].first); sort(a,a+n); int ans=0; for(int i=n;i...
ALGO
0.999537
3.345888
36ca1a6e-e9ef-4b8c-bf90-dcced0ad9bc3
mcoder2014/FaceReconstruction
libs/eigen-eigen-5a0156e40feb/doc/examples/TutorialLinAlgRankRevealing.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; A << 1, 2, 5, 2, 1, 4, 3, 0, 3; cout << "Here is the matrix A:\n" << A << endl; FullPivLU<Matrix3f> lu_decomp(A); cout << "The rank of A is " << lu_decomp.rank() << endl; c...
ALGO
0.999785
3.720849
2c56716b-bc86-45a8-8990-11b46f7b8f57
Sahil-Omanwar/DSA
01_Basics of Programming/14_Pass_by_concept.cpp
//In this we will learn about pass by value and pass by referance concept //Arrays are always passed by ref #include<iostream> using namespace std; //Pass by val void DoSome(int num){ num+=5; } //Pass by ref void DoSome1(int &num){ num+=5; } int main(){ int num=10; DoSome(num); cout<<num<<e...
ALGO
0.997259
4.786386
3511d354-746c-48a6-9ded-e34bd8a70b2d
jaycecanale/ucd-csi2312-pa2
Cluster.cpp
// // Created by Jayce on 9/14/2015. // #include "Cluster.h" namespace Clustering { //Copy Constructor Cluster::Cluster(const Cluster &cluster) { size = cluster.size; points = cluster.points; } //Overloaded operator= Cluster &Cluster::operator=(const Cluster &cluster) { i...
ALGO
0.982319
5.32364
7966bb3c-3964-4427-8c9c-26144808ba39
Vinayaka-Voleti/codesprint
Day42/p1.cpp
#include <iostream> #include <vector> #include <string> #include <queue> #include <sstream> using namespace std; struct Node{ int val; Node *left; Node *right; Node(int x) : val(x), left(NULL), right(NULL) {} }; int getDepth(Node *node){ int d = 0; while(node){ d++; node = node->left; } return d...
ALGO
0.998059
4.96619
fbca0b66-f200-4d33-bae3-62dab1b97d5c
Taimoo-r/LeetCode
543-diameter-of-binary-tree/diameter-of-binary-tree.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.999912
6.676125
6511830d-670b-4899-99f3-c8d9d98ac92f
shaun4727/code-files
valid_palindrom.cpp
#include<bits/stdc++.h> using namespace std; int main() { string s = " ", temp; int res = 1; for (int i = 0; i < s.size(); i++) { if ((int(s[i]) >= 48 && int(s[i]) <= 57) || (int(s[i]) >= 65 && int(s[i]) <= 90) || (int(s[i]) >= 97 && int(s[i]) <= 122)) { if (int(s[i]) >= 65 && int(s[i]...
ALGO
0.999959
4.044585
ccc7177d-c95a-4376-99ff-07621bfacdcb
weisurya/nd013-MPC-Controller
src/Eigen-3.3/doc/examples/DenseBase_template_int_middleRows.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << endl; return 0; }
ALGO
0.876942
3.236517
badbe941-53be-4692-a03b-102195275818
EasyCode-Prayaas/Prayaas-Solutions
P5_2202/C_Solution.cpp
#include <stdio.h> int main() { int n; printf("Enter n\n"); scanf("%d", &n); printf("\n====PATTERN====\n\n"); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i * j == 0 || i == n - 1 || j == n - 1) { printf("* "); ...
ALGO
0.999816
4.152234