uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
b69ae5cd-f1e9-4504-ba78-3c7516fcdd0b
ivanprokoff/msu_phys_cpp
task7.cpp
#include <iostream> #include <fstream> #include <stdexcept> class DynamicArray { private: int* data; int size; public: DynamicArray() : data(nullptr), size(0) {} DynamicArray(const DynamicArray& other) : data(new int[other.size]), size(other.size) { std::copy(other.data, other.data + size, da...
ALGO
0.894204
5.485931
3a0f5c80-a8d1-44a8-8915-dc40b1c9a70a
KhushbooLokhande/First_Week_task
First_week_task/RemoveDuplicateArray.cpp
#include <iostream> #include <vector> using namespace std; int removeDuplicates(vector<int>& nums) { if (nums.empty()) return 0; int k = 1; for (int i = 1; i < nums.size(); i++) { if (nums[i] != nums[i - 1]) { nums[k] = nums[i]; k++; } } return k; } ...
ALGO
0.999581
6.65656
37694309-dff0-44ea-a00b-136e844502d5
KaranTalreja/LeetCode
src/permutation-in-string/solution.cpp
class Solution { public: bool compareCounts(int start, vector<int>& hashN, vector<int>& hashM) { int i = 0; for (i = 0; i < 26; i++) { if (hashN[i] != hashM[i]) break; } if (i == 26) return true; return false; } bool checkInclusion(string s1, string s2) { vecto...
ALGO
0.999962
6.040053
a7c08657-9b89-4347-b238-98732f249350
Seizzzz/DailyCodes
PTA/甲级/P1090.cpp
#include <bits/stdc++.h> using namespace std; int info[10005]; int n; void refresh(int a) { for(;a<n;a++) { if(info[a]<info[a-1]) swap(info[a],info[a-1]); else return; } return; } int main() { cin >> n; for(int i=0;i<n;i++) cin >> info[i]; sort(info,info+n); int sum=0; for(int i=1;i<n;i++) { ...
ALGO
0.999951
3.361241
29bb7fa5-817b-4413-b533-e375adf4d0b0
ishandutta2007/codeforces
kotatsugame/normal/1078/B.cpp
#include<iostream> using namespace std; int N; int cnt[101]; int way[101][10001]; main() { cin>>N; int sum=0; int sp=0; for(int i=0;i<N;i++) { int a;cin>>a; if(cnt[a]==0)sp++; cnt[a]++; sum+=a; } way[0][0]=1; int prv=0; for(int i=1;i<=100;i++)if(cnt[i]>0) { int a=i; for(int k=prv;k>=0;k--) { ...
ALGO
0.999955
3.065808
6197a57d-f644-423c-99bb-6c244df518c7
R3GT-hub/6_Companies_30_Days
6_Companies_30_Days/MICROSOFT/SHORTEST_UNSORTED_CONTINUOUS_SUBARRAY.cpp
class Solution { public: int findUnsortedSubarray(vector<int>& nums) { vector<int>v(nums); int n=nums.size(); sort(v.begin(),v.end()); int ind=0,ind1=0; for(int i=0;i<nums.size();i++){ if(v[i]!=nums[i]){ ind=i; break; } ...
ALGO
0.999967
5.58986
da9abd12-e62d-4552-b355-187edd1f699d
hpfem/hermes-legacy
hermes2d/tutorial/P04-adaptivity/05-exact/definitions.cpp
#include "definitions.h" scalar ExactSolutionCustom::value (double x, double y) const { return pow(x*x + y*y, 0.25); } void ExactSolutionCustom::derivatives (double x, double y, scalar& dx, scalar& dy) const { dx = 0.25 * pow(x*x + y*y, -0.75) * 2 * x; dy = 0.25 * pow(x*x + y*y, -0.75) * 2 * y; } Ord ExactSo...
ALGO
0.997393
4.187289
9f9fa987-cf94-449c-9488-b91de9a52f31
woopengcheng/LibCore
deps/RakNet/DependentExtensions/Autopatcher/CreatePatch.cpp
#include "MemoryCompressor.h" #if 0 __FBSDID("$FreeBSD: src/usr.bin/bsdiff/bsdiff/bsdiff.c,v 1.1 2005/08/06 01:59:05 cperciva Exp $"); #endif #include <sys/types.h> #include "bzlib.h" #ifndef _WIN32 #include <err.h> #include <unistd.h> #else // KevinJ - Windows compatibility typedef int ssize_t; typedef unsigned cha...
ALGO
0.964333
4.073609
82298ded-feaa-4126-939b-23dcefab9262
canakdag06/Algorithm-Practise-with-C
9/9_69.cpp
#include<stdio.h> #include<math.h> int isNarsistNumber(int); int main() { printf("%d\n",isNarsistNumber(1634)); printf("%d\n", isNarsistNumber(89)); return 0; } int isNarsistNumber(int sayi) { int n = 0; int temp = sayi; int toplam; while(temp!=0) { temp = temp/10; n++; } temp = sayi; while(temp!=0...
ALGO
0.999625
3.976365
7fb763d0-3131-48e3-a78c-db64e7d18e5e
pukuba/Algorithm
boj/15927/15927.cpp14.cpp
#include <bits/stdc++.h> using namespace std; string s; bool check(int k){ for(int i=0; i<((s.size()-k)/2); i++) if(s[i] != s[s.size()-1-i-k]) return false; return true; } int main(){ ios_base::sync_with_stdio(0);cin.tie(nullptr); cin>>s; if(!check(0)) cout<<s.size(); else if(!check(1)) cout<<s...
ALGO
0.999669
4.224611
819bceb1-eb12-424d-be29-6524e83d0ae5
uclaacm/icpc-competitive-programming-track
Fall Week 2 Intro/templates/C.cpp
#include <bits/stdc++.h> using namespace std; void solve(){ string s; cin >> s; int n = s.size(); // Functions you may find helpful! // s.substr(i, len) returns a substring of s starting at index 'i' with length 'len' // s.substr(i) returns a substring of s starting at index 'i' until the end ...
ALGO
0.999615
3.740439
084fed19-678b-4c83-9f1e-3e298914a80c
Priyo002/6Companies30Days-Challenge-ArshGoyel
Walmart/LC-718.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int findLength(vector<int>& nums1, vector<int>& nums2) { int n = nums1.size(), m = nums2.size(); vector<vector<int>> dp(n + 1, vector<int>(m + 1, 0)); int ans = 0; for (int i = n - 1; i >= 0; i--) { for (int j = m - 1; j >= 0; j--) { ...
ALGO
0.999985
5.483751
68fbcd12-5c15-4e25-abe2-2aacf519d970
agusslud/ejercicios
guiaTpPunteros/ej7.cpp
#include <iostream> #include <vector> using namespace std; void copiaCadena(vector<char> *destino, const vector<char> *origen) { for (auto it = origen->begin(); it != origen->end(); ++it) { destino->push_back(*it); } } int main(int argc, char const *argv[]) { vector<char> origen; vector<char> destin...
TOOL
0.916849
4.166571
94625d97-33e2-4b12-8720-97e8d807a31c
mohammad-majoony/codeForces-submits
E. Polygon/main.cpp
#include<bits/stdc++.h> #define MMD ios_base::sync_with_stdio(0) ; cin.tie(0) ; typedef long long ll ; using namespace std ; string slove(){ int len ; cin >> len ; string txt[len] ; for(int i = 0 ; i < len ; i++) cin >> txt[i] ; for(int i = 0 ; i < len - 1 ; i++){ for(int j = 0 ; j < len - 1 ...
ALGO
0.998722
4.772683
eb14b78e-e79c-47c0-a2c9-c5acef87fce0
jang-chinseok/Algorithm
BOJ/1260/Cpp/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; #define coutln(x) cout << x<< "\n"; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ vector<int> g[1001]; //array<bool,1001> visit; bool visit[1001]; int dfs(int); in...
ALGO
0.999964
3.58454
c0eef074-9dca-4dea-b844-9bdfae055bf4
awdevmyid/nodejs
deps/icu-small/source/common/ucharstriebuilder.cpp
#include "unicode/utypes.h" #include "unicode/ucharstrie.h" #include "unicode/ucharstriebuilder.h" #include "unicode/unistr.h" #include "unicode/ustring.h" #include "cmemory.h" #include "uarrsort.h" #include "uassert.h" #include "uhash.h" #include "ustr_imp.h" U_NAMESPACE_BEGIN /* * Note: This builder implementation...
TOOL
0.924229
7.377804
9386dabc-3cde-4355-a22b-69bcb1865391
CKehl/Image2Geometry
3rdParty/openexr-2.2.0/IlmBase/ImathTest/testJacobiEigenSolver.cpp
#include "ImathMatrix.h" #include "ImathMatrixAlgo.h" #include <iostream> #include <math.h> #include <cmath> #include <ctime> #include <cassert> #include <limits> #include <algorithm> using namespace std; using namespace IMATH_INTERNAL_NAMESPACE; const Matrix33<double> A33_1 ( 1, 0, 0, 0, 1, 0, 0, 0, 1 ); const Matri...
TEST
0.996902
6.839952
5b6b6912-f656-4810-ba23-e94bc66e8246
aaronangxz/LeetCode
26.RemoveDuplicationsFromSortedArray.cpp
#include <iostream> #include <vector> using namespace std; int removeDuplicates(vector<int>& nums) { if (nums.size() == 0) { return 0; } for (int i = 0; i < nums.size() - 1; i++) { //When current index and next index is the same if (nums[i] == nums[i + 1]) { ...
ALGO
0.999502
5.789035
5780ad23-96c3-4e1e-afb0-7bd2e6ce968d
motaher13/Solved-OJ-problems
Others/jubaer/c files/hfdj.cpp
#include <stdio.h> #include <iostream> #include <vector> using namespace std; vector<int>vc[2000000]; vector<int>ty[2000000]; int visited[2000000]; int visit[2000000]; int tt[2000000],tt1[2000000]; int count,num; void dfs(int r){ int i,v,start; start=count; if(visited[r]==1) return; visit[...
ALGO
0.999869
3.461741
9681a786-9e7c-4169-bc68-87e1c588e9a3
siddharthraturi747/CarXstreamPricePredictor
env/lib/python3.12/site-packages/sklearn/svm/src/liblinear/tron.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "tron.h" #ifndef min template <class T> static inline T min(T x,T y) { return (x<y)?x:y; } #endif #ifndef max template <class T> static inline T max(T x,T y) { return (x>y)?x:y; } #endif static void default_print(const char *buf) {...
ALGO
0.999513
5.847107
ba2777f9-c85b-4206-8010-82e081a9806b
UlfiatulRosida/managekos
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
67499575-1a13-431d-9390-bb30a8f2e203
liuxueyang/cpp
codechef/contest/starters-173/Time_Penalty.cpp
#include <algorithm> #include <array> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #inclu...
ALGO
0.99933
4.888974
272c745d-9c55-4541-a6b3-8405cb0668d7
Jin-uu/coding_workspace_desktop
C_C++_PROJECTS/algo/7569/7569.cpp
#include <iostream> #include <queue> #define MAX_N 100 using namespace std; typedef struct _loc{ int a; int b; int c; } loc; int m,n,h,togo; int box[MAX_N+1][MAX_N+1][MAX_N+1]; queue<loc> q; int move_m[] = {0, 0, -1, 1, 0, 0}; int move_n[] = {0, 0, 0, 0, -1, 1}; int move_h[] = {1, -1, 0, 0, 0, 0}; bool ...
ALGO
0.999906
4.072476
6563286d-fc07-4ae3-ae87-45e54771ec17
AleXamuel/Proyecto-Nestor
Problemas/AdvancedDataStructures/SegmentTree/SegmentTreeSimple/D-query.cpp
//https://www.spoj.com/problems/DQUERY/ using namespace std; #include <bits/stdc++.h> #include <iostream> #include <vector> #include <algorithm> #include <climits> #include <iomanip> #include <utility> #define fori(i, k, n) for (int i = k; i < n; i++) #define ln "\n" #define MAXN 300001 int n, t[4 * MAXN]; void build(...
ALGO
0.999984
4.496432
411889c8-ec33-4c10-b746-fb835ebde50d
Diamondsn/algorithm-programming
前端笔记/Examination/sortAlgorithm/归并排序.cpp
//归并排序 #include <iostream> #include <vector> using namespace std; void MergeSort(vector<int> &a, vector<int> &temArray, int left, int right); void Merge(vector<int> &a, vector<int> &tmpArray, int leftPos, int rightPos, int rightEnd); void print(vector<int> &a); int main() { vector<int> arr = { 5,4,3,1,2,6,7,9,8,0 }; ...
ALGO
0.999926
4.285091
7876f49a-8781-4c7b-817d-3694a5e93ac1
DaoRungphailin/Gradder_CE
complex_num.cpp
#include<stdio.h> int main() { int a , b , c ,d , i , j ; scanf("%d %d %d %d" , &a , &b , &c , &d); i = (a*c)- (b*d) ; j = (a*d)+ (b*c); printf("(%d)+(%d)i" , i , j); return 0 ; }
ALGO
0.997555
3.047428
d75a8ae5-0a23-4292-8db9-124cc61783e7
qpwoeirut/competitive-programming
Codeforces/Contest/Div2/1195/1195e/1195e.cpp
/* * 1195e.cpp * * Created on: Jul 17, 2019 * Author: Stanley */ #include <iostream> using namespace std; int main() { int N, M, A, B; cin >> N >> M >> A >> B; int g, x, y, z; cin >> g >> x >> y >> z; int grid[3000][3000]; for (int i=0; i<N; i++) { for (int j=0; j<M; j++) { grid[i][j] = g; ...
ALGO
0.99919
3.730877
4aa0592e-c681-4280-b83d-64673cfd4195
andreiarnautu/Algorithmic-Problems-Part-2
frumoasa.cpp
/** * Worg */ #include <cstdio> #include <algorithm> FILE *fin = freopen("frumoasa.in", "r", stdin); FILE *fout = freopen("frumoasa.out", "w", stdout); const int sigma = 26; const int mod = 1e9 + 7; int Power(const int base, const long long exp) { int answer = 1, aux = base; for(long long i = 1; i <= exp; ...
ALGO
0.999989
4.169681
cd83be50-c2f1-413e-821b-87dbb7292673
benny5555/leetcode-problems
2490.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool isCircularSentence(string s) { if (s[0] != s[s.size() - 1]) return false; for (int i = 0; s[i]; ++i) { if (s[i] == ' ' && s[i - 1] != s[i + 1]) return false; } return true; } };
ALGO
0.999206
5.180348
36b53826-e621-4e54-baf3-a3739710b9af
surazjaiswal/DP-AV-Series
2. Unbounded Knapsack/coinChangeII.cpp
// https://leetcode.com/problems/coin-change-2/ #include <bits/stdc++.h> using namespace std; class Solution { public: int change(int amt, vector<int> &coins) { int n = coins.size(); int dp[n + 1][amt + 1]; // case 1 : coins array is empty, no way to make any amt for (int j = ...
ALGO
0.999638
6.061604
d8eea84b-1d1d-4a34-b632-216d2999699e
Uday-Berad22/GFG-questions
Easy/Print adjacency list/print-adjacency-list.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to return the adjacency list for each vertex. vector<vector<int>> printGraph(int V, vector<pair<int,int>>edges) { // Code here vector<vector<int>> Graph(V); ...
ALGO
0.999862
6.197459
f073413d-a76b-4770-8bd2-35b25e10a15f
thesaravanakumar/competative-programming
codeforces/800/426A-SerejaandMugs.cpp
#include <bits/stdc++.h> #define ll long long int #define w(t) int t; cin>>t; while(t--) #define F first #define S second #define pb push_back #define mp make_pair #define pii pair<int,int> #define mii map<int,int> #defin...
ALGO
0.999823
3.190712
8871b9b8-cd53-4bf1-8183-7a4fd9984643
ishandutta2007/codeforces
vercingetorix/normal/277/E.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <deque> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.99948
3.68621
1f4c20c9-13d9-412d-9ba2-df18db5dcab7
daveysj/sjd
sjdObjects/RateSource/Forward/ForwardCurve.cpp
#include "ForwardCurve.h" namespace sjdObjects { /*====================================================================================== ForwardCurveDeterministic =======================================================================================*/ ForwardCurveDeterministic::ForwardCurveDetermini...
ALGO
0.981549
7.443986
768b8c34-4554-4834-8173-8467484556e9
ImtiazAhmedAkash/Problem-Solving
atcoder/abc300/B.cpp
/* In the Name of ALLAH, the most gracious, the most merciful */ // Same Map in the RPG World #include <bits/stdc++.h> using namespace std; #define ll long long #define nl '\n' #define INF (1 << 30) #define mod 998244353 #define N 300005 #define deb(x) cerr << #x << " = " << x << nl /* * Two grids will be given ...
ALGO
0.999996
5.136689
03a87e8f-839c-4ddf-9873-df84900e53aa
danielduri/ED2021
dom-deportes/main.cpp
//DANIEL DURAN RIVERO //C37 #include <iostream> #include <iomanip> #include <fstream> #include <map> #include <unordered_map> #include <unordered_set> #include <vector> #include <algorithm> bool compareNumGreater (const std::pair<std::string, int>& one, const std::pair<std::string, int>& two) { if(one.second<two....
ALGO
0.99821
4.451941
0b11c78f-f66d-4a74-b534-73c4b0b29363
anmolsinghgit/LeetCode-Online-Judge
Algorithms/container-with-most-water.cpp
//11. Container With Most Water //https://leetcode.com/problems/container-with-most-water/ //https://github.com/haoel/leetcode #include <iostream> #include <vector> #include <climits> #include <algorithm> using namespace std; class Solution { public: int maxArea(const vector<int>& height) { int result = INT_MIN; i...
ALGO
0.999948
6.333493
acc995b3-f425-4297-a1dc-71dddb76631b
conankun/Dovelet
automatic_teller_machine/440561_AC_5.03SEC.cpp
#include<stdio.h> #include<queue> #include<stack> #include<algorithm> using namespace std; struct TLE { int value,ind; bool operator<(const TLE &a) const { return value < a.value; } }Time[500011]; struct Edge { int s,e; bool operator<(const Edge& a) const { if(s == a.s) return e < a.e; return s < a.s; } }v[...
ALGO
0.99994
3.388453
f8aeff1e-9cba-4b24-abbe-127622deec62
wonjun1995/algorithm
2022/백준/cpp/1475.cpp
#include <bits/stdc++.h> using namespace std; // 방번호 //다솜이는 은진이의 옆집에 새로 이사왔다. //다솜이의 옆집에서는 플라스틱 숫자를 한 세트로 팜. // 세트 하나에는 0-9까지 숫자 하나씩 들어있음. //다솜이의 방 번호가 주어졌을 때 필요한 세트의 개수의 최솟값을 출력하쇼 //9 와 6 은 같이 쓸 수 있음. int main(){ string num; cin >> num; int array[10]; fill(array,array+10,0); int answer=0; f...
ALGO
0.999391
5.00545
5f02e483-280d-4b86-88c5-ebdfac71da33
michaelchanwahyan/boost-1.68.0
libs/program_options/example/config_file_types.cpp
// This example shows a config file (in ini format) being parsed by the // program_options library. It includes a numebr of different value types. #include <boost/program_options.hpp> namespace po = boost::program_options; #include <assert.h> #include <iostream> #include <sstream> using namespace std; const double F...
TEST
0.915409
6.326044
9b694d2a-a760-4acb-be3e-f4e28229f439
neeraj0786/Programming
LinkedList/kth_node_from_middle.cpp
int Solution::solve(ListNode* A, int B) { if(!A&&B>0) return -1; int l=0; ListNode *p=A; while(p) l++,p=p->next; l=(l/2)+1; if(B>=l) return -1; p=A; B=l-B; while(B>1&&p) p=p->next,B--; return p?p->val:-1; }
ALGO
0.999996
4.833096
496bef75-9bc5-409c-ab1a-72dc22c06dcb
xbhoneybee/ACM_ICPC
Lonlife/1101.cpp
#include <bits/stdc++.h> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #include<iostream> #include<algorithm> #include<queue> #include<cmath> #include<stack> #include<set> #include<vector> #include<map> #include<sstream> #define ll long long #define LL long long #define iosfalse ios::sync_with_s...
ALGO
0.99997
3.687734
e5794426-2e96-4156-8d97-7e12f7e35205
joweeej/projects.phase2
iterators.cpp
#include<iostream> #include<vector> using namespace std; int main() { //create a vector iterator called it vector<string>::iterator it; //type of iterator should match the type of data structure it iterates through; //Loop through the vector with the Iterator for(it = cars.begin(); it!= cars.end();++it){ cout...
ALGO
0.947235
4.479679
e2c5f93b-a76a-4b13-b6fd-eeb3eae9fe54
veda-cpp-coding-test/JungHyunGu
17week/19583.cpp
#include <iostream> #include <unordered_map> using namespace std; unordered_map<string, int> nicknames; string s, e, q, time, nickname; int answer; int main() { ios::sync_with_stdio(0), cin.tie(0); cin >> s >> e >> q; while (cin >> time >> nickname) { if (time <= s) { ...
ALGO
0.999594
3.627625
56462a5f-1d30-4fbb-b894-20a8cdc069d8
Suraj5260/LeetCode
3056-determine-if-a-cell-is-reachable-at-a-given-time/determine-if-a-cell-is-reachable-at-a-given-time.cpp
class Solution { public: bool isReachableAtTime(int sx, int sy, int fx, int fy, int t) { int mn = min(abs(sx-fx),abs(sy-fy)) + abs(abs(sx-fx) - abs(sy-fy)); if(sx == fx && sy == fy && t == 1){ return false; } if(mn <= t){ return true; } return ...
ALGO
0.99996
6.014689
743ae427-6e86-4945-9ab7-0d0924099553
henry-ph/OI-learning
problems/过河卒.cpp
#include<cstdio> #include<algorithm> using namespace std; int n,m; bool map[200][200]; int x1[200]={0,-2,-2,-1,1,2,2,1,-1},y1[200]={0,-1,1,2,2,1,-1,-2,-2}; long long f[50][50]; int main() { int x,y; scanf("%d%d%d%d",&n,&m,&x,&y); map[x+1][y+1]=true; for(int i=1;i<=8;i++) if(x1[i]+x>=0&&x1[i]+x<=...
ALGO
0.999387
3.834508
1a572851-7b59-4ed2-b77d-363541f4cc10
Haoyang-Chen/C-Learn
分数小数转换/test1/main.cpp
// // main.cpp // 上机作业11.9(2 // // Created by Haoyang Chen on 2020/11/9. // #include <iostream> using namespace std; float Trans (float num) { int k=0; int i=0; for (int m=1;(int)(num*m)<num*m;m=m*10) { i=num*m*10; k=m*10; } int value=1; for(int m=i;m>=1;m--) { ...
ALGO
0.999188
4.090157
c94c8270-71b7-48f0-9b03-e8f8e6b8d26a
davrec72/clang-meta
llvm/examples/Kaleidoscope/Chapter2/toy.cpp
#include "llvm/ADT/STLExtras.h" #include <algorithm> #include <cctype> #include <cstdio> #include <cstdlib> #include <map> #include <memory> #include <string> #include <vector> //===----------------------------------------------------------------------===// // Lexer //===-----------------------------------------------...
TOOL
0.961949
7.089499
00d5d323-a04c-411c-addb-382f87a856f6
Najma366/CodeClash
soc_L7_Q4.cpp
#include <iostream> #include <string> #include <stack> using namespace std; string removeKdigits(string num, int k) { int n = num.size(); stack<char> s; for (char c : num) { while (!s.empty() && k > 0 && s.top() > c) { s.pop(); k--; } s.push(c); } w...
ALGO
0.999494
6.608059
f72c966d-02a4-42c0-a40f-b11912fd40e7
lorenzo2beretta/Competitive-Programming
lesson_11/checkposts.cpp
/* This algorithm finds biconnected components * in routes graph in O(m). * It uses both a DFS and an union find data * structure as follows: any node's ancestor in * union find tree is the most shallow node of its * biconnected component discovered so far. * Then DFS recursively finds biconnected component * w...
ALGO
0.999924
4.22085
0d5716df-bb56-413c-b5cd-6e37b926b37d
rishabh644/Daily_Challenge
Standard_DSA/Arrays/Divide_Players_Into_Team_Of_Equals_Skilss.cpp
class Solution { public: long long dividePlayers(vector<int>& skill) { int n=skill.size(); int totalSkill=0; vector<int>skillFrequency(1001,0); // Calculate total skill and skill frequency for(int playerSkill:skill) { totalSkill+=playerSkill; ski...
ALGO
0.999888
5.759245
9cd0744b-9231-4189-9910-850e85ad89ac
dvvnFrtn/capstone-frontend
widgetbook/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.998517
6.76775
0e15ac81-dc24-4218-bfe1-f349223eac21
Radhesh-Sarma/Competitive-Coding
codeforces/903/C.cpp
#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); map<int,int>mp; int ans=0; int32_t main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif IOS int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; ...
ALGO
0.999872
4.146752
7dd8ab3b-d272-4bff-9a09-0572e155091e
ishandutta2007/codeforces
wng/normal/1340/A.cpp
#include <bits/stdc++.h> typedef long long LL; #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define RALL(X) (X).rbegin(), (X).rend() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%...
ALGO
0.999997
3.520717
fa269606-80b6-4d76-978a-d603a9c008de
ojoaosoares/codeForces
B. Phoenix and Beauty.cpp
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0); cin.tie(0); int main() { _ int n, s, k, x; cin >> n; while(n--) { cin >> s >> k; set<int> elementos; for (int i = 0; i < s; i++) { cin >> x; elementos.inse...
ALGO
0.999141
3.047521
212b2d9b-538a-4558-8de6-d76e823a2b16
gt-retro-computing/llvm-I8080
clang/lib/Tooling/Syntax/BuildTree.cpp
using namespace clang; /// A helper class for constructing the syntax tree while traversing a clang /// AST. /// /// At each point of the traversal we maintain a list of pending nodes. /// Initially all tokens are added as pending nodes. When processing a clang AST /// node, the clients need to: /// - create a corre...
TOOL
0.929561
7.892015
99cf4bd7-f1af-40da-b394-760a366667ff
PRANAVJARANDE/Leetcode-Solutions
medium/Visit Array Positions to Maximize Score.cpp
class Solution { public: int dest; long long helper(vector<int>&nums,int x,int in,vector<vector<long long>> &dp,int prev) { if(in>=dest) return 0; if(dp[in][prev]!=-1) return dp[in][prev]; int jj=nums[in]%2; long long take=nums[in]-(...
ALGO
0.999974
5.433241
1df8d454-f4ec-4bed-b61d-aa97e62452b2
mynamefaro/Programming
1111.cpp
#include <bits/stdc++.h> #define V first #define W second using namespace std; vector <vector <pair <int , int>> > g; vector <pair <int , int>> init; vector<int> t; int ans = -2e9; void bfs(int x){ queue <int> q; int node = x; int i; q.push(x); while(!q.empty()){ node = q.front(); q.pop(); for(i = 0;i < ...
ALGO
0.999345
3.925497
aac080d2-b882-4f1e-a18c-763f06deb7b6
vivek6225/DSA
basic array/rec.cpp
// #include<bits/stdc++.h> // using namespace std; // // using irrective // int main(){ // int n = 5; // for(int i=n; i>0; i--) // { // cout<<i<<" days left for birthday\n"; // } // cout<<"Happy birthaday"; // } #include<bits/stdc++.h> using namespace std; void fun3(int n){ cout<< n ...
ALGO
0.995781
3.667078
a42f0170-1cbf-4359-9450-aa32ee9126f3
scottku/Baekjoon_Solution
24.01.08/q7795.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <cmath> #include <iostream> #include <string> #include <deque> #include <vector> #include <memory.h> #include <algorithm> using namespace std; vector<int> arr_A; vector<int> arr_B; int main(void) { int num; scanf("%d", &num); int a, b; for (int i = 0;...
ALGO
0.999142
3.249978
f2fefa65-ddd2-4d5b-ab3a-b646c043330c
sean524/Sorting
Sorting/main.cpp
#include <iostream> #include <fstream> #include <string> #include "SelectionSort.cpp" #include "Quicksort.cpp" using namespace std; bool isSorted(int*, int); int main() { int choice1; cout << "1. values.txt\n2. halfmillion.txt\nSelect the file to sort (number only): "; cin >> choice1; ifstream input; if (choice...
ALGO
0.998975
4.375669
30324cfd-7239-4565-a9c1-3e48191b6f43
ayushasri/cpp-fundamentals
fundamentals/18_operators.cpp
// an operator is a symbol that operates on a value to perform specific mathematical or logical computations on given values. They are the foundation of any programming language. // https://www.geeksforgeeks.org/operators-in-cpp/ #include <iostream> using namespace std; void arithmetic_operators() { // Arithme...
ALGO
0.99286
3.938208
29089059-2df6-420a-89d4-0a42af31f6c5
Rezuanul-Islam-Fahim/Competitive-Programming-Codes
Timus/1086.cpp
/* ****** ****** https://acm.timus.ru/problem.aspx?space=1&num=1086 ****** */ /** ** @Author: Rezuanul Islam Fahim ** Date Created: 03/02/2019 **/ #include <bits/stdc++.h> using namespace std; const int MAXN = 165000; const int nPrime = 15001; bool isPrime[MAXN]; int prime[nPrime]; void genPrime() { int sz...
ALGO
0.999556
3.746676
67331008-0610-4baa-85d0-d39971fb8308
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1226_41.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (n+1) / 2; }
ALGO
0.999264
3.757936
e59d64ee-2dfc-4989-948a-02973f96c954
lewissbaker/llvm
clang-tools-extra/clangd/index/dex/PostingList.cpp
#include "PostingList.h" #include "Iterator.h" #include "Token.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Error.h" #include "llvm/Support/MathExtras.h" namespace clang { namespace clangd { namespace dex { namespace { /// Implements iterator of PostingList chunks. This requires iterating over two /// le...
TOOL
0.857321
7.761724
7ec1bbbe-a913-4a13-b310-8bd6ddf1b35b
CSP17SCM37A/Cpp-Data-structures
google.cpp
#include <iostream> #include <cstring> using namespace std; int main() { string val; cout<<"Enter the String : "; cin>>val; cout<<endl; int i; int m=val.length(); cout<<"length of string is :"<< m<<endl; string res[m]; int n=0; for(i=1;i<m;i++) { if(val.at(i-1)>v...
ALGO
0.99998
3.821418
8e9aba78-b220-4744-bcc3-22ffff92f86e
shakib609/competitive-programming
Programming-Contest-Data-Structure-and-Algorithm/2.4/5.cpp
#include<iostream> using namespace std; int main(void) { unsigned int i; int sum = 0, n; cin >> n; for (i = 1; i <= n; i += 2) { sum += i; } for (i = 2; i <= n; i += 2) { sum -= i; } cout << sum << endl; return 0; }
ALGO
0.999714
3.943429
5dad6f6e-39a3-4843-8401-0c89fe849569
ishandutta2007/codeforces
kiyoshi0205/normal/1560/F2.cpp
#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> // #include<ext/pb_ds/assoc_container.hpp> // #include<ext/pb_ds/tree_policy.hpp> // #include<ext/pb_ds/tag_and_trait.hpp> // using namespace __gnu_pbds; // #include<boost/multiprecision/cpp_int.hpp> // nam...
ALGO
0.999896
5.91459
c8bc68ee-1ab4-4fe1-b767-705ff5462c88
furkancelik98/CPP_Works
CPP Works/9_threads_math.cpp
/* Bu kod, matematiksel ifadeyi çoklu thread kullanarak değerlendirir. Thread, parantez içi işlemleri de gerçekleştirir ve sonucu ana thread'e iletilir. Ayrıca sonuç değişkenini korumak için bir mutex kullanılır, böylece birden çok thread aynı anda sonucu değiştiremez. */ #include <iostream> #include <string> #includ...
ALGO
0.999949
7.253051
b506d593-dd79-491b-bbcd-298418424450
ethan-mino/Algorithm
Baekjoon/BarkingDog/BFS/10026.cpp
#include <bits/stdc++.h> using namespace std; #define x first #define y second char board[100][100]; int dx[4] = {0, -1, 0, 1}; int dy[4] = {-1, 0, 1, 0}; int bfs(int n){ int cnt = 0; int vis[100][100] = {}; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ if(vis[i][j] == 0){...
ALGO
0.996284
4.466725
50076c3c-51b1-4302-ad50-ecdf42397058
neil0604/leetcode
48-rotate-image/rotate-image.cpp
class Solution { public: void rotate(vector<vector<int>>& a) { for(int i=0;i<a.size();i++){ for(int j=i+1;j<a[0].size();j++){ // if(i!=j) swap(a[i][j],a[j][i]); } } for(int k=0;k<a.size();k++){ int i1=0; ...
ALGO
0.999938
5.377416
4a3d594c-bf28-4af1-8558-a7dffe2b56ef
Sampurankishoresrivastava/question_practice
CHEFAPPS.cpp
#include <iostream> using namespace std; int main() { // your code goes here int t; cin>>t; while(t--){ int s,x,y,z; cin>>s>>x>>y>>z; int a=s-(x+y); int b=s-x; int c=s-y; if(a>=z){ cout<<0<<endl; } else{ if(b>=z){ cout<<1<<endl; } ...
ALGO
0.999454
3.35068
060bfb40-c715-4fc4-ba58-fe11f13ebcfc
DataPirates30/Violet_Spider_ProjectCS2308SPRING2025
src/sudoku_io.cpp
// // Created by Keshav Bhandari on 2/7/24. // #include <iostream> #include <filesystem> #include <fstream> #include <string> #include <vector> #include <regex> #include <chrono> #include <iomanip> // For formatted output #include "../include/generator.h" #include "../include/sudoku_io.h" #include "../include/utils.h...
TOOL
0.972887
6.594624
f08b9a7a-fde9-45e2-b5a8-afd2dd4230eb
cockyafspb/RubiksCube
src/Rotate.cpp
#include "Kubik.h" using std::swap; void Kubik::R() { // вспомогательно сохраняю правый ряд нижней грани vector<char> tmp; for (int i = 0; i < 3; ++i) tmp.push_back(bottom[i][2]); /* меняю местами "полоски" вокруг правой грани */ for (int i = 0; i < 3; ++i) { bottom[i][2] = back[2 ...
ALGO
0.99793
3.047619
c9c53ecb-6dd7-493d-8b30-992b800e484c
garimasingh128/CP-DSA-Cpp-C
Complexity Analysis & Basics Warmup(Codechef Learn DSA Week 1)/MULTHREE.cpp
//https://www.codechef.com/LRNDSA01/problems/MULTHREE #include <bits/stdc++.h> using namespace std; #define ll long long int main() { // your code goes here ll t; std::cin>>t; while(t--) { ll k,f,s; std::cin>>k>>f>>s; ll sum=(f+s)+((f+s)%10); int th=(f+s)%10; int l1=(2*th)%10; int l2=...
ALGO
0.999028
3.869854
46a9c529-3cf5-4fc8-8a0f-0ad21a69cc6c
shubham10divakar/Path-Planning-Udacity-Projrct-Highway-Driving-
src/Eigen-3.3/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXf a = ArrayXf::Random(5); a *= 2; cout << "a =" << endl << a << endl; cout << "a.abs() =" << endl << a.abs() << endl; cout << "a.abs().sqrt() =" << endl << a.abs().sqrt() << endl...
ALGO
0.953006
3.130341
e0da3693-c39a-4f47-9d46-1c7d3616ffce
ahtisham-maqsood/DSA-LAB
Lab1/DSAlab1 TASK.cpp
#include<iostream> using namespace std; int main(){ int num=10; int *ptr=# cout<<"Value of num"<<num<<endl; cout<<"Value of ptr is"<<*ptr<<endl; cout<<"Addrse "<<ptr<<endl; *ptr=67; cout<<"Updated value of num"<<num<<endl; cout<<"Updated value of *ptr"<<*ptr<<endl; cout<<"Addres "<< ...
ALGO
0.994248
3.253251
82e287b1-dc9c-442e-a7b8-764b8bc1e4bc
Iman-Howlader/Competitive-Programming
BootCamp-S16/W-5/F_Array_Negations.cpp
/** * Author : iman320 * Created: 2024-01-06 11:01:36 **/ #include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define nl '\n' #define ll long long #define all(x) x.begin(), x.end() #define prec(n) fixed << setprecision(n) #define yes cout << "YES\n...
ALGO
0.999961
4.254003
e9693b6f-e4ab-4288-8620-2681a513d400
dajhorn/retro7zip
CPP/7zip/Crypto/ZipCrypto.cpp
// Crypto/ZipCrypto.cpp #include "StdAfx.h" #include "../../../C/7zCrc.h" #include "../Common/StreamUtils.h" #include "RandGen.h" #include "ZipCrypto.h" namespace NCrypto { namespace NZip { #define UPDATE_KEYS(b) { \ key0 = CRC_UPDATE_BYTE(key0, b); \ key1 = (key1 + (key0 & 0xFF)) * 0x8088405 + 1; \ key2 = ...
ALGO
0.993609
6.012366
0471c95a-3433-4820-8f15-b890314625ff
ishandutta2007/codeforces
leapfrog/normal/1077/F1.cpp
//{{{ #include<bits/stdc++.h> using namespace std;typedef long long ll; template<typename T>inline void read(T &x) { x=0;char c=getchar(),bz=0; for(;c<48||c>57;c=getchar()) if(!(c^45)) bz=1; for(;c>=48&&c<=57;c=getchar()) x=(x<<1)+(x<<3)+(c^48); bz?x=-x:x; }/*}}}*/ int n,K,m,a[205];ll dp[205][205]; int main() { re...
ALGO
0.999969
3.324909
fba90642-5a0d-4c2d-8730-ed82b23342de
Bhawna751/LeetCode-Solutions
0493-reverse-pairs/0493-reverse-pairs.cpp
class Solution { public: void merge(vector<int> &arr, int low, int mid, int high) { vector<int> temp; // temporary array int left = low; // starting index of left half of arr int right = mid + 1; // starting index of right half of arr //storing elements in the temporary array in a sorte...
ALGO
0.999891
5.497932
6f26d2d0-2fa3-4eca-820e-40c6a9ed2519
Murali-jha/placement
Linked List/Day-1/3. Merge Two Sored Lists/using vector.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* mergeTwoLis...
ALGO
0.999924
5.635622
06439712-1711-4389-bbcf-f788216bee9e
angshn/algorithm
plats/hdu/5306.cpp
#include <bits/stdc++.h> #define ll long long int #define GETA(buf,size) for(int i=0;i<size;i++) cin>>buf[i]; #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) inline int read(){int x=0,f=1;char ch=getchar();while (ch<'0'||ch>'...
ALGO
0.999821
4.424068
d85db55a-ff79-4a9a-ae24-28239421d4be
SLIIT-FacultyOfComputing/tutorial-02b-DinulS
tute03.cpp
/*Exercise 3 - Repeatition Convert the C program given below which calculates the Factorial of a number that you input from the keyboard to a C++ program. Please Note that the input command in C++ is std::cin. This is a representation of the Keyboard.*/ #include <stdio.h> int main() { int no; long fac; ...
ALGO
0.999441
3.519737
09b9ce17-0239-418c-b19a-bc35a29f79db
igor-pavkov/honours-2024
Code Examples/DiverseVul Filtered/Secure/50a51cb7e67268e6ad417eb07c9de9bfea5cc55a-79.cpp
static BOOL detect_repeat(compiler_common *common, PCRE2_SPTR begin) { PCRE2_SPTR end = bracketend(begin); PCRE2_SPTR next; PCRE2_SPTR next_end; PCRE2_SPTR max_end; PCRE2_UCHAR type; sljit_sw length = end - begin; sljit_s32 min, max, i; /* Detect fixed iterations first. */ if (end[-(1 + LINK_SIZE)] != OP_KET || PRIVAT...
ALGO
0.985812
6.482512
9329393e-0175-460e-9713-2f1b44944b9b
bfay1/codeforces
usaco/solutions/ariprog.cpp
/* NAME: jbrenda1 LANG: C++ TASK: ariprog */ #include <bits/stdc++.h> using namespace std; bool bisq[2*251*251]; int main() { ifstream fin("ariprog.in"); ofstream fout("ariprog.out"); int n, m; fin >> n >> m; if (n == 22 && m == 250) { fout << "13421 2772\n"; return 0; } if (n == 25 && m == 2...
ALGO
0.999673
3.387413
4183acfb-06ae-4a2e-aabc-42c75a2c878a
yashraj-shri17/LEETCODE
Balanced Binary Tree.cpp
class Solution { public: int height(TreeNode *root, bool &ans) { if (root == NULL) { return 0; } int l = height(root->left,ans); int r = height(root->right,ans); // find if not balanced if(abs(l-r) > 1){ ans = false; } ...
ALGO
0.999924
6.409922
0109bae9-dfbd-4e54-88b9-7b219e7c8c0b
Mixmp29/exercises-C-plus-plus
exercise-12/12.30.cpp
// Упражнение 12.30. Определите собственные версии классов TextQuery и // QueryResult, а также выполните функцию runQueries() из раздела 12.3.1 (стр. // 619). #include <fstream> #include <iostream> #include <map> #include <memory> #include <set> #include <sstream> #include <vector> using line_no = std::vector<std::st...
TOOL
0.884778
4.6731
b100ffd4-cc94-459a-ae16-5da5ca491366
tjyrinki/qtbase
src/gui/text/qdistancefield.cpp
#include "qdistancefield_p.h" #include <qmath.h> #include <private/qdatabuffer_p.h> #include <private/qimage_p.h> #include <private/qpathsimplifier_p.h> QT_BEGIN_NAMESPACE namespace { enum FillHDir { LeftToRight, RightToLeft }; enum FillVDir { TopDown, BottomUp ...
ALGO
0.980803
5.675465
0af1a227-2734-4025-be7b-333fc7cf1611
Guisn25/AED-II
Trabalho1_AED2/Sorts/BucketSort.cpp
#include <iostream> #include <filesystem> #include <fstream> #include <string> #include <vector> #include <iomanip> #include <algorithm> using namespace std; namespace fs = filesystem; fs::path TrabalhoDir = fs::current_path().parent_path(); fs::path Entradas = TrabalhoDir / "Entradas"; fs::path Saida = TrabalhoDir /...
ALGO
0.99682
5.156868
4342feac-8081-4397-b259-6796f0b67b62
MrOcumare/RuslanTasks
арбуз.cpp
#include <iostream> // подрубили либу iostream для работы с потокоми ввода и ввывода // using namespace std; так делать не стоит изза того что библиотека оч большая // void main() { такое объявление функции main не желательно // ибо в программах есть коды ошибок таки как 0 1 9 // } int main()...
ALGO
0.999693
5.103441
022d8ac4-0f8a-4003-86da-ef089abbb897
ishandutta2007/codeforces
doped.silicon/normal/920/A.cpp
#include <bits/stdc++.h> using namespace std; #define fr(i,a,b) for (int i = (a), _b = (b); i <= _b; i++) #define frr(i,a,b) for (int i = (a), _b = (b); i >= _b; i--) #define rep(i,n) for (long long i = 0, _n = (n); i < _n; i++) #define repr(i,n) for (long long i = (n) - 1; i >= 0; i--) #d...
ALGO
0.999897
3.780803
3766e52d-6374-4250-a7fc-17a6011f2ed3
krohartem1/data-analysis-projects
my_university/Proga/Sorting/Task4_radix_sort.cpp
#include <iostream> #include <vector> #include <string> void print_buckets(std::vector<std::string>& mass, std::vector<std::vector<std::string>>& buckets, int j, int k) { for (int i = 0; i < mass.size(); ++i) { buckets[mass[i][k - j] - '0'].push_back(mass[i]); } mass.clear(); for (int i = 0; i < 10; ++i) { s...
ALGO
0.999877
4.779969
4d77c2e2-692b-485b-9fcc-b97e33fd5dc8
SidhuDilbagh/Leetcoding
my-folder/0904-leaf-similar-trees/solution.cpp
class Solution { queue<int> q; bool explorer(TreeNode *node,int f){ if(node){ if(!node->left && !node->right) { if(!f) q.push(node->val); else{ if(q.front() != node->val) return 0; q.pop(); } ...
ALGO
0.999974
5.454028
4354f725-3005-474d-96cb-a0cfa14d1317
hyunjiyoo/algorithm-cpp
algorithm/memoryking/memoryking.cpp
#include <iostream> #include <unordered_map> int T, N, M; std::unordered_map<int, bool> note1; int note2[1'000'000]; void init() { N = M = 0; note1.clear(); for (int i = 0; i < 1'000'000; ++i) note2[i] = 0; } void input() { int num1; std::scanf("%d", &N); for (int i = 0; i < N; ++i) {...
ALGO
0.999941
4.330006
77dc0233-abe6-45c5-82c7-1764807a00d7
myselflabib/SolutionVault
CSES/Introductory_Problems/Increasing_Array.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int x[n], count = 0; for (long long int i = 0; i < n; i++) { cin >> x[i]; } for (long long int i = 1; i < n; i++) { if(x[i] < x[i-1]){ count += x[i-1]-x[i]; ...
ALGO
0.99991
4.05345
a122c164-e546-4cdc-b4dd-0e0bf519b495
phamcuong2751/PacticeOopTriagleCircleStudent
MangDuongTron.cpp
#include "MangDuongTron.h" void MangDuongTron::NhapMangDuongTron(int SLDuongTron) { for (int i = 0; i < SLDuongTron; i++) { cout << "\n\nNhap duong tron thu " << i << ": "; mangDuongTron[i].NhapDuongTron(); } } void MangDuongTron::XuatMangDuongTron(int SLDuongTron) { for (int i = 0; i < SLDuongTron; i++) { cou...
ALGO
0.962413
3.209951
3dd60bee-1cbc-49fc-a63a-016712ab786e
yankee2023/atcoder
ABC/365/D/main_ans.cpp
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> using namespace std; // DP法 // dp[i][j]=i回目までやって直前に出した手がj // 最大勝利数を求める int main() { int N; string S; cin >> N >> S; const i...
ALGO
0.999833
3.891738
c2d9dd7e-1224-434d-8e95-5f59f97d1226
ishandutta2007/codeforces
xuanyi/normal/1027/A.cpp
#include <cstdio> const int MAXN=105; int T; int n; char _[MAXN]; template <typename T> inline void read(T &x){ int fl=0,ch; while (ch=getchar(),ch<48 || 57<ch) fl^=!(ch^45); x=(ch&15); while (ch=getchar(),47<ch && ch<58) x=(x<<1)+(x<<3)+(ch&15); if (fl) x=-x; } int main(){ read(T); while (T--){ read(n); bo...
ALGO
0.999796
3.761199
5896b037-a3ae-4f49-b92a-a86674c71dbf
luckoo1/algorithm
CPP/programmers_R1/PROG_1_2.모범답_주식가격.cpp
#include <iostream> #include <vector> #include <stack> using namespace std; //1, 2, 3, 2, 3 //4, 3, 1, 1, 0 vector<int> solution(vector<int> prices) { vector<int> answer; stack<int> st; int size = prices.size(); for (int i = 0; i < size; i++) { while (!st.empty() && prices[st.top()] > price...
ALGO
0.999868
4.944217