uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
7d78e0ed-ab93-4224-9384-67b07ba55dec
SergioGranadosUAD/Programacion1
ExamenParcial1/Source.cpp
#include <iostream> #include <string> #include <cmath> #include <vector> #include <algorithm> #include <cstdlib> using std::cout; using std::cin; using std::endl; using std::string; using std::vector; using std::runtime_error; using std::cerr; void EjercicioUno(); void EjercicioDos(); void EjercicioTres(); void fib(...
TOOL
0.98264
3.306401
e858156b-f21c-4092-be1a-913b8295003e
haopengsong/DataStructure0
Sorting/mergeSort.cpp
class Solution { public: vector<int> sortArray(vector<int>& nums) { if (nums.size() == 0) { return nums; } int n = nums.size(); vector<int> res(n, 0); mergeSort(nums, res, 0, n - 1); return nums; } private: void mergeSort(vector<int>& nums, vector<...
ALGO
0.999999
6.424504
deb23697-9d81-47d5-a68a-26c121532b63
hinataros/V6
thirdparty/convex/src/compute_BWC_span.cpp
#include "convex_solver.hpp" #include "link_model.hpp" #include <iomanip> #define o(x) std::cout << #x << ":" << std::endl << std::setprecision(6) << std::scientific << x << std::endl #define so(x) std::cout << #x << ":" << x.rows() << " × " << x.cols() << std::endl MatrixXd Convex_solver::compute_BWC_span(MatrixXd &...
ALGO
0.999969
3.862954
cdcae7f5-8d7b-4782-968e-f910cbd69faa
sebastianripa/varena1
varena inginer/main.cpp
#include <bits/stdc++.h> using namespace std; ifstream fin ("inginer.in"); ofstream fout ("inginer.out"); queue< pair<int, int> >q; int n, l, i, j, i2, i3, j2, j3; int m[80][80]; int vi[4] = {0, 0, 1, -1}; int vj[4] = {1, -1, 0, 0}; bool functie(int i, int j) { if(i < 0 || j < 0 || i > n+1 || j > l+1) ...
ALGO
0.99966
3.230816
acd95ed1-29a6-47c9-a226-1f685bc12617
Sanchitraina1999/DSA
Ass8/8_evaluation.cpp
/* Implement C++ program for expression evaluation using stack based on given conditions: Operands and operator, both must be single character, Input Postfix expression must be in a desired format, Only '+', '-', '*' and '/ ' operators are expected. */ #include<iostream> #define MAX 100 using namespace std; class S...
ALGO
0.99618
4.314627
93499405-c874-4ee3-8071-1df79703dac2
PonizhenDoRyadovogo/932221b
laba3_SortShell/laba3_SortShell/SortShell.cpp
#include<iostream> #include<time.h> #include<vector> #include<fstream> #include<chrono> #include<string> #include<assert.h> void PrintArray(std::vector<int> a) { std::cout << "["; for (int i = 0; i < a.size(); i++) std::cout << a[i] << " "; std::cout << "]"; } void SortInsert(std::vector<int> &arr) { int i, j, ...
ALGO
0.998635
4.557163
fb914cb3-5f4c-4a2d-9333-fe6f950fdc51
IceJiub/bases_de_programmation_c_cpp
tp3/3_pointeurs_et_fonctions_suite/ex3_3.cpp
#include <iostream> using namespace std; void logic(bool a, bool b, bool *AND, bool *OR, bool *XOR) { if (a && b) { *AND = true; *OR = true; *XOR = false; } else if (!a && !b) { *AND = false; *OR = false; *XOR = false; } else { *AN...
ALGO
0.999015
4.951295
152fbaa3-35ae-48ad-a730-d0b47d8921b8
aayushh-30/DSA
function_overloading.cpp
#include<iostream> using namespace std; //function overloading int add(int a,int b){ cout<<a+b; } int add(int a,float b){ cout<<a+b; } int main(){ int a,b; cin>>a>>b; float k; cin>>k; add(a,k); return 0; }
ALGO
0.891492
3.224119
00a83bc8-9716-4793-b146-e17365477408
safwanpaleri/C-plus-plus
Array/Leaders in an Array.cpp
//print all the leaders of the array //An element is leader if it is greater than all the elements to its right side #include <bits/stdc++.h> using namespace std; main() { //initialization int n=7; int arr[]={15,16,3,2,4,1,0}; int max = arr[n-1]; //traversing from rear of the array and checking //if the curren...
ALGO
0.999979
3.512691
665e3d31-1b00-445e-89b5-587d67063686
Xilinx/Vitis_Libraries
solver/L2/benchmarks/gesvdj/kernel_gesvdj.cpp
#include "xf_solver_L2.hpp" #define MA 16 // Symmetric Matrix Row size //#define MA 512// Symmetric Matrix Row size #define NA MA // Symmetric Matrix Col size extern "C" void kernel_gesvdj_0( double dataA[NA * NA], double sigma[NA * NA], double dataU[NA * NA], double dataV[NA * NA], int matrixSize) { #pragma HLS I...
ALGO
0.999711
3.992565
dcfa09ec-467e-496d-b908-b65f2644ffaf
Shahbaz898414/Codeforces
Practice Question/800-2000/B/B. Disturbed People.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define mod 1000000007 #define Time cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl; #define pb push_back #define mp make_pair #define ff first #define ss second #define vi vector<int> #define onesbits(x) __builtin_popcoun...
ALGO
0.999977
4.315014
c58648aa-c037-4843-a3be-4edc9c321f33
Rikon07/Codeforces-Rik_on
D_Binary_Cut.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; int solve() { string s; cin >> s; int n = s.size(), sub = 0; bool same = true, f = false; for(int i=0; i<n-1; i++) { if(f == false && s[i] == '0' && s[i+1] == '1') { f = true; cont...
ALGO
0.999755
4.344943
96f2f5a2-6232-40db-9511-e861992e7f94
omajul85/pluralsight_C-
Beautiful C++/Find/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <string> using namespace std; int main() { vector<int> v{ 4, 6, 7, 6, 1, 3, -2, 0, 11, 2, 3, 2, 4, 4, 2, 4 }; string s{ "Hello I am a sentence" }; // Find the first 0 in the collection auto result = find(begin(v), end(v), 0); ...
ALGO
0.998905
3.132051
909b17ea-53aa-4cbe-acb4-d2f7bb3a2870
MDNROnik/Competitive-Programming
Codeforces/A. Cableway.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int r,g,b; cin>>r>>g>>b; int total=30; r-=2; int rs=1,gs=0,bs=0; while(1){ if(r<=0 && b<=0 && g<=0){break;} if(rs==0 && bs==1){ total+=1; rs=1;bs=0; r-=2; } else if(gs==0...
ALGO
0.999553
3.731466
d6f2ec09-2eee-47f6-9753-5fc27c06382c
JayTheCoder77/Striver-Dsa
BitManipulation/leetcode/1486.cpp
1486. XOR Operation in an Array class Solution { public: int xorOperation(int n, int start) { vector<int> nums (n,0); for(int i = 0 ; i < n ; i++){ nums[i] = start + 2 * i; } int xor1 = 0; for(int i = 0 ; i < nums.size() ; i++){ ...
ALGO
0.999875
5.336591
0035945b-b57c-4a2e-9efa-de7a236c43ee
BhavyamSanghavi/DSA-QUESTIONS
Difficulty: Medium/Clone an Undirected Graph/clone-an-undirected-graph.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> #include <sstream> using namespace std; struct Node { int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Nod...
ALGO
0.999741
6.318008
b6389b69-367b-4487-9e80-b655463eb60c
gt-shara/gt-shara.github.io
SHARA/src/sat/sat_mus.cpp
#include "sat_solver.h" #include "sat_mus.h" #include "sat_sls.h" namespace sat { mus::mus(solver& s):s(s), m_is_active(false), m_best_value(0), m_restart(0), m_max_restarts(0) {} mus::~mus() {} void mus::reset() { m_core.reset(); m_mus.reset(); m_model.reset(); m_best...
ALGO
0.999003
6.252626
d54d6b62-5e2d-4127-acc6-6c6dafca41fe
ishandutta2007/codeforces
mxh1999/normal/17/E.cpp
//Author:mxh1999 // #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int mo=51123987; const int maxn=2000010; typedef long long ll; char s[maxn]; int p[maxn],d[maxn]; int sum,tmp1[maxn],tmp2[maxn],tmp3[maxn],tmp4[maxn]; int start[maxn],final[maxn]; int n; int main(...
ALGO
0.999986
3.522451
fa1871a0-4ad4-47cc-a205-9a6e960d543b
wohenniubi/codebattle
src/803_Bricks_Falling_When_Hit/main.cpp
#include <iostream> #include <vector> #include <unordered_set> using namespace std; class Solution { public: // 方法2:采用UnionFind,不过为了统计数据,除了父节点数组之外,还需要增加组群个数数组 // 另外为了找到是否为stable的状态,还需要一个数组t;其他思路保持不变,也是倒着检查的桥砖的 vector<int> hitBricks2(vector<vector<int>>& grid, vector<vector<int>>& hits) { int m = ...
ALGO
0.999608
6.421947
6c6e55dc-f652-4d41-a437-3e1b89c8ad1e
bhaveshlohana/HacktoberFest2020-Contributions
Algorithms/graph/push_relabel.cpp
//input n->number of vertices //input m->number of edges //input a,b,c->edge from a to b with capacity c //Output max_flow->max_flow between 1 and n vertex #include<bits/stdc++.h> #define lld long long #define pb push_back #define mk make_pair #define MAX (lld)1e18+7 #define lim (lld)1e18+7 #define MAX2 (lld)1e18+9 #d...
ALGO
0.99999
4.346746
24875463-cdad-45ee-9a82-7dc4bcfb4e7f
BhoomikaSahu/Company-Coding-Questions
Maventic/nameProximityScore.cpp
/*Given two first names of two persons, please calculate name_proximity_score. Name proximity score is calculated as follows: • If a letter occurs in the same position in both names, the score increments by two. • If a letter occurs in both names, but in different positions, the score is incremented by 1. • Once a lett...
ALGO
0.999591
4.451447
9800a9f5-85e7-440d-955b-8773f6677ad9
Haileamlak/competitive_programming-a2sv
other_problems/ValidParentheses.cpp
class Solution { public: bool isValid(string s) { stack<char> coll; char temp; int size = s.size(); if (size % 2 != 0) return false; for (int i = 0; i < size; i++) { if (s[i] == '(') coll.push(')'); else if (s[i...
ALGO
0.997174
5.935717
1991e35b-aa60-412e-9c5d-45bb06b9a0cd
Saketmishra14/DSA-Supreme-3.0
13 Linked List/Linked List class-03/palindromeofLL-234.cpp
#include<iostream> using namespace std; 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* getmiddle(ListNode* head,ListN...
ALGO
0.999818
5.291663
4a79287f-a6b7-490a-b47f-2d0744aa2b0d
Pragnesh2208/LeetCode-Solution
Binary Tree/#623 Add One Row to 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.999997
6.328244
0c8a6a8f-62b2-4486-a57a-c2754d770213
ritikbanger/Hacktoberfest2022-DSA
03. Recursion/Reverseastack.cpp
// C++ code to reverse a // stack using recursion #include<bits/stdc++.h> using namespace std; // using std::stack for // stack implementation stack<char> st; // initializing a string to store // result of reversed stack string ns; // Below is a recursive function // that inserts an element // at the bottom of a ...
ALGO
0.99996
5.479319
b080aa19-ee83-4e96-9b30-27c202dc4f73
PowerAlgorithm/Algorithm-Study
2022/[Week3 - Implementation & Simulation]/황태환/1138.cpp
#include <bits/stdc++.h> int main(int argc, char* argv[]) { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr), std::cout.tie(nullptr); int N; std::cin >> N; std::vector<int> v(N); for(int i = 0, x; i < N; i++) { std::cin >> x; for(int j = 0; j < N; j++) ...
ALGO
0.999942
3.680696
d7d93232-6784-491f-a74a-1ffd70cef3db
ishandutta2007/codeforces
t1dus/normal/1408/B.cpp
// --------------------------------------------------<TEMPLATE>-------------------------------------------------- // --------------------<optimizations>-------------------- /* #pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx,avx2,fma") */ // -------------------</optimizations>-------------------- /...
ALGO
0.999874
4.023965
078a545d-5270-4e93-92b4-033c751a38b6
ishandutta2007/codeforces
shun_pi/normal/1333/D.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long int; #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++) #define IFOR(i, begin, end) for(int i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--) #define REP(i, n) FOR(i,0,n) #define IREP(i, n) IFOR(i,0,n) constexpr int MOD = 100000...
ALGO
0.999966
3.571706
6ba79465-2f7f-4172-a957-53b78fc1d3e7
Dev12092003/C-with-DSA
binary search/bookallocation_g_f.cpp
// this code using binary search #include<iostream> using namespace std; int isPossible(int arr[],int n,int m,int mid){ int studentcount=1; int pagesum=0; for(int i=0;i<n;i++){ if(pagesum+arr[i]<=mid){ pagesum +=arr[i]; } else{ studentcount++; ...
ALGO
0.999971
4.90083
089e2095-1ba4-4730-8b7f-852ac66a5957
NishantTomer5601/LeetCode-Questions-Repo-nishanttomer5601-
0930-binary-subarrays-with-sum/0930-binary-subarrays-with-sum.cpp
class Solution { public: void PreCalc(vector<int>& nums,vector<int>& v, int n){ v[0]=nums[0]; for(int i=1;i<n;i++){ v[i]=v[i-1]+nums[i]; } } int numSubarraysWithSum(vector<int>& nums, int goal) { int n=nums.size(); int ans=0; vector<int> ...
ALGO
0.999993
5.964333
37734178-d578-40ce-a12f-cb0c3c6c2f59
simonyang0608/LeetCode
Binary_Search/1292.Maximum_Side_Length_of_a_Square_with_Sum_Less_than_or_Equal_to_Threshold/C++/1292.Maximum_Side_Length_of_a_Square_with_Sum_Less_than_or_Equal_to_Threshold.cpp
class Solution { public: int maxSideLength(vector<vector<int>> & mat, int threshold) { //===========================================// // Input type: // // - vector<vector<int>> ref. (mat vector) // // - int (threshold value) // ...
ALGO
0.999854
6.499931
83aca3ea-47b3-48f2-821a-0bdfe57de9d3
Denver44/CP-and-DSA-in-CPP
Competitive_Programming/308Numbersof1Bits.cpp
#include <iostream> using namespace std; // Most Easiest way to check // eg if we have gen three then 3 & 2 will be 2 that means now n is 2 so 2 & 1 will be 0 so total will be 2 as we reached 0 after 2 round. class Solution { public: int hammingWeight(uint32_t n) { uint32_t count; while (n !=...
ALGO
0.999674
5.648633
e0488ca2-e22c-49cf-ac40-de0cb982e099
pprajap/boost
libs/math/example/nc_chi_sq_example.cpp
// Caution: this file contains Quickbook markup as well as code // and comments, don't change any of the special comment markups! //[nccs_eg /*` This example computes a table of the power of the [chi][super 2] test at the 5% significance level, for various degrees of freedom and non-centrality parameters. The table...
ALGO
0.960106
5.402257
a1171ba6-e6e9-4a68-8056-03eae65aa018
codingJokerr/codetree-TILs
240810/재귀함수를 이용한 3n + 1 수열/3n+1-sequence-with-recursive-function.cpp
#include <iostream> using namespace std; int M3P1(int n) { if(n==1) return 0; if(n%2==0) return M3P1(n/2) +1; else return M3P1((n*3)+1) +1; } int main() { int n; cin>>n; cout<<M3P1(n); }
ALGO
0.999935
4.325899
17904e5f-a78a-492b-ad4a-a49322f242ff
wrisov/Leetcode_problems
44-wildcard-matching/wildcard-matching.cpp
class Solution { public: bool isMatch(string s, string p) { vector<vector<bool>> dp(s.size() + 1, vector<bool>(p.size() + 1, false)); dp[0][0] = true; for (int i = 0; i <= s.size(); i++) { for (int j = 1; j <= p.size(); j++) { if (p[j - 1] == '*') { dp[i][j] = dp[i][j - 1] || i && ...
ALGO
0.999938
5.117661
bbab2270-e8da-4e02-bf7f-06b36c60c959
tusikalanse/acm-icpc
2019/0728/i.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n, m, k; cin >> n >> m >> k; if(k > (n - 1) * (m - 1)) cout << -1 << endl; else cout << n + m - 2 << endl; return 0; }
ALGO
0.999907
3.769297
81f5ee85-b2b1-41da-89d0-176de2fbae1b
builder-247/itp2d
src/operatorsum.cpp
#include "operatorsum.hpp" std::ostream& OperatorSum::print(std::ostream& stream) const { const_opiter next_op = components.begin(); ++next_op; for (const_opiter op = components.begin(); op != components.end(); ++op) { stream << (**op); ++next_op; if (next_op != components.end()) stream << " + "; } retur...
TOOL
0.986702
6.437008
270c9d21-8c95-46a7-917e-15ba5ac00822
windcry1/My-ACM-ICPC
SWUST OJ/0331.cpp
//Author:LanceYu #include<cstring> #include<cmath> #include<cstdio> #include<cctype> #include<cstdlib> #include<ctime> #include<vector> #include<iostream> #include<string> #include<queue> #include<set> #include<algorithm> #include<complex> #include<stack> #include<bitset> #define ll long long using namespace std; const...
ALGO
0.999052
3.463371
0a511a75-6133-4043-b19e-f93b0ba1f6e1
lachlan-jones5/Portfolio_Lachlan_Jones
FizzBuzz/FizzBuzz(C++)/FizzBuzz.cpp
#include <iostream> #include <string> int main(){ int fizz = 3; //Set numbers that we want to be divisible by (fizz and buzz numbers) int buzz = 5; std::string outString; //Our string begins here for (int i = 1; i <= 100; i++){ outString = ""; //Set string to empty if (i % fizz == 0) outSt...
TOOL
0.994311
5.357546
d51a227f-02e9-4246-a9d3-748a73cffd10
ahonn/acm
water/Head-to-Head_Match.cpp
// Head-to-Head Match // Description // Our school is planning to hold a new exciting computer programming contest. During each round of the contest, the competitors will be paired, and compete head-to-head. The loser will be eliminated, and the winner will advance to next round. It proceeds until there is only one co...
ALGO
0.999935
4.507068
fae801dc-bf1f-4528-8fd3-60348d1855ef
mubasshirahin/Competitive-Programming
Codeforces/859D(D4).cpp
#include <bits/stdc++.h> using namespace std; /*-----------------------------------------------------------------------------------------------------------*/ #define pb push_back #define mp make_pair #define F first #define S second #define endl '\n' #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(),...
ALGO
0.999686
4.008181
df176799-7143-4d43-9d52-5c2fe725e0d5
LeHaiDangSPKT/Nam1-Nam2
1. Freshman_HKI/NMLT/BT them ve chuoi/Bai 7/Bai 7.cpp
#include<stdio.h> #include<string.h> void main() { char S[100]; gets(S); int l = strlen(S); for (int i = 0; i < l; i++) { if (i % 2 == 0) if (S[i] >= 'a' && S[i] <= 'z') S[i] -=32; else if (S[i] >= 'A' && S[i] <= 'Z') S[i] += 32; } for (i = 0; i < l; i++) { printf("%c", S[i]); } }
ALGO
0.999887
3.92414
bb56a16a-a9df-4578-b0ff-ed249c688d6b
ArsenyMironov/Smilei_ionization_templatization
src/SmileiMPI/SmileiMPI.cpp
#include "SmileiMPI.h" #include <cmath> #include <cstring> #include <algorithm> #include <iostream> #include <sstream> #include <fstream> #include "Params.h" #include "Tools.h" #include "ElectroMagn.h" #include "ElectroMagnBC1D_SM.h" #include "ElectroMagnBC2D_SM.h" #include "ElectroMagnBC3D_SM.h" #include "ElectroM...
TOOL
0.948452
3.770927
691d945f-c3ba-4ca3-ae7d-a1f5f2a5ef19
iambyt3z/leetcode-solutions
0990-verifying-an-alien-dictionary/0990-verifying-an-alien-dictionary.cpp
class Solution { public: bool comp(string &s1, string &s2, unordered_map<char, int> &order) { int len1 = s1.length(); int len2 = s2.length(); int i1=0, i2=0; while(i1 < min(len1, len2)) { if(order[s1[i1]] < order[s2[i2]]) return true; else if(order[s1[i1]] > ...
ALGO
0.999984
6.139523
6aa7cafa-1739-42ce-84ef-b5725f24b4c0
Suman-Khara/Leetcode_POTDs
2024-07/03.cpp
// 1509. Minimum Difference Between Largest and Smallest Value in Three Moves // https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/ // Runtime: 65 ms, Beats 77.23% of C++ submissions // Memory: 38.70 MB, Beats 50.84% of C++ submissions #include <vector> #include <algor...
ALGO
0.999916
5.962034
bb2cc355-9660-4714-90b5-0a1e0258c6da
preetham-ggs/Pat-2-codes
vprople_rc_1.cpp
#include<iostream> #include<climits> using namespace std; #include<vector> int max(int a, int b){ if(a>=b) return a; else return b; } void rod_cutting(int *p,int n){ int r[n]; int c[n]; r[0]=0; cout<<r[0]; for(int l=1;l<=n;l++){ r[l]=-1; for(int k=1;k<=l;k++){ int...
ALGO
0.999841
3.338722
e2071a97-7f49-4342-8dc9-ac7c89e424e6
arifur30/Codeforces-Submissions
U_-_Tom_Riddle_s_Diary.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define YES cout << "YES\n" #define NO cout << "NO\n" #define nl "\n" #define arrin(arr, n) for(ll i = 0; i < n; i++) cin>>arr[i] #define arrout(arr, n) for(ll i = 0; i < n; i++) cout<<arr[i]<<" ";cout<<nl #define arrin2...
ALGO
0.99988
4.578698
7b489dd7-4c0b-4ea7-a455-e50f7e7a6bef
kevinchang73/2021Spring_PD_Final_Project
src/legalizer.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <sstream> #include <cassert> #include <vector> #include <cmath> #include <map> #include <algorithm> #include "macro.h" #include "legalizer.h" using namespace std; #define HORIZONTAL true #define VERTICAL false void Legalizer::parseInput(fstream& def, ...
ALGO
0.99528
3.621897
e638aa94-9479-47ad-b113-8ed458385532
stariluz/uach-programming-introduction
Exercise_20_Arrays-16_03_22.cpp
/* Alumno: Adrian Alejandro Gonzalez Dominguez Matricula: 359834 Grupo: 2CC2 */ /* Wednesday 16/03/2022 Alphabet pyramid alphabet This program print all the alfabeth in a pyramid down. The first line has all the letters beginning with 'Z'; and the last line has only the letter 'Z'. */ ...
ALGO
0.924644
3.55329
7f648a20-fa38-4dff-839a-84e5f4e0012a
Xvedk/GFG-ALL
POTD/2025/January/14-01-2025.cpp
class Solution { public: // Function to find equilibrium point in the array. int findEquilibrium(vector<int> &arr) { // code here int n=arr.size(); vector<int>pre(n, 0), suf(n, 0); int sum=0; for(int i=0; i<n; i++){ pre[i]=sum; sum+=arr[...
ALGO
0.999983
5.903967
6de82895-e2c6-499e-bf19-ac12aa9cf9b0
AncaS15/PCLP2
Biblioteca.cpp
#include <iostream> #include <string> #include <vector> #include <iomanip> #include <algorithm> class Carte{ protected: std::string titlu,gen; int zi,luna,an,nr_recenzii; int *recenzii; public: Carte(std::string titlu,int zi,int luna,int an,std::string gen,int nr_recenzii,int* recenzii): titlu(titl...
TOOL
0.924046
4.58323
cbc8de80-701b-4197-b8f9-dee7a3102b4a
noteasymin/Algorithsm
Cpp/CodeUp/1043.cpp
#include <stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); printf("%d", a % b); return 0; }
ALGO
0.999841
3.125821
ccca1c6f-3521-40fa-bd39-23d4a0dd98e4
ruved/180DaysProblemSolving
712-minimum-ascii-delete-sum-for-two-strings/minimum-ascii-delete-sum-for-two-strings.cpp
class Solution { public: int help(string &s1, string &s2,int i,int j,vector<vector<int>>&dp){ if(i<0||j<0){ int sum=0; while(i>=0){ sum+=int(s1[i--]); } while(j>=0){ sum+=int(s2[j--]); } return sum; } if(dp[i][j]!=-1) return dp[i][j]; ...
ALGO
0.99999
6.234855
c45c7fa7-76ed-4ca8-96f8-db2145902c3d
linouk23/informatics-mccme-ru
Graph Theory Problems/170.cpp
#include <bits/stdc++.h> using namespace std; struct Edge { int to, dep_time, arr_time; Edge(int to, int dep_time, int arr_time) : to(to), dep_time(dep_time), arr_time(arr_time) {} }; class Solution { private: int n, m, start, finish; vector<vector<Edge>> g; const int INF = (int)1e9; pub...
ALGO
0.999866
4.698184
5f185a05-5461-44f5-b9e5-1856f37d65ec
mdshemul48/competitive-programming-practice-solution
contest-solutions/C_Problem.cpp
#include <bits/stdc++.h> using namespace std; // custom define void dbg_out() { cerr << endl; } template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); } #define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__) #define ll long long #define pub pus...
ALGO
0.998701
3.821553
d10c7686-d901-40f3-b60d-ad6e8c122d87
TwistedFury/CSC196
Source/ThirdParty/fmod/core/examples/plugins/fmod_distance_filter.cpp
#ifdef WIN32 #define _CRT_SECURE_NO_WARNINGS #endif #include <math.h> #include <stdio.h> #include <string.h> #include "fmod.hpp" extern "C" { F_EXPORT FMOD_DSP_DESCRIPTION* F_CALL FMODGetDSPDescription(); } const float FMOD_DISTANCE_FILTER_PARAM_MAX_DISTANCE_MIN = 0.0f; const float FMOD_DISTANCE_FILTER...
TOOL
0.984796
6.183763
7afe5bc6-1bfe-4d79-bfc5-30bfaae9ad6e
nnurmakhanbet/nurdaulet
4.cpp/48.cpp
#include <iostream> #include <algorithm> #include <map> #include <bits/stdc++.h> using namespace std; int n; map<string, int>q; int main(){ cin >> n; for (int i = 0; i < n; ++i) { string x; cin >> x; q[x]++; } for (map<string, int> :: iterator it = q.begin(); it !=q.end(); ++...
ALGO
0.999569
4.034914
ce986e2d-0a6b-4f56-9939-f0b73cedb0ea
pramod3009/leetcode
Minimum Cost to Connect Sticks.cpp
class Solution { public: int connectSticks(vector<int>& sticks) { int result = 0; if(sticks.size() ==0 or sticks.size()==1){ return 0; } priority_queue<int, vector<int>, greater<int>> q; for(auto stick : sticks){ q.push(stick); } ...
ALGO
0.999843
5.356968
17566086-18b2-419a-ae78-f07f8c3396f7
SpexyCoin/SpexyCoin
src/common/CheckDifficulty.cpp
//////////////////////////// #include "CheckDifficulty.h" //////////////////////////// #include <common/int-util.h> #include <crypto/hash.h> namespace CryptoNote { #if defined(__SIZEOF_INT128__) static inline void mul(uint64_t a, uint64_t b, uint64_t &low, uint64_t &high) { typedef unsigned __int128 ...
ALGO
0.987375
6.4691
14727e14-82ab-4b90-8409-b1bf303a1cb7
ishandutta2007/codeforces
w0nsh/normal/1118/D1.cpp
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0; i < (n); ++i) #define REP(i, a, b) for(int i = (a); i < (b); ++i) #define TRAV(i, n) for(auto &i : n) #define SZ(x) (int)(x).size() #define PR std::pair #define MP std::make_pair #define X first #define Y second typedef long long ll; typedef std::pair<int, int> ...
ALGO
0.999996
4.117207
b716d9c5-14e6-4cc9-a78b-3b6cfb2f1d62
ishandutta2007/codeforces
peti1234/normal/1325/B.cpp
#include <bits/stdc++.h> using namespace std; int w, n, db, t[100002]; int main() { cin >> w; while(w--) { cin >> n, db=0; for (int i=1; i<=n; i++) cin >> t[i]; sort(t+1, t+n+1); for (int i=1; i<=n; i++) db+=(t[i]!=t[i-1]); cout << db << "\n"; } return 0; }
ALGO
0.999793
3.684398
11f5533e-c24b-4ade-86a2-b170e192e0a8
zLyrikz/MaskDesign
src/Alglib/linalg.cpp
#ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #include "stdafx.h" #include "linalg.h" // disable some irrelevant warnings #if (AE_COMPILER==AE_MSVC) && !defined(AE_ALL_WARNINGS) #pragma warning(disable:4100) #pragma warning(disable:4127) #pragma warning(disable:4611) #pragma warning(disable:4702) #pragma warn...
ALGO
0.983846
3.782806
3ada03af-e121-4130-8f05-2786faef1d54
nehakumari2003/DSA-Leetcode
MaxCandies.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int maxCandies(int n, vector<int>& A, int M){ int candiesBought = 0 ; // Sort the candy prices in ascending order to prioritize cheaper candies sort(A.begin() , A.end()); for(int i = 0 ; i < n ; i++){ if(A[i]%5 =...
ALGO
0.99988
5.212137
d3738ea4-64ee-4ec3-84d2-157bd37ded61
Mais-A-A/ProblemSolving
code10.cpp
//Mais Arafeh #include <bits/stdc++.h> #define int long long #define endl "\n" using namespace std; void solve(){ int n,heads=1,cnt2=0,lvl=1; cin>>n; int a[n]; cin>>a[0]; for(int i=1;i<n;i++){ // 1 5 4 3 2 cin>>a[i]; if(a[i]>a[i-1]){ cnt2++; } el...
ALGO
0.999687
4.274407
90417018-7515-49e6-89d1-7bc1427bb137
madvier83/Flutter_Muhammad-Advie-Rifaldy
Minggu 5/weekly1/Project/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.998064
6.761023
ed6fe97a-f753-4829-820c-d91ad6623285
VerySadJoy/BOJ
BOJ/Questions/Q16236.cpp
//Question No: 16236 //Title: 아기 상어 //Tier: Gold III #include <iostream> #include <queue> #include <vector> #include <algorithm> #include <cstring> using namespace std; int N; int board[20][20]; int visited[20][20]; int shark_size = 2; int eat_cnt = 0; int ans = 0; int dx[] = {-1, 0, 0, 1}; int dy[] = {0, -1, 1, 0};...
ALGO
0.999907
4.705373
318a33bb-7c1b-4997-8447-0c609aa71bef
ishandutta2007/codeforces
thebes/normal/892/B.cpp
#include <bits/stdc++.h> using namespace std; stack<int> s; int N, i, x; int main(){ for(scanf("%d",&N);i<N;i++){ scanf("%d",&x); while(s.size()&&s.top()>=i-x) s.pop(); s.push(i); } printf("%d\n",(signed)s.size()); return 0; }
ALGO
0.99983
3.090413
e0297627-2dbc-4690-8489-31acf0936895
Codewire-github/nepali-lens-ui
nepali_lens/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.999038
6.771107
d425f3e6-1238-41e6-90f3-c16e3ceacdbd
ishandutta2007/codeforces
realcomplex/normal/1303/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fi first #define se second #define mp make_pair #define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) void solve(){ ll n, g, b; cin >> n >> g >> b; ll l = 0, r = (ll)3e18; ll md; ll good; ...
ALGO
0.999821
3.861096
9ff448b1-15c3-42e2-868e-e2f5396ff5f3
TeamVault/LLVM-CFI
source_code/lib/CodeGen/StackSlotColoring.cpp
#include "llvm/CodeGen/Passes.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/LiveStackAnalysis.h" #include "llvm/CodeGen/MachineBlockFrequencyInfo.h" #include "llvm/CodeGen/MachineFrameInfo.h" #in...
ALGO
0.947099
7.814965
d1f3b00c-6e6c-467d-8f00-00689469e353
deepuyadav004/DataStructure
practice/string/min_no_of_operation_to_move_all_balls.cpp
Leetcode 1769. Minimum Number of Operations to Move All Balls to Each Box You have n boxes. You are given a binary string boxes of length n, where boxes[i] is '0' if the ith box is empty, and '1' if it contains one ball. In one operation, you can move one ball from a box to an adjacent box. Box i is adjacent to box ...
ALGO
0.999998
6.587455
91515be0-ff47-4b32-a557-049cec03189e
HarshDex/All-Programs
c++/oops_in_c++/STL(standard_Text_Library)/Maps/printThefrequencyofString.cpp
#include <bits/stdc++.h> using namespace std; void printData(map<string,int> &m){ for(auto &it : m){ cout<<(it).first<<" "<<(it).second<<endl; }cout<<endl; } int main() { map<string,int> m; int n; cout<<"enter the number of strings : ";cin>>n; for(int i = 0;i<n;i++){ string s; ...
ALGO
0.999893
4.703819
93ffdf84-8379-4397-8d01-ae60f9a5ff6a
Sunsun24/MRS
libraries/AC_PID/AC_PID_Basic.cpp
/// @file AC_PID_Basic.cpp /// @brief Generic PID algorithm #include <AP_Math/AP_Math.h> #include <AP_InternalError/AP_InternalError.h> #include "AC_PID_Basic.h" #define AC_PID_Basic_FILT_E_HZ_MIN 0.01f // minimum input filter frequency #define AC_PID_Basic_FILT_D_HZ_MIN 0.005f // minimum input filter freq...
ALGO
0.999225
5.79444
98e6c6e9-3073-4c63-8f9d-311423d6be9b
BubagraJamatia2001/Coding-Ninjas-Data-Structures-Algo-with-Cpp
BST/Replace with Sum of greater nodes.cpp
/* Replace with Sum of greater nodes Given a binary search tree, replace each nodes' data with the sum of all nodes' which are greater or equal than it. You need to include the current node's data also. That is, if in given BST there is a node with data 5, you need to replace it with sum of its data (i.e. 5) and all n...
ALGO
0.999974
5.061667
52755e4f-0667-41d4-9a9b-8fd10acfe7c4
IBM/CMMPPT
gsa/wit/COIN/Examples/MaxCut/CG/MC_trianglegen.cpp
//############################################################################# static inline void MC_get_triplet(const double* x, const int i, const int j, const int k, int * mcol, double * xcol) { if (i < j) { if (j < k) { // i < j < k xcol[0] = x[mcol[0] = MC_edge_index(i, j)]; xcol[...
ALGO
0.999051
3.849435
cf7cf463-969c-40e7-b8e3-44aacc41ea71
shahakash28/mPSI-TableOPPRF
thirdparty/linux/miracl/miracl_osmt/source/ecn6.cpp
/* * MIRACL C++ Implementation file ecn6.cpp * * AUTHOR : M. Scott * * PURPOSE : Implementation of class ECn6 (Elliptic curves over n^6) * * WARNING: This class has been cobbled together for a specific use with * the MIRACL library. It is not complete, and may not work in other * applications *...
ALGO
0.995886
5.07141
833627f7-0583-40ea-a512-0c700abf60c1
Monil-007/LeetCode_Solutions
0516-longest-palindromic-subsequence/0516-longest-palindromic-subsequence.cpp
class Solution { public: int longestPalindromeSubseq(string s1) { string s2=s1; int n=s2.length(); reverse(s2.begin(),s2.end()); vector<vector<int>> dp(n+1,vector<int> (n+1,0)); for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(s1[i-1]==s2[j-1]){dp[...
ALGO
0.999927
6.045063
8afa7db8-c140-42c8-97ab-43988f69eb6b
seojh5939/nbCamp_preAssignment
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.998764
6.762122
4eeba585-08ce-4e92-bb8d-d22f22c3b3af
Wisno33/KattisSolutions
CPP/magictrick.cpp
//Magic Trick https://open.kattis.com/problems/magictrick #include <bits/stdc++.h> #include <unordered_set> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); unordered_set<char> letters; string str; cin >> str; for(char c: str) { if(letters.find(c) == le...
ALGO
0.999868
4.17743
9208a7d9-0fc2-4fb2-92fd-d2cffe075049
coder770/Notes
2.Recursion/1.by_striever/17_lec17.cpp
// qn--> palindrome partitionin "aabb"--> {a,a,b,b} {a,a,bb} {aa,b,b} {aa,bb} bool isPalindrome(string s,int st,int en){ while(st<en){ if(s[st++]!=s[en--]) return false; } return true; } void func(int index,string s,vector<string> &pat...
ALGO
0.999925
5.725069
9db5573f-69b7-44c4-98d0-6f9c1c8c5ed9
GJ-Lin/SJTUOJ
4218.cpp
#include <iostream> #include <cstdio> using namespace std; const int MAXNUM = 5000005; int n, d; int arr[MAXNUM]; struct beds { int pos, noise; }queue[MAXNUM]; inline int read() { int X = 0, w = 0; char ch = 0; while (ch < '0' || ch > '9') ch = getchar(); while (ch >= '0' && ch <= '9') X = ...
ALGO
0.999678
3.053896
0cbd5e1b-f174-488b-b107-053973719139
Shiva16-hub/C-Programs
Sort.cpp/quickSort.cpp
// quick sort by divide and conqure------------- #include<iostream> using namespace std; void swap(int arr[], int i,int j){ int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } int partition(int arr[], int l, int r){ int pivot = arr[r]; int i = l-1; for(int j=l;j<r;j++){ if(arr[j]...
ALGO
0.999989
4.857471
793641f6-eaa5-4ee3-9a4e-e2f8cca6a26b
gremlin-z/dailyexercise
扫雷/扫雷/扫雷/game.cpp
#define _CRT_SECURE_NO_WARNINGS #include "game.h" void clear_board(char board[ROWS][COLS], int row, int col,char n) { int i = 0; for (i = 0; i < row; i++) { int j = 0; for (j = 0; j < col; j++) { if (board[i][j] == 0) { board[i][j] = n; } } } } void print_board(char board[ROWS][COLS], int row, int...
ALGO
0.963883
3.375395
3e58942f-700e-4c15-b8a6-71ac18c68829
mohit701473/cpp
Interviewbit/Programming/Level 4 Linked List , Stack and Queue/Linked List Questions/List 2 Pointer/Que1_palindromeList.cpp
https://www.interviewbit.com/problems/palindrome-list/ //------------------------------------------------------------ Solution ---------------------------------------------------------------------- // Approch - 1 // T.C. = O(N) // S.C. = O(1) ListNode* getMidNode(ListNode* head){ ListNode* slow = head ; ...
ALGO
0.999749
5.697919
377d168c-bf47-4a0a-b4fb-a52dffcdbcbc
mike10004/cs-bridge-2020-hw4
q3/main.cpp
// <EMAIL> // Tandon CS Bridge Winter 2020 // Week 4 // Question 3 // Program that converts decimal to binary // Note: behavior for negative integer inputs is undefined #include <iostream> using namespace std; int main() { int decimal; cout << "Enter decimal number:\n"; cin >> decimal; // Find the g...
ALGO
0.99902
7.132125
0158cc46-6b35-4358-a561-f076302027af
ShaynaCodes/MyGameMod
idlib/math/FFT.cpp
#include "../precompiled.h" #pragma hdrstop typedef struct { double re; double im; } cpxDouble_t; /* =================== "A New Principle for Fast Fourier Transformation", Charles M. Rader and N.M. Brenner, I.E.E.E. Transactions on Acoustics "Programs for Digital Signal Processing", published by I.E.E.E. Pres...
ALGO
0.999582
5.139781
f84a297a-d7df-4fff-9ec6-f95e291db93a
wztzjhn/FastKPM
src/engine.cpp
#include "fastkpm.h" #include <cassert> namespace fkpm { template <typename T> T random_phase(RNG& rng); // Random number from {+1, -1} template <> double random_phase(RNG& rng) { std::uniform_int_distribution<int> dist2(0,1); return 2*dist2(rng)-1; } template <> floa...
TOOL
0.913551
6.049298
6fd1c841-0ace-4628-bd3e-39d83400aad0
khanreaz/resketch
lib/eigen/doc/examples/matrixfree_cg.cpp
#include <iostream> #include <Eigen/Core> #include <Eigen/Dense> #include <Eigen/IterativeLinearSolvers> #include <unsupported/Eigen/IterativeSolvers> class MatrixReplacement; using Eigen::SparseMatrix; namespace Eigen { namespace internal { // MatrixReplacement looks-like a SparseMatrix, so let's inherits its trai...
ALGO
0.997497
6.112806
ede0391d-3558-46b0-918b-fbecc588519f
tenyoung795/bu2016-cs320-project1
predictors.cpp
#include "predictors.h" bool always_taken::predict(pc_t, bool taken) { return taken; } bool always_not_taken::predict(pc_t, bool taken) { return !taken; } tournament::tournament(): selector_table(all_ones) { } bool tournament::predict(pc_t pc, bool taken) { auto counter = selector_table[pc]; auto which_predict...
ALGO
0.937307
6.723783
203046fb-87a9-4b72-9815-ed2d52860f2e
Jeshika311/DSA-CPP
arrays_and_vectors/product_of_array_except_self.cpp
#include <iostream> #include <vector> using namespace std; vector<int> productExceptSelf(vector<int> &nums) { int n = nums.size(); vector<int> ans(n, 1); for (int i = 1; i < n; i++) { ans[i] = ans[i - 1] * nums[i - 1]; } int suffix = 1; for (int i = n - 2; i >= 0; i--) { ...
ALGO
0.999959
4.86261
14bef0e0-05b4-4b71-8355-8b65082e9fcd
alee-shaan/Tasmota-development
lib/libesp32_audio/mp3_shine_esp32/src/l3subband.cpp
/* L3SubBand */ #include "types.h" #include "tables.h" #include "l3subband.h" /* * shine_subband_initialise: * ---------------------- * Calculates the analysis filterbank coefficients and rounds to the * 9th decimal place accuracy of the filterbank tables in the ISO * document. The coefficients are stored in #f...
ALGO
0.99834
5.182623
93cace30-1692-4b28-8315-219514227205
ironwaste/acm
hduoj/4-11/1008.cpp
// 看什么看,以为我厉害吗? // 我只是戾气很重,不厉害只需要114514分钟就能变厉害了 // 而你我的朋友只需要2.5年就可以了 #include<bits/stdc++.h> #include<climits> #define all(x) x.begin(),x.end() #define pb(x) push_back(x) #define i64 long long #define fi first #define se second #define endl '\n' #define mod3 998244353 #define mod7 1000000007 #define de(x) cerr << #x ...
ALGO
0.999765
4.198679
edb55ff4-9a96-423c-911a-76a7451058e1
TeamCarbonXtremeARMv6/frameworks_av
media/libstagefright/codecs/m4v_h263/dec/src/mb_motion_comp.cpp
/* ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Inputs: video = pointer to structure of type VideoDecData Local Stores/Buffers/Pointers Needed: roundtab16 = rounding table Global Stores/Buffers/Pointers Needed: None Outputs: None ...
ALGO
0.999536
6.995242
9cbd982f-e3ca-4cdd-92d4-a25d2e23462e
HarshGupta02/Data-Structure-And-Algorithm
Graph/Anonymous Informant.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) static const int MOD = (int)1e9+7; void solve(){ int n, k; cin >> n >> k; vector<int> a(n); for(int i = 0; i < n; i ++) cin >> a[i]; k = min(k, n...
ALGO
0.999984
4.297357
7876a559-30d2-4c7f-863d-cfaa9e942f93
braugord/adventofcode_2020
Dec15.cpp
#include "Advent_of_code.h" #include <fstream> #include <sstream> #include <string> #include <vector> #include <unordered_map> #include <iostream> void Dec15::Puzzle() { std::string line = ""; std::ifstream file("Dec15_PuzzleInput.txt"); std::vector<int> input; std::unordered_map<int, std::vector<int>> output; ...
ALGO
0.998628
5.074466
c0ba4782-505e-40d6-b7c2-078c1afff733
pawan-nirpal-031/Algorithms-And-ProblemSolving
Active/CodeForces/A_Average_Height.cpp
// Problem Link : #include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef long double ld; #define Mod 1000000007 #define Infinity (ll)1e18 #define Append(a) push_back(a) #define Pair(a,b) make_pair(a,b) #define Clear(a) for(ll &x : a){x=0;} #define Point(x) s...
ALGO
0.999779
5.2754
b2a36cdc-56df-4d2d-9d8c-85c68da92c8f
martiros13an/test2
homee.cpp
#include <iostream> int main() { unsigned int n; std::cin >> n; int maxNum; int sum =0; std::cin >> maxNum; for(int i = 0; n-1 > i ; ++i) { int num; std::cin >> num; if(maxNum > num ) maxNum = num; if (num == maxNum) { sum++; ...
ALGO
0.999731
3.91726
3b8882d9-f2b5-4e05-90d8-4dd137f6bb36
nibtehaz/UVA
1210.cpp
/* بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ */ /* رَّبِّ زِدْنِى عِلْمًا */ #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <ctype.h> #include <algorithm> #include <vector> #include <queue> #include <iostream> #include <string> using namespace std; #define OUTPUT freopen("myfile.txt...
ALGO
0.999432
3.713814
30a15bbd-617a-4285-bfa8-b313dd705769
soybean33/BAEKJOON
2293 동전 1.cpp
#include <iostream> #include <vector> int N, K; // N: 동전의 종류의 개수, K: 가치의 합 std::vector<int> coins; // coins[i]: 동전의 종류 int answer; // answer: 경우의 수 void Solution(){ std::vector<int> dp; // dp[i]: i 가치를 만드는 경우의 수 dp.assign(K+1, 0); dp[0] = 1; // 아무것도 선택하지 않는 것도 한 가지 경우 for(int i=0; i<N; ++i){ // N개의 동전의 종류에 대하...
ALGO
0.999861
4.495439
2d229657-27f2-4437-9129-95e469892002
Tencent/TSeer
api/cplus/src/lb_static_weight.cpp
#include "lb_static_weight.h" #include <arpa/inet.h> #include <set> #include <ctime> #include <iostream> #include <sstream> #include "global.h" using Tseer::RouterNodeInfo; using std::ostringstream; namespace Tseerapi { LBStaticWeight::LBStaticWeight() : _lastIndex(0) {} LBStaticWeight::~LBStaticWeight() {} int L...
TOOL
0.998103
4.419824