uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
b866f2c8-500f-4de3-aba2-871cc7ae9acd
ProgramExecuter/StriverSDESheet
Day16-Strings/104__CompareVersionNumbers.cpp
// Time Complexity - O(n + m) // Space Complexity - O(1) class Solution { public: int compareVersion(string version1, string version2) { int i = 0, j = 0, n1 = version1.size(), n2 = version2.size(); while(i < n1 || j < n2) { int num1 = 0, num2 = 0; //...
ALGO
0.999951
5.896019
2a25ff61-9c57-4ea4-924c-c05f8d490544
LKolinko/PolynomialsPractical
Polinom.cpp
#include <sstream> #include "Polinom.h" Polinom::Polinom(std::string &str) { FSM f(str); while (!f.is_end()) { auto u = f.getNode(); data_.PushBack(node(u.first, u.second)); } normalization(); data_.Sort(); } void Polinom::Print() { if (data_.getRoot() == nullptr) { std...
ALGO
0.999442
3.916921
bf6c496e-7691-4acd-b797-3fbc16caf61f
koharashota/pulsar
assets/past/DiscreteFourierTransform.cpp
#include <iostream> // for cout #include <math.h> // for sin(), cos() #include <stdio.h> // for printf() #define N 100 // 分割数 #define CSV_DFT "DFT.csv" // 出力ファイル (DFT) using namespace std; /* * * 計算クラス * */ class Calc { double SRC_re[N]; //元データの実部 double SRC_im[N]; //元データの虚部 do...
ALGO
0.999308
3.83982
26aaced5-57f1-44d4-80ce-45d20946e1b0
Prithvi-Velicheti/gem5-ramulator2
gem5/src/systemc/tests/systemc/misc/unit/data/general/add_promote/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.97011
5.691682
8f81ac28-b01d-482c-b5e9-65c9bda04229
ChoiDW614/DataStructure
BinarySearchTree/BinarySearchTree/AVLRebalance.cpp
#include <iostream> #include "BinaryTree2.h" #include "AVLRebalance.h" BTreeNode* RotateLL(BTreeNode* bst) { BTreeNode* pNode = bst; BTreeNode* cNode = GetLeftSubTree(bst); ChangeLeftSubTree(pNode, GetRightSubTree(cNode)); ChangeRightSubTree(cNode, pNode); return cNode; } BTreeNode* RotateRR(BTreeNode* bst) { ...
ALGO
0.999806
4.520527
115bdab6-7943-4253-86c8-0d30b77f8638
NirajDN/Leetcode
0221-maximal-square/0221-maximal-square.cpp
class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { if (matrix.empty() || matrix[0].empty()) return 0; int m = matrix.size(); int n = matrix[0].size(); int maxSide = 0; vector<vector<int>> dp(m, vector<int>(n, 0)); for (int i = 0;...
ALGO
0.999822
6.472283
3df91e17-6973-423f-b0ff-bc2dfbcfe7d4
mapis1097/MariaRamos_Ejercicio26
clase26.cpp
#include <iostream> using namespace std; int factorial (int a); // Se crea el método del factorial int main(int argc, char ** argv) { double* arreglo = NULL; int n_side; int i; cout<<"Escriba un numero"<<endl; cin>>n_side; cout << n_side << endl; arreglo = new double [n_side]; cout << "lista factoria...
ALGO
0.987727
3.555081
3e8fccb1-5afd-4433-8025-9c1f8a78ab96
sarvex/leetcode-basic
solution/0700-0799/0798.Smallest Rotation with Highest Score/Solution.cpp
class Solution { public: int bestRotation(vector<int>& nums) { int n = nums.size(); int mx = -1, ans = n; vector<int> d(n); for (int i = 0; i < n; ++i) { int l = (i + 1) % n; int r = (n + i + 1 - nums[i]) % n; ++d[l]; --d[r]; } ...
ALGO
0.999996
5.768404
98525be1-8172-4d9b-ad49-11243f7f8d0e
JLUVicent/leetcode_solution
0144.二叉树的前序遍历/0144-二叉树的前序遍历.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.999991
6.009645
4a8bd54a-67de-47c8-a324-57dc0b790899
ruleless/programming
alg/poj/archive/2942/7304514_WA.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <set> using namespace std; bool edge[1020][1020]; int n; int from[1000005],to[1000005],top; int dfn[1020],low[1020],index,cnt; set<int>Set; set<int>::iterator it; bool inG[1024]; int color[1024]; bool vis[1024]; set<int>S[1020];//联通分量 set<int>::itera...
ALGO
0.99955
4.171091
12dc77ce-a2cc-4c55-bee3-b8b841e3c5ca
mirzaazwad/Competitive-Programming
Resources/PritomKunduAnachorGithubForBlackBox/KnightMare/Temp/IntervalContainer.cpp
#include<bits/stdc++.h> using namespace std; /// Maintains an array of size n, initially all values are same. /// Color(l, r, c): Set a[i] = c for l <= i <= r. /// get(x): return a[x]; struct IntervalContainer { int n; map<int, int> a; int get(int x) { auto it = a.upper_bound(x); return (-...
ALGO
0.999969
3.623424
4704b123-4e2c-4959-838e-dc73f2683043
pmu2022/ising
ising.cpp
// // Created by F.Moitzi on 01.12.2021. // #include "ising.hpp" #include <iostream> #include <algorithm> #include <random> void create_random_matrix(int *ising_matrix, long long int n) { std::random_device rd; //Will be used to obtain a seed for the random number engine std::mt19937 gen(rd()); //Standard mers...
ALGO
0.997813
5.271663
27781476-4085-453a-8f10-4f109f681a5b
lz520520/rust-1.75-ollvm
src/llvm-project/lldb/source/Host/common/FileSystem.cpp
#include "lldb/Host/FileSystem.h" #include "lldb/Utility/DataBufferLLVM.h" #include "llvm/Support/Errc.h" #include "llvm/Support/Errno.h" #include "llvm/Support/Error.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" #include "llvm/Support/Threading.h" #include ...
TOOL
0.855785
3.224515
56afe252-a230-455c-b8a7-f364ddae4f7f
mikechen66/CPP-Programming
CPP-Primer-Plus/chapter09-memorymodel/file1.cpp
// file1.cpp -- example of a three-file program #include <iostream> #include "coordin.h" // structure templates, function prototypes using namespace std; int main() { rect rplace; polar pplace; cout << "Enter the x and y values: "; while (cin >> rplace.x >> rplace.y) // slick use of cin { ...
TOOL
0.920581
4.408605
c750072d-5c16-4a99-a982-6fd941ea7887
rzando-org/leetcode
solution/2900-2999/2910.Minimum Number of Groups to Create a Valid Assignment/Solution.cpp
class Solution { public: int minGroupsForValidAssignment(vector<int>& nums) { unordered_map<int, int> cnt; for (int x : nums) { cnt[x]++; } int k = 1e9; for (auto& [_, v] : cnt) { ans = min(ans, v); } for (;; --k) { int ans ...
ALGO
0.999966
5.683562
f27f742b-8e7a-4bb5-aa0e-3166bcd418c0
mkrechetov/LeetCode
cpp/261_ValidTree.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <set> #include <queue> using namespace std; bool validTree(int n, vector<vector<int>>& edges) { unordered_map<int, set<int>> inc; for (int i=0; i<n; i++) {inc[i] = set<int>();} for (auto e: edges) { inc[e[0]].insert(e[1]); inc[e[1]].i...
ALGO
0.999687
5.700972
fc0cf822-7e9f-438a-8d5b-fefcc61895d4
rohmish2/spoj_solutions
SPOJSOLUTIONS/MRECAMAN.cpp
// Problem: MRECAMAN // Submission ID: 25606396 // Language: 34320 #include<bits/stdc++.h> using namespace std; long long a[500001]; int main() { unordered_map<long long,int>s; for(int i=0;i<=500000;i++) s[i]=0; s[0]=1; for(int i=1;i<=500000;i++) { long long k=a[i-1]-i; if(k>0&&s[k]==0) {a[i]=k; s[k]=...
ALGO
0.999935
3.899729
536ee968-6a5e-478d-afa6-e60a106a3d89
khalil-ryu/Leetcode-submissions
set/2353-Design-a-Food-Rating-System.cpp
class FoodRatings { public: struct Compare { bool operator()(const pair<int, string>& a, const pair<int, string>& b) const { if (a.first == b.first) return a.second < b.second; return a.first > b.first; // Descending order of ratings ...
ALGO
0.999943
5.911999
ac3e64fa-a347-40d5-8508-5262ed70732e
ThaiMinhNguyen/CPP_PTIT
baitoantuyensinh.cpp
#include<bits/stdc++.h> using namespace std; struct SinhVien{ string msv; string ten; float dut; float toan; float ly; float hoa; }; int main(){ SinhVien a; cin >> a.msv; cin.ignore(); getline(cin , a.ten); cin >> a.toan >> a.ly >> a.hoa; if(a.msv[2] == '1'){ a.dut = 0.5; } else if(a.msv[2] == '2'){ ...
TOOL
0.878043
3.243998
8d194192-2d57-44dc-9ed5-0abdce16253b
Mir00r/Hacker-Rank
Data-Structure/Arrays/LeftRotation.cpp
#include <bits/stdc++.h> using namespace std; #define LI long int #define LLI long long int #define LL __int64 #define ULL unsigned long long #define LLU long long unsigned #define row 100 #define col 100 #define MAX 100000 #define jora pair <int, int> #define memo(arr, value) memset(arr, value, sizeof(arr)) #define ...
ALGO
0.99927
4.409333
319716ce-70a3-48cb-907b-91bfcbde55d7
choudharyNetram/DSA
Array/contest/contes.cpp
/*#include<iostream> using namespace std ; #include<algorithm> int main(){ int t ; cin>>t ; while(t--){ int n ; cin>>n ; int arr[n] ; for(int i = 0 ;i<n ; i++){ cin>>arr[i]; } int ans[n] ; for(int i = 0 ;i<n ;i++){ ans[i...
ALGO
0.999863
3.569796
8c4d3390-f26b-4ede-a4da-2a00190db6f4
kuno4n/Codeforces
src/ABBYY3.0-C.cpp
#include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <numeric> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <cassert> #include <cstdarg> #include <sy...
ALGO
0.999925
3.397184
39f300f9-e28b-4dcb-8fd5-7f6fc69b0c66
Shakir-Afridi/My-programs-in-cplusplus
Age calculator.cpp
#include <iostream> using namespace std; int main() { int DOB,MOB,YOB; cout<<"Enter day of birth: "; cin>>DOB; cout<<"Enter month of your birth: "; cin>>MOB; cout<<"Enter year of your birth: "; cin>>YOB; bool correctDOB = true; if (YOB<1900 || YOB>2000) { correctDOB =...
TOOL
0.977582
3.148247
549a8122-2b05-464b-ab00-a57ab916a8b1
muhaiminverse/CP_L
topics_concept_codes/buttons.cpp
#include <bits/stdc++.h> using namespace std; // https://atcoder.jp/contests/abc124/tasks/abc124_a int main() { int a, b; cin >> a >> b; if ( a == b){ cout << a + b << endl; } else if( a > b){ cout << a + a-- << endl; } else{ cout << b + (b-1) << endl; } }
ALGO
0.999929
3.686922
5d3630d6-8804-4088-99c0-241f493a5714
Sharjeel-Memon/SEMESTER-2
LAB TASK-10/Q5.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; class TodoManager { string filename; int nextID() { ifstream fin(filename); string line; int maxID = 0; while (getline(fin, line)) { size_t p1 = line.find(','); int id = stoi(...
TOOL
0.910984
6.655712
079091b7-42ec-4c79-84f9-49706152a1ac
hunjinYang/AlgorithmExercise
链表_链表定义.cpp
//#include<iostream> //#include<vector> //using namespace std; // ////Ķ弰ʵ //class ListNode { //public: // int val; // ListNode* next; // ListNode(int x):val(x),next(NULL){} //}; // //ListNode* createdLinkedList(vector<int> arr) { // if (arr.empty()) { // return nullptr; // } // // ListNode* head = new ListNode(arr[0])...
ALGO
0.999938
4.848905
0ed26bf0-61d1-44b5-84aa-583e698bf8d8
deadlyaman0000/MyCode
Heap/h2-find-kth-element.cpp
#include <bits\stdc++.h> using namespace std; int findKthElement(int *arr, int size, int k) { priority_queue<int> pq; // step 1 push kth element in heap for (int i = 0; i < k; i++) { pq.push(arr[i]); } // step 2 compare and pop root for (int i = k; i < size; i++) { if...
ALGO
0.999952
4.257651
60c20d63-67e3-4bfd-8fc1-8c5e61c02a98
Felle33/Competitive-Programming
usaco/gold/graphs/topological_sort/substr.cpp
#include <algorithm> #include <iostream> #include <cmath> #include <vector> #include <queue> #include <cstring> #include <unordered_map> #include <map> #include <set> #include <iomanip> #include <bitset> #define all(x) (x).begin(), (x).end() #define mp make_pair #define pb push_back #define rep(X,Y) for (int (X) = 0;(...
ALGO
0.999945
3.959865
56e6b7ac-ca12-4e85-9fe2-081a4c1fc7b8
ishandutta2007/codeforces
yasugongshang/normal/1051/G.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define sqr(x) ((x)*(x)) #define mp make_pair inline char gc(){ static char buf[100000],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++; } #define gc getchar inline ll read(){ ll x = 0; char ch = gc(); b...
ALGO
0.999861
3.291849
cd0392ac-4c92-47a0-96a5-65af14055bb8
seungHoon0422/Baekjoon_OJ
9613.cpp
#include <iostream> #include <cstring> #include <cstdio> using namespace std; #define MAX 100 int tc, n; int numList[MAX]; int getGCD(int a, int b) { int tmp; if(b>a){ tmp = a; a = b; b = tmp; } while(b) { tmp = a%b; a = b; b = tmp; } return ...
ALGO
0.999943
3.483864
57372fe1-cad1-431f-8036-a8d75847a027
mk13579/algorithm
Binary_Indexed_Tree_two_dim.cpp
#include<bits/stdc++.h> #define lowbit(x) x&(-x) using namespace std; const int N = 1005; const int M = 1005; int a[N][M]={0}; void add(int x,int y,int v){ for(int i=x;i<N;i+=lowbit(i)) for(int j=y;j<M;j+=lowbit(j)) a[i][j]+=v; } int _sum(int x,int y){ int ret=0; for(int i=x;i>0;i-=lowbit(i)) for(int j=y;j>0;j-=...
ALGO
0.99715
3.026553
84b69a5c-1f8a-485e-9d69-db8572f91eda
MeeLn/C-
lab 4/complex addition using friend and constructor.cpp
#include<iostream> using namespace std; class rational{ int a,b; public: rational(){ a=0; b=0; } rational(int x,int y){ a=x; b=y; } void display(){ cout<<"The rational no is:"<<a<<"/"<<b<<endl; } friend rational add(rational c1,rational c2){ rational c; c.a=c1.a*c2.b+c2....
ALGO
0.993312
4.432775
a778c591-ee2e-4af0-ad5c-8a14131db381
Kchanana2025/Striver-graph-series
step1 and 2/DFS.cpp
// O(N)+O(2E) // O(3N)=O(N) #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { private: void dfs(int node, vector<vector<int>> &adj, vector<int> &vis, vector<int> &ls) { vis[node] = 1; ls.push_back(node); for (auto it : adj[node]) { ...
ALGO
0.999471
6.360579
d425ab71-7fe1-4141-8312-f6854ba21207
mmanley/Antares
antares/src/libs/icu/source/i18n/bms.cpp
#include "unicode/utypes.h" #include "cmemory.h" #include "unicode/bms.h" #include "unicode/unistr.h" #include "unicode/colldata.h" #include "unicode/bmsearch.h" #if !UCONFIG_NO_COLLATION //#define USE_SAFE_CASTS #ifdef USE_SAFE_CASTS #define STATIC_CAST(type,value) static_cast<type>(value) #define CONST_CAST(type,va...
TOOL
0.892829
7.487322
acf94a70-bece-4b50-8245-97d8ec7899ce
elvin-hwang/Tile-Island
ext/opencv/sources/samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp
#include <iostream> // Console I/O #include <sstream> // String to number conversion #include <opencv2/core.hpp> // Basic OpenCV structures #include <opencv2/core/utility.hpp> #include <opencv2/imgproc.hpp>// Image processing methods for the CPU #include <opencv2/imgcodecs.hpp...
TOOL
0.932156
5.459361
dfad45f4-6140-424e-8186-6678a376c551
k2sebeom/learn_flutter
habet/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.998027
6.76073
74d733f7-fd90-43d7-9c85-4240dc6cfda4
123456789asdfjkl/computer-science-in-DLUT-2-
数据结构练习/多项式单链表练习.cpp
#include<stdio.h> #include<stdlib.h> typedef struct Poly{ int coef; int exep; struct Poly *next; }Polynode,*LinkedList; int LinkedList_creat(LinkedList &L)//ʽ { LinkedList p; int n; int i; L=(LinkedList)malloc(sizeof(Polynode)); L->next=NULL; printf("Ҫĵȣ"); scanf("%d",&n); for(i=1;i<=n;i++) { p=(LinkedLi...
ALGO
0.998769
3.056874
306924f2-ceb4-42f6-a04b-7581aeb39ddd
Adrian-Garcia/MyCppAlgorithms
LinkedList/rotateList.cpp
/* 61. Rotate List Medium Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Input: 1->2->3->4->5->NULL, k = 2 Output: 4->5->1->2->3->NULL Explanation: rotate 1 steps to the right: 5->1->2->3->4->NULL rotate 2 steps to the right: 4->5->1->2->3->NULL...
ALGO
0.999875
5.331585
a15c698b-c667-4dfa-b806-9672691d7a5f
codeaholic-shub/ALGO-ADDICT
LEETCODE/C++/min-stack.cpp
// Time: O(n) // Space: O(1) class MinStack { public: void push(int number) { if (elements_.empty()) { elements_.emplace(0); stack_min_ = number; } else { elements_.emplace(static_cast<int64_t>(number) - stack_min_); if (number < stack_min_) { ...
ALGO
0.99982
7.158447
427f2ecc-6522-46d3-bc21-b1354d97685d
seemyhurt/projects_CPP
object_oriented_programming/stl/iterator/iterator.cpp
#include <iostream> #include <list> #include <algorithm> #include <clocale> #include <vector> #include <deque> #include <fstream> #include <Windows.h> using namespace std; int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); setlocale(LC_ALL, "Russian"); list<int> iList1; // пустой список wifstream ...
TOOL
0.878209
3.120165
b8e1fbbe-2765-4681-b08b-5c07e8c8415b
Tagore22/algorithmSolve
algorithmSolve/백준/18411.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int board[3]; for (int i = 0; i < 3; ++i) cin >> board[i]; sort(board, board + 3); cout << board[1] + board[2] << '\n'; return 0; }
ALGO
0.999895
4.542884
b51c9e5c-c417-4cee-adfd-3fea108f4f01
cmberryau/live555
liveMedia/src/ourMD5.cpp
#include "ourMD5.hh" #include <NetCommon.h> // for u_int32_t, u_int64_t #include <string.h> #define DIGEST_SIZE_IN_BYTES 16 #define DIGEST_SIZE_IN_HEX_DIGITS (2*DIGEST_SIZE_IN_BYTES) #define DIGEST_SIZE_AS_STRING (DIGEST_SIZE_IN_HEX_DIGITS+1) // The state of a MD5 computation in progress: class MD5Context { public: ...
ALGO
0.992508
6.584662
7591c90e-00a6-4288-9da5-65fb5c6dbfde
nobushi95/atcoder-archive-cpp
contest_cpp/abc193/A.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; const ll infl = 1LL << 60; const int inf = INT_MAX / 2; #define REP(i, left, right) for (ll i = left; i < right; i++) #define RREP(i, right, left) for (ll i = right; i >= left; i--) #define REPEQ(i, left,...
ALGO
0.997253
3.971065
a55019d2-6f90-41e3-88fe-87f3d6293034
Akhileshmalik23/DSA
70-climbing-stairs/climbing-stairs.cpp
class Solution { public: int find(int n , vector<int>&dp){ if (n == 0 || n == 1) return 1; if(dp[n]!=-1) return dp[n]; return dp[n] = find(n-1,dp) + find(n-2,dp); } int climbStairs(int n) { vector<int> dp(n+1,-1); return find(n,dp); } };
ALGO
0.999994
6.269432
1aec355e-828d-4662-810b-a5928cf91b4c
charul124/100_days_code
Difficulty: Easy/Minimum indexed character/minimum-indexed-character.cpp
//{ Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: //Function to find the minimum indexed character. int minIndexChar(string str, string patt) { unordered_map<char, int> ...
ALGO
0.999823
6.304162
3e4329a5-df7a-429b-b19c-38d915b7f69a
Valerion052/codeforces
training/Codeforces_Round/Жадные_алгоритмы/447B/main.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int k; string s; cin >> s >> k; int alphabet[26]; int price = 0, max = -1, size = s.size(); for (int i=0; i<26; ++i) { cin >> alphabet[i]; if (alphabet[i] > max) {max = alphabet[i];} } for (in...
ALGO
0.999262
3.670148
0f7d085d-d8b0-4a75-8cd0-527473524a6e
ishandutta2007/codeforces
irkstepanov/normal/42/D.cpp
#include <bits/stdc++.h> #define all(a) (a).begin(), (a).end() #define pb push_back #define sz(a) (int)(a).size() using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef unsigned int uint; typedef unsigned long long ull; typedef double ld; int main() { //ifstrea...
ALGO
0.999851
3.335812
7edfe97f-8fda-4896-af2b-5a9b0d0d0da3
vishalvx/cpp-practice-codes
4) Array Practice/whileLoop.cpp
#include <iostream> using namespace std; int main() { #include <iostream> using namespace std; int main() { int sum = 0, number; cout << "Enter the Number : \n"; cin >> number; for (int i = 1; i <= number; i++) { sum += i; } cout << "Sum of " << number << " numbers is: " << sum...
ALGO
0.986002
3.672823
b90b0e6e-5757-446b-81d5-1150bc11ba40
DivineSamOfficial/Snowflake-ELT-Pipeline-with-dbt-and-Airflow
venv/lib/python3.11/site-packages/numpy/_core/tests/data/generate_umath_validation_data.cpp
#include <algorithm> #include <fstream> #include <iostream> #include <math.h> #include <random> #include <cstdio> #include <ctime> #include <vector> struct ufunc { std::string name; double (*f32func)(double); long double (*f64func)(long double); float f32ulp; float f64ulp; }; template <typename T>...
DATA
0.851869
5.937419
4f4131da-bbc7-4b07-bd4a-e3c54eded9d3
HMD-CVA/Code
baitapc++/bt/tachfibo2.cpp
#include <bits/stdc++.h> using namespace std; int j,i,x,a[100005],f[1005][1005],k; int main() { cin>>x; a[1]=1; i=1; while(a[i]<=x) { i++; a[i]=a[i-2]+a[i-1]; } for(j=0;j<i;j++) f[j][0]=0; for(j=0;j<=x;j++) f[0][j]=0; for(j=1;j<i;j++) for(k=1;k<=x;k++) { ...
ALGO
0.999983
3.399865
66ad80ef-a929-4544-9be3-c773cb2fcece
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/14/54/19.cpp
// {{{ #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <cassert> #include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <complex> #include <numeric> #define REP(i, n) for (...
ALGO
0.999849
4.556608
18103c9b-3868-4fd5-ac1a-7d0a40cba0c8
raincross7/code-similarity
codes/train_code/problem256/problem256_432.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<ll, ll>; const ll INF = 1LL << 62; const double PI = acos(-1); const double eps = 1e-10; int main() { ll k, x; cin >> k>>x; cout << (500*k>=x?"Yes":"No")<< endl; return 0; }
ALGO
0.999843
3.393118
0c5dfea2-2045-41fe-94a0-ce7f2965f775
liuchuo/PAT
BasicLevel_C++/1107. 老鼠爱大米 (20).cpp
#include <iostream> using namespace std; int n, m, t, d, D; int main() { cin >> n >> m; for (int i = 0; i < n; i++) { d = 0; for (int j = 0; j < m; j++) { cin >> t; d = max(d, t); } cout << d << ((i == n - 1) ? '\n' : ' '); D = max(D, d); } ...
ALGO
0.999958
4.329558
4e744ef4-9040-47bf-9ecf-6e65a50cf954
MSCR/cpp
cpp_course/006_Foreach/foreach.cpp
#include <iostream> #include <vector> using namespace std; int main() { // ptr-> data int arr[5] = {1, 2, 3, 4, 5}; cout << "The elements on array are: "; for(auto i:arr) { cout << i << ' '; } cout << endl; for(int i=0; i<5; i++) { cout << arr[i] << endl; } ...
ALGO
0.911435
4.31772
94be8b69-03b7-42e6-86f2-db7137d400d3
bcliu430/ECE3574
project3-bcliu430/process.cpp
#include "process.hpp" #include <QJsonArray> #include <QJsonObject> #include <QDebug> #include <QImage> #include <QColor> #include <QJsonParseError> #include <QString> #include <QFile> process::process(const std::string &input, std::string &output, const int &threadNum){ try { parse p(input); geome...
TOOL
0.855786
4.019256
79c8c7fd-5d6d-48c2-adb8-8ed7d105e2f7
RicciWoo/CodePractice
11_DP/Coin_Change-2.cpp
#include <vector> #include <limits.h> #include <iostream> #include <algorithm> using namespace std; // Coin Change-2, Dynamic Programming, 20180829 class Solution { public: int coinChange(vector<int>& coins, int amount) { // sort(coins.begin(), coins.end()); int length = coins.size(); vecto...
ALGO
0.9999
5.531055
7d17638d-5f7d-49c4-a3b9-fb22adc89ddc
kseokc/algorithm
summer coding/6주차 수업/선수과목.cpp
// // Created by 김석찬 on 2022/08/27. // #include<iostream> #include<queue> #include<vector> #define Max 1001 using namespace std; int N, M, to, from; int in_degree[Max]; vector<vector<int>> v; queue<pair<int, int>> Q; vector<int> ans; int main() { cin >> N >> M; v.resize(N + 1); ans.resize(N + 1); for ...
ALGO
0.999994
5.133781
58e1dc83-54c7-4950-a0c2-62ee13471132
Haribala-09/hyprdots
User/History/-3463b14a/lXkQ.cpp
#include <bits/stdc++.h> using namespace std; #define rev(ans) reverse(ans.begin(), ans.end()) #define mems(a, n) memset(a, n, sizeof(a)) #define pb push_back #define fst first #define scd second #define int long long using pii = pair<int, int>; using pci = pair<char, int>; void dbg_out() { cerr << endl; } template ...
ALGO
0.999922
4.415663
8e66598c-2490-4ec1-a97d-82f77830f927
Amaan-Mujawar/SPPU-2019-Pattern-SE-COMP-Sem-IV-Practicals
DSAL/DSAL_Exp-9.cpp
/* Amaan Mujawar COMPUTER SE B Roll No. 56 TSSM’s PVPIT, Bavdhan, Pune */ /* LAB ASSIGNMENT 9: A Dictionary stores keywords & its meanings. Provide facility for adding new keywords, deleting keywords, updating values of any entry. Provide facility to display whole data sorted in ascending/ Descending order. Also find...
ALGO
0.999953
5.25925
2d1c22e5-8b29-4dbf-ac4d-73ed203f9319
Ashish-Sinha07/DSA-Practice
DSA_Problem05.cpp
/*Two sum problem:- Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order*/ #include <iostream> using na...
ALGO
0.999546
5.642448
72aa68a8-7415-4be8-8ac2-a24f6c5d7f31
alexandraback/datacollection
solutions_5669245564223488_0/C++/xiaojudou/cf.cpp
#include<iostream> #include<cstdio> #include<stdlib.h> #include<string> #include<cstring> #include<cmath> #include<algorithm> #define mod 1000000007 using namespace std; int t; int n; string s[110]; int nxt[110]; int ans; int gao() { int li,lj; int pans=0; for(int i=1;i<=n;++i) { li=(int)s[i].l...
ALGO
0.999956
3.919753
5c131b8f-1ca9-4936-838d-3160df6f925b
abacadaea/csci62
1graph/grid.cpp
#include <iostream> #include <queue> using namespace std; // pre: grid is a rectangular n x m grid of 0s and 1s. // 0 means lava, 1 means soild ground // grid[0][0] and grid[n-1][m-1] are guaranteed to be 1 // post: return true if can reach (n-1,m-1) from (0,0) by moving to adjacent squares bool canReach(v...
ALGO
0.999875
5.020483
fbb09ee6-6100-4e98-9ede-db52c39ff703
AdhamHammoda/Competitive-Programming
CODEFORCES_RATING/800/A- Panoramix's Prediction.cpp
#include <bits/stdc++.h> #define FIO ios_base::sync_with_stdio(false); #define ll long long int using namespace std; /// Implementation , lazy /// 7-3-2021 , 4:31 AM void test_case() { ll arr[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47}; set<ll>s; ll mp[50]={0}; for(int i=0;i<15;i++) { s.ins...
ALGO
0.999891
4.402632
0988b300-b829-4dd1-9ee8-20bd56489734
WeiKuoWei/algorithmic-problem-solving
set-03/awesome-numbers/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; vector<int> checker(int n) { vector<int> result; vector<bool> prime_list(n+1,true); prime_list[0] = prime_list[1] = false; for(int i = 2; i*i <= n; i++) { if(prime_list[i]) { ...
ALGO
0.998293
4.808114
76c8784f-4dd0-4753-8c08-250c53ed1a27
shiivamkumar027/BOOTCAMP9-jan-feb-
BinarySearch.cpp
#include<iostream> using namespace std; bool BinarySearch( int arr[], int s , int e,int k) { if(s > e) return false; int mid= s+(e-s)/2; if( arr[mid] == k) return true; else if(arr[mid] < k) { return BinarySearch(arr,mid+1,e,k); } else { return BinarySearch(ar...
ALGO
0.999954
4.044388
6e9238d7-53ce-4b8b-973d-c17e54e656a1
baicie/fucking-algorithm
src/algorithm-cpp-backup/1.两数之和.cpp
/* * @lc app=leetcode.cn id=1 lang=cpp * * [1] 两数之和 */ // @lc code=start #include <vector> #include <unordered_map> using namespace std; class Solution { public: vector<int> twoSum(vector<int> &nums, int target) { unordered_map<int, int> map; vector<int> ans; for (int i = 0; i < num...
ALGO
0.999892
6.226707
a162f07d-6f48-490c-af62-7d0c6a484a37
Razdeep/Codeforces-Solutions
contests/Codeforces Round #677 Div 3/Distincts_connection.cpp
// https://codeforces.com/contest/1433/problem/D // NOT SOLVED #include <iostream> #include <vector> using namespace std; int main() { int tc; cin >> tc; while (tc--) { int n; cin >> n; vector<int> gang(n); vector<bool> visited(n + 1, false); for (int i = 0; i < n...
ALGO
0.999607
5.224355
bf26df38-fc19-4eb1-9c32-78be4720213e
asd147asd147/High_Quality_Baekjoon
15238-Pirates.cpp
#include <iostream> #include <algorithm> using namespace std; int main(){ int n; cin >> n; int alpha[26] = {0,}; for(int i = 0; i < n; i++){ char temp; cin >> temp; alpha[temp - 'a'] += 1; } int max = *max_element(alpha,alpha+26); for(int i = 0; i < 26; i++){ ...
ALGO
0.999891
3.581647
4e66cbdb-6f3e-4552-820e-a61d55078587
stefobark/firstAssignment
rect/rect.cpp
/* Steve Barker. Chapter 1. Problem 1.15 A program with a rectangle class that is comparable to other rectangle objects. We can change its dimensions and use < and > to compare the area of two triangles. There is also a comparePerimeter function. I wasn't able to finish implementing the findMax template funct...
ALGO
0.993177
4.257854
0a5a8f7d-b1ad-4c69-b321-7c9f39da10ec
WoosungMichael/WebIDE_ProblemBank
problembank-server/DEBUG_TEMP_PATH/1aUIXtbEDW/main.cpp
#include<iostream> int main(void) { int a,b; cin >> a >> b; cout << a/b << " " << a%b; return 0; }
ALGO
0.997697
4.837886
72ab5cf7-58a2-4cf1-83d8-afad59115bc8
tek1031/CODEVS2.0
codevs2.0_practice/Player.cpp
#include"Player.h" #include<string> #include<time.h> #include<omp.h> #include<vector> #include<cassert> //_ɃQ[I[o[ɂȂȂss void Player::random_action(){ for(int x=-game.T;x<game.W+game.T;x++){ for(int r=0;r<4;r++){ State state=game.get_state(); if(game.update(state,x,r,game.H).second>=0){ game.output(x,r); ...
ALGO
0.999398
3.273481
cfe40827-3220-4d3a-a105-c51b59410f10
emmytran/Algorithms-and-Data-Structures
L01P1-Stack.cpp
//Thuy Uyen My Tran #include <iostream> using namespace std; class Stack { private: int top; int stk[10]; public: Stack() { top = -1; for (int i = 0; i < 10; i++) { stk[i] = 0; } } bool isFull() { if (top == 9) { return true; } ...
ALGO
0.990937
4.283347
caa53804-7af9-4e9c-bcb2-11ac7e5d40fc
N0ksa/Zadaci-iz-C-analiza-i-primjena-Zeljko-Kovacevic
70_zadatak.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> char* reverse(char* niz); int main() { char niz[100]; char* obrnuti; scanf("%[^\n]*c", niz); obrnuti = reverse(niz); printf("%s", obrnuti); return 0; } char* reverse(char* niz) { char* obrnuti = (ch...
ALGO
0.999585
4.114247
139834f3-9e5b-41fd-8c4f-35f25c655fa5
Himynameislou/ChAss
WGU Tester/8 21 1 Modifying vectors.cpp
// // 8 21 1 Modifying vectors.cpp // WGU Tester // // Created by Luis Vegerano on 12/5/20. // #include <stdio.h> #include <iostream> #include <vector> using namespace std; void PrintVectors(vector<int> numsList) { int i; for (i = 0; i < numsList.size(); ++i) { cout << numsList.at(i) << " "; } co...
ALGO
0.995772
3.943333
a5eb0ed3-1129-4dd0-95b0-a59f9cce605e
A01nkit/Problem_Solving
Heap/RelativeRanks.cpp
/* Relative Ranks You are given an integer array score of size n, where score[i] is the score of the ith athlete in a competition. All the scores are guaranteed to be unique.The athletes are placed based on their scores, where the 1st place athlete has the highest score, the 2nd place athlete has the 2nd highest scor...
ALGO
0.999967
6.089368
69142979-8fb0-429d-a9b0-3a34995298c9
WonJin4631/AlgorithmStudy
dodo/dodo/boj11056.cpp
#include<iostream> #include<string> #include<algorithm> using namespace std; string s1; string s2; int dp[1002][1002] = { 0 }; int lcs(int i, int j) { if (i == -1 || j == -1) { return 0; } if (dp[i][j] != -1) { return dp[i][j]; } else if (s1[i] == s2[j]) { return dp[i][j] = lcs(i - 1, j - 1) + 1; } else i...
ALGO
0.999983
4.066077
28c19c64-fdcc-43f3-a166-9abd41bfb12f
tronganh0104/Leetcode
SearchA2DMatrix.cpp
#include <bits/stdc++.h> using namespace std; bool searchRow(vector<int> row, int target) { int left = 0; int right = row.size() - 1; while (left != right) { if (row[left] == target || row[right] == target) { return true; } int temp = (left + right) / 2; if (tar...
ALGO
0.999982
5.483065
9196fee7-6b46-4b11-ba51-17513f0a5a22
iCoder0020/Competitive-Coding
SPOJ/ACMAKER.cpp
/* ID: icoder_0020 PROG: ACMAKER LANG: C++ */ #include <bits/stdc++.h> using namespace std; int main() { int iwords; while(1) { cin>>iwords; if(iwords == 0) { break; } else { string S[iwords]; for(int i = 0; i<iwords; i++) { cin>>S[i]; } string input; vector ...
ALGO
0.99303
3.378645
44583ac9-435c-4f66-abf5-8c73632c228c
skarone/PipeL
install/ExocortexCrate-master/Shared/ilmbase-1.0.2/Imath/ImathMatrixAlgo.cpp
//---------------------------------------------------------------------------- // // Implementation of non-template items declared in ImathMatrixAlgo.h // //---------------------------------------------------------------------------- #include "ImathMatrixAlgo.h" #if defined(OPENEXR_DLL) #define EXPORT_CONST __dec...
ALGO
0.895484
4.351667
562e822c-f7c5-46ee-a15e-bb49e4def2f7
arnab-zero/Competitive-Programming
Codeforces_Not_Sorted/J45.cpp
#include <bits/stdc++.h> using namespace std; #define shuru int main(void){ #define shesh return 0;} #define RZ return 0; #define vi vector<int> #define pii pair<int,int> #define pb push_back #define pob pop_back #define mpr make_pair #define spc " " #define nl cout<<endl typedef long long int lli; shuru; int a, b; ...
ALGO
0.99959
3.853619
0d7b6859-6b06-4f02-b90f-33ba7731310e
fabsgc/TweedeEngine
Dependencies/Linux.GNU/bullet/include/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
#include "btSphereBoxCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionShapes/btSphereShape.h" #include "BulletCollision/CollisionShapes/btBoxShape.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/Co...
ALGO
0.999695
6.832945
afa6af37-8728-4f5d-8d4a-753bd6e95b85
Hypervariate/Orchid
Orchid/ThirdParty/Box2D/Box2D/Collision/b2CollidePolygon.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h> // Find the separation between poly1 and poly2 for a give edge normal on poly1. static float32 b2EdgeSeparation(const b2PolygonShape* poly1, const b2Transform& xf1, int32 edge1, const b2PolygonShape* poly2, const b2Tra...
ALGO
0.999837
6.903707
85aa5e94-4ce7-449c-b930-425338a627d4
vsvipul/ComputerOrganization-CS201P
7/main.cpp
/* Name: Cache Simulator Author: Vipul Sharma (B17069) */ #include <bits/stdc++.h> using namespace std; #define uint unsigned int const int N = 2000000; uint arr[N]; uint cmiss[10], lmiss[10], fmiss[10], ccache[20000]; pair<int,int> fifo[20000][4]; pair<int,int> lru[20000][4]; uint hextoint(string hex) ...
ALGO
0.953363
3.847158
e2631df9-5bff-4404-9ee7-325109a8a903
Nakib-Arman/CSE318---ArtificialIntelligence
4.DecisionTree/.history/decision_tree_20250706113910.cpp
#include<bits/stdc++.h> using namespace std; class Node { int column_num; unordered_map<string,Node*> children; Node* parent; public: Node(int column_num){ this->column_num = column_num; this->parent = NULL; } string getColumn(){ return label; } void setParent...
ALGO
0.998297
5.408182
e11c1702-7c07-46a2-87ea-3d9b1be2fe16
alvianfirdaus/2141720022-mobile-2023
week-05/src/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.99736
6.76073
f9fbc912-973f-493f-8e2e-7d126590b2e9
Uday0412/cpp
function/natural_number.cpp
#include<iostream> using namespace std; int sum(int n) { int ans=0; for(int i=1;i<=n;i++) { ans+=i; } return ans; } int main() { int n; cin>>n; cout<<sum(n)<<endl; return 0; }
ALGO
0.999767
4.507114
b22f3e75-d881-423a-8af0-e2e74db46be1
ishandutta2007/codeforces
mip182/normal/1194/A.cpp
#include <bits/stdc++.h> typedef long long ll; #define gcd(x,y) __builtin_gcd(x,y) #define numberof1(x) __builtin_popcount(x) #define povsemelementam(i,mnozh) for(auto i: mnozh) #define podotrezok(i,j) substr(i-1,j) // like prefix sum, (i,j)=s[j]-s[i-1] #define pb push_back #define pf push_front #define popf pop_front ...
ALGO
0.999554
3.882794
183ddf1a-9996-4d7a-8aa4-974f18af7fc5
chola192325021/csa0318
breadth first search(BFS).cpp
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #define MAX_VERTICES 50 typedef struct Graph_t { int V; bool adj[MAX_VERTICES][MAX_VERTICES]; } Graph; Graph* Graph_create(int V) { Graph* g = malloc(sizeof(Graph)); g->V = V; for (int i = 0; i < V; i++) { for (int j = 0; j < V; j++) { g->adj[i][j] ...
ALGO
0.999841
4.897488
1db1367f-4b49-4f2e-90f1-ce7f04400a76
Naveed-CoLab/CareConnect-Health-Bot
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
fdeb6ecc-2c0e-4de8-9b1a-1040eda87bdd
iagorrr/Competitive-Programming-Solutions
submissions/ICPC/2017-2018 ACM-ICPC Brazil Subregional Programming Contest/E. Escala Musical.cpp
#include <bits/stdc++.h> using namespace std; const int maxnote = 100; int trans[maxnote]; vector<string> notas({ "^", "do","do#","re","re#","mi","fa","fa#","sol","sol#","la","la#","si" }); vector<set<int>> scales(1); void build_scale(int x) { vector<int> increment({2, 2, 1, 2, 2, 2, 1}); set<int> scale; scale....
ALGO
0.999864
4.798374
3666bae5-9643-4bd3-a95c-9eaf4a458012
TanyaBobyrieva/15_3
15_3.cpp
#include <stdio.h> #include <locale.h> void zeroOutEvenElements(int arr[]) { for (int i = 0; i < 10; ++i) { if (arr[i] % 2 == 0) { arr[i] = 0; } } } int main() { // int array[10]; setlocale(LC_ALL, "ukr"); // printf(" :\n"); for (int i = 0; i < 10;...
ALGO
0.97834
4.229363
5320c73f-ed72-442e-a2cc-60ac6c093ad4
younggam/cpp_ps
baekjun/7576.cpp
#include <iostream> #include <vector> using namespace std; int M, N; char boxes[1000000]; bool visited[1000000] = {}; int len = 0; vector<int> ripe[2]; int main(int argc, char **argv) { scanf("%d %d", &M, &N); int LEN = N * M; for (int i = 0; i < LEN; i++) { int a; scanf("%d", &a); ...
ALGO
0.99998
4.046901
df3fbabc-8471-4ec4-9054-1690fe2e8fe7
vanshika-1136/ADA
12strassen.cpp
#include<iostream> #include<vector> using namespace std; vector<vector<int>> add(vector<vector<int>>mat1,vector<vector<int>>mat2){ int n=mat1.size(); // int col1=mat1[0].size(); // int row2=mat2.size(); // int col2=mat2[0].size(); vector<vector<int>>result(n, vector<int>(n, 0)); for(int i=0;i<n...
ALGO
0.999981
4.226177
7af8e36a-9fb9-4549-a14f-c5f1bdff74f6
Zz9uk3/ZzukBot_V3
Pathfinding/Navigation/Include/recastnavigation/Recast/Source/RecastRasterization.cpp
#define _USE_MATH_DEFINES #include <math.h> #include <stdio.h> #include "Recast.h" #include "RecastAlloc.h" #include "RecastAssert.h" inline bool overlapBounds(const float* amin, const float* amax, const float* bmin, const float* bmax) { bool overlap = true; overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false...
ALGO
0.97668
3.957279
cf784a03-1368-4db0-b1e0-cc80ce0a3d63
KashifAhmad1789/KashifAhmad-dsa
challanges array/8_RemovingDuplicatesArray.cpp
#include <iostream> using namespace std; int RemovingDuplicatesArray(int a[],int n){ int i; int j; int counter = 0; for(i=0;i<n;i++){ for(j=i+1;j<n;j++){ if(a[i]==a[j]){ cout<<a[i]<<" "; counter++; } ...
ALGO
0.999682
3.754426
8af2f4c3-c217-4852-9e10-94e080cb2628
ComputationalBiomechanicsLab/opensim-creator
third_party/libosim/simbody/SimTKcommon/Random/src/SFMT.cpp
/** * @file SFMT.c * @brief SIMD oriented Fast Mersenne Twister(SFMT) * * @author Mutsuo Saito (Hiroshima University) * @author Makoto Matsumoto (Hiroshima University) * * Copyright (C) 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima * University. All rights reserved. * * The new BSD License is appli...
ALGO
0.999507
6.236128
d15583d4-92d6-4052-8d35-65edeeec4dde
matcha-am/AtCoder
AtCoder Beginner Contest/217/B - Atcoder Quiz.cpp
#include <bits/stdc++.h> using namespace std; int main() { string S1, S2, S3; cin >> S1 >> S2 >> S3; if ((S1 != "ABC") && (S2 != "ABC") && (S3 != "ABC")) cout << "ABC"; else if ((S1 != "ARC") && (S2 != "ARC") && (S3 != "ARC")) cout << "ARC"; else if ((S1 != "AGC") && (S2 != "AGC") && (S3 != "AGC")) cout << "...
ALGO
0.999905
3.830699
b5e2390c-7525-4d39-9b11-27174e1518c6
Yasg-uru/DSA-practice-
sliding window/hard/992. Subarrays with K Different Integers.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: //total count of subarrays having <=k distinct integers int solve(vector<int>&nums , int n,int k ){ unordered_map<int , int>mp; int i=0, j=0; int totalSubarrays = 0; wh...
ALGO
0.999984
5.847391
765faa0c-57e2-44ee-a847-42166177892c
MirunaSeme/Simulation-Methods
assignment-1/pedestrian_crossing.cpp
/* Simulation Course Assignment 1 Molecular Dynamics Simulation / Brownian Dynamics Simulation Simulate the motion of the particles using brownian dynamics Pedestrian crossing problem No optimization */ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #define CONSTANT_DENSITY 1.00 struc...
ALGO
0.998722
3.85348
01af61cc-9f1f-45dc-b543-9a49583f96e5
sairamboddula/CSCI_240_TA
Spring 2017/ram3.cpp
/************************************************************************************* CSCI 240 Program 3 Spring 2017 Programmer: Sai Ram Boddula Section: CSCI 240 - 1 & 2 Date Due: Friday, February 10 11:59 PM Purpose: This program calculates a single customer's cell phone monthly...
ALGO
0.98544
4.438774