uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
bc4b0c94-f096-4d50-a24f-6f75fc8724e3
ishandutta2007/codeforces
andr1y/normal/1461/C.cpp
// -- // #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const ll N = 1e5+228; ll a[N]; signed main(){ cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0); ll q; cin >> q; cout<<fixed<<setprecision(10); while(q--){ ll n, m; cin >> n >> m; ...
ALGO
0.999968
3.584109
e1f30dbf-7134-4ed0-973c-e270c49fc8e5
MarcusCSPereira/Faculdade_AP1
Laboratorio_11_02_uesb/ex003.cpp
#include <iostream> using namespace std; void imprime(int x); int main(){ int n; cout << "Digite o valor de n: "; cin >> n; imprime(n); return 0; } void imprime(int x){ cout << x << " "; if(x != 0){ imprime(x-1); } }
ALGO
0.999345
4.205324
f4d2855b-cb99-4fd2-9d70-0fbc8c13e58f
Pure-Hammerhead/frameworks_av
media/libstagefright/codecs/amrnb/enc/src/inter_36.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/inter_36.c Date: 01/31/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: 1. Eliminated unused include files. ...
ALGO
0.999472
5.616278
2eb98759-05cc-4240-92a7-fa4df98fc304
JaiBhalla03/dsa
queryTIme.cpp
class Solution { public: int busyStudent(vector<int>& startTime, vector<int>& endTime, int queryTime) { int count = 0; for(int i = 0 ; i <startTime.size() ; i++){ if(queryTime >= startTime[i] && queryTime <= endTime[i]){ count ++; } } return co...
ALGO
0.999918
5.828782
7c224bbc-2203-4f57-b6b2-b221a1d91020
december3th/Cpp
bai3.cpp
#include<bits/stdc++.h> using namespace std ; struct data{ int vl ; int solan ; }; bool cmp(data a , data b){ if(a.solan==b.solan) return a.vl < b.vl ; else return a.solan > b.solan ; } int main(){ int t ; cin >> t ; while(t--){ int n , m ; cin >> n >> m ; vector<data> a ; int x ; for(int i = 0...
ALGO
0.999954
4.160942
8ac70d95-1d52-4399-93b3-2348164755c6
samfubuki/striver-cp-problems
Dynamic Programming/knapsack1atcoderD.cpp
#include<bits/stdc++.h> using namespace std; long long int knapSack(long long int W, long long int wt[], long long int val[], long long int n) { long long int t[n+1][W+1]; memset(t,-1,sizeof(t)); for(long long int i=0;i<n+1;i++) { for(long long int j=0;j<W+1;j++) { ...
ALGO
0.999998
4.432453
ac186a6b-baaa-4da7-9fc6-40be6d6d4589
6611111/codes
2894. Divisible and Non-divisible Sums Difference.cpp
class Solution { public: int differenceOfSums(int n, int m) { int res=0; for(int i=1;i<=n;++i) { if(i%m==0) { res-=i; } else { res+=i; } } return res; } };
ALGO
0.999955
5.331343
9fb06428-a120-4b24-8456-fb0c085a84c6
janehub/Algorithm
programmers/level2/최솟값만들기/solution.cpp
#include <iostream> #include<vector> #include <algorithm> using namespace std; int solution(vector<int> A, vector<int> B) { int answer = 0; int sum=0; sort(A.begin(),A.end()); sort(B.begin(),B.end(),greater<>()); for(int i=0;i<A.size();i++) { sum+=A[i]*B[i]; } ans...
ALGO
0.999951
4.340645
cf8d95c1-c9a9-4c4d-8d4e-8a8199a2c937
delta4d/AlgoSolution
zoj/10/1954.cpp
#include <cstdio> using namespace std; const int MAXN = 100001; struct node { int x; int y; node(int x=0, int y=0):x(x), y(y) {} void Print() { printf("%d %d\n", x, y); } }f[MAXN]; void gen() { int i; int depth; int x; int y; for (i=2; i<MAXN; ++i) { x = f[i-1].x; y = f[i-1].y; if (x >= 0 && y == ...
ALGO
0.999808
3.325299
540e0225-df90-41cf-a02a-f712b9fd49de
werner-yin/code-public-2
Atcoder/ABC253/C.cpp
#include <bits/stdc++.h> #define eb emplace_back #define ep emplace #define fi first #define se second #define in read<int>() #define lin read<ll>() #define rep(i, x, y) for(int i = (x); i <= (y); i++) #define per(i, x, y) for(int i = (x); i >= (y); i--) using namespace std; using ll = long long; using db = double; ...
ALGO
0.999192
4.385108
93e5ae97-97a4-4985-a458-76b6169c2696
emmabarbier/cppcourse-brunnel
network.cpp
#include "network.hpp" #include <cmath> #include <random> #include <fstream> using namespace std; //====================================================================== //Constructor //====================================================================== Network::Network(int time_start, int time_end, double I) : ...
ALGO
0.967055
3.943576
8052ff91-4dd5-4cee-8041-da61dcd2a5e3
seunghwan6960/autolanding
aruco_ros/aruco_ros/src/aruco_ros_utils.cpp
#include <aruco_ros/aruco_ros_utils.h> #include <ros/console.h> #include <ros/assert.h> #include <iostream> #include <tf/transform_datatypes.h> #include <opencv2/calib3d.hpp> #include <cv_bridge/cv_bridge.h> aruco::CameraParameters aruco_ros::rosCameraInfo2ArucoCamParams(const sensor_msgs::CameraInfo& cam_info, ...
TOOL
0.852842
6.630404
4dda9795-d1ea-403a-92ef-0a3dd734844b
lyuwenyu/caffe_custom
caffe/src/caffe/layers/permute_layer.cpp
#include <vector> #include "caffe/layers/permute_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void Permute(const int count, Dtype* bottom_data, const bool forward, const int* permute_order, const int* old_steps, const int* new_steps, const int num_axes, Dtyp...
ALGO
0.858979
7.923692
e5323eac-8f95-4616-8379-f3c3a313fb3c
Sudhanshu2306/Leetcode
2532-remove-letter-to-equalize-frequency/remove-letter-to-equalize-frequency.cpp
class Solution { public: bool equalFrequency(string word) { vector<int> arr(26,0); for(int i=0;i<word.size();i++){ arr[word[i]-'a']++; } sort(arr.begin(),arr.end()); int i=0; while(i<26 && arr[i]==0){ i++; } if(i==25 || (arr[i...
ALGO
0.999934
5.647579
a59f9dfe-9642-41ad-ae00-d732eb7a78d8
25Aditya25/Gpgpusim3.2
src/intersim2/allocators/islip.cpp
// $Id: islip.cpp 5188 2012-08-30 00:31:31Z dub $ #include "booksim.hpp" #include <iostream> #include "islip.hpp" #include "random_utils.hpp" //#define DEBUG_ISLIP iSLIP_Sparse::iSLIP_Sparse( Module *parent, const string& name, int inputs, int outputs, int iters ) : SparseAllocator( parent, name, inputs, o...
ALGO
0.912264
4.78351
470c0638-c0fe-44ad-9d64-7f63374f5172
asdf77616385/ceph-12.2.1
src/boost/libs/compute/perf/perf_bolt_sort.cpp
#include <algorithm> #include <cstdlib> #include <vector> #include <bolt/cl/sort.h> #include <bolt/cl/copy.h> #include <bolt/cl/device_vector.h> #include "perf.hpp" int main(int argc, char *argv[]) { perf_parse_args(argc, argv); std::cout << "size: " << PERF_N << std::endl; ::cl::Device device = bolt::...
ALGO
0.991255
5.063756
60aeea54-d282-47d2-a9ca-b62b1f8131cc
FryeLun/algorithm-journey
Algorithm/Recursion/Class38/Code01_Subsequences.cpp
// 字符串的全部子序列 // 子序列本身是可以有重复的,只是这个题目要求去重 // 测试链接 : https://www.nowcoder.com/practice/92e6247998294f2c933906fdedbc6e6a #include <bits/stdc++.h> using namespace std; class Solution { public: vector<string> generatePermutation(string s) { vector<string> ans; unordered_set<string> set; string p...
ALGO
0.999959
5.33361
9377b0fd-fddb-4f01-af12-9568dc25caba
chywangbupt/gtsam
gtsam_unstable/nonlinear/ConcurrentIncrementalSmoother.cpp
/** * @file ConcurrentIncrementalSmoother.cpp * @brief An iSAM2-based Smoother that implements the * Concurrent Filtering and Smoothing interface. * @author Stephen Williams */ #include <gtsam_unstable/nonlinear/ConcurrentIncrementalSmoother.h> #include <gtsam/nonlinear/LinearContainerFactor.h> #in...
ALGO
0.97692
7.664679
7ae3698a-3fa6-4fe6-afaa-762e6bf82446
Kawser-nerd/CLCDSA
Source Codes/AtCoder/abc020/B/4622763.cpp
// Last Change: 03/18/2019 18:46:12. #include <algorithm> #include <array> #include <bitset> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <queue> #include <set> #include <stack> #include <string> #include <vect...
ALGO
0.999748
4.580727
fea35c75-e912-4f0e-8ed8-3aff92f540ed
raincross7/code-similarity
codes/train_code/problem384/problem384_112.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<int, int>; const int INF = 1001001001; const ll LINF = 1001001001001001; const int MOD = 1000000007; template <typename T> void print(const T &v); int main() { int n, k; stri...
ALGO
0.999987
4.073769
6239a7ff-a154-4449-9699-a45cb9fb395e
AtomFirst/MyDataStructureHomework
practicum/p3.cpp
#include<iostream> #include<fstream> #include<string> #include<vector> #include<queue> #include<map> #include<algorithm> using namespace std; struct Date{ Date(): year(9999),month(9999),day(9999) {} auto operator<=>(const Date&) const=default; string get_string() const{ if(*this==Dat...
TOOL
0.953105
3.754172
08f95f8d-65af-4f9c-a557-0346fbf712aa
Yash-Thakare22/DSA_Uplift_Project
Assignments/Solutions/Sananda Dey/Assignment-5/Question_2.cpp
#include <iostream> using namespace std; int main() { int n,k; cin>>n>>k; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n-1;i++){ for(int j=0;j<n-1;j++){ if(a[j]>a[j+1]){ swap(a[j],a[j+1]); } } }cout<<a[k-1]; return 0; }
ALGO
0.999906
3.044093
098b58aa-21b0-4517-a614-f9e26a33632b
LevinJ/Pedestrian-Detection-Project
libs/CImg/examples/use_nlmeans.cpp
#define cimg_plugin "plugins/nlmeans.h" #include "CImg.h" using namespace cimg_library; // The lines below are necessary when using a non-standard compiler as visualcpp6. #ifdef cimg_use_visualcpp6 #define std #endif #ifdef min #undef min #undef max #endif #ifndef cimg_imagepath #define cimg_imagepath "img/" #endif ...
ALGO
0.999516
5.494767
999225ef-ab9c-4eef-a554-59712c6f321f
gautamsharma22/leetcode-manual
1372. Longest ZigZag Path in a Binary Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999986
5.622113
83b44ce1-2a09-422e-9bf5-c36a299280bd
lclpsoz/competitive-programming
CF/913/E.cpp
#include "bits/stdc++.h" using namespace std; ////////////// Prewritten code follows. Look down for solution. //////////////// #define x first #define y second #define len(x) ((int)(x).size()) using pii = pair<int, int>; using ll = long long; using llu = long long unsigned; using ld = long double; const ld EPS = 1e-9...
ALGO
0.999689
3.762541
c7e6eccd-5638-41e4-8e1a-d71002d554ea
yiliuhub/Zernike
WaveView6/MathLib/Gaussian.cpp
/********************************************************************** * File: Gaussian.c * * Yi Liu 01/10/02 **********************************************************************/ #include <math.h> #include "Geometry.h" #include "geoerror.h" double gaussian(double amp, double ctr, double dev, double x) { do...
ALGO
0.999958
5.425111
bf29a380-ae13-481c-99c0-60a305afa562
hyuntall/backjoon-cpp
12865.cpp
#include<iostream> #include<algorithm> using namespace std; int main() { int n, k, w[101], v[100001], dp[101][100001]; cin >> n >> k; for (int i = 1; i <= n; i++) cin >> w[i] >> v[i]; for (int i = 1; i <= n; i++) { for (int j = 1; j <= k; j++) { if (j >= w[i]) dp[i][j] = max(dp[i-1][j], dp[i-1][j-w[i...
ALGO
0.999996
3.696387
40484217-291d-4804-8c1c-edab4aa90810
YijuGuo/Prectise-for-C
剑指offer/03链表/34.链表中环的入口结点.cpp
/* 给定一个链表,若其中包含环,则输出环的入口节点。 若其中不包含环,则输出null。 给定如上所示的链表: [1, 2, 3, 4, 5, 6] 2 注意,这里的2表示编号是2的节点,节点编号从0开始。 所以编号是2的节点就是val等于3的节点。 则输出环的入口节点3. */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution {...
ALGO
0.999967
5.446583
8180e330-d404-4fd1-bee5-1b03f00515db
habib302/LeetCode-Solution
DP/LCS+Palindrome/712. Minimum ASCII Delete Sum for Two Strings Memoization.cpp
class Solution { public: //memoization int dp[1002][1002]; int minimumDeleteSum(string s1, string s2) { memset(dp,-1,sizeof dp); return helper(0,0,s1,s2); } int helper(int i,int j,string& s1, string& s2){ if(dp[i][j] != -1) return dp[i][j]; //base case 1...
ALGO
0.999998
6.191361
0ee39954-d820-4f55-9137-4b2760a77e33
ayush-gupta2002/Datastructures-and-Algorithms
starting-node-of-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* floydDetection(ListNode *head){ if(head == NULL){ return NULL; } ListNode* slow =...
ALGO
0.99995
5.437142
ae5906d0-e40d-4634-a8d6-e99265c4c521
ja754969/Cplusplus-Programming
上課檔案/課本範例檔/chapter 16/範例1.cpp
#include <iostream> #include <cstdlib> using namespace std ; class matrix { public: int row,column; int **element ; matrix(int m,int n) { row=m ; column=n ; //ʺAtmmxnG}CelementO element = new int *[m]; int i; for (i=0 ; i<m ; i++) el...
ALGO
0.974584
3.285945
c44f9c79-ed6a-483d-87a0-7397296b60c1
leonardoAnjos16/Competitive-Programming
Other/fence_painting.cpp
#include <bits/stdc++.h> using namespace std; #define llong long long int const int INF = 1e9 + 5; tuple<int, int, int> operator +(tuple<int, int, int> a, tuple<int, int, int> b) { auto [abest, amn, amx] = a; auto [bbest, bmn, bmx] = b; int best = max({ abest, bbest, bmx - amn }); return make_tuple...
ALGO
0.999973
4.676221
5e8fbb1f-34fc-4ad6-a326-d3e2c1070ad6
f4alt/TAMU-Classes
CSCE430/prob_set_11/C.cpp
#include <bits/stdc++.h> using namespace std; struct node { int value = -1; // int deg = 0; vector<pair<float, float> > adj; // vector<int> weight; }; // vector<node> v; vector<pair<float, float> > gophers, holes; // vector<vector<int>> adj; vector<bool> visited(200, false); int pythag(pair<float, float> a,...
ALGO
0.998963
4.324886
7872ef89-4b6f-481a-ab79-e513754ddf22
blazhkevych/27062020
27062020.cpp
#include <iostream> using namespace std; class Node { int val; public: Node* next; Node(int v) :val(v) { next = nullptr; } int GetValue() const { return val; } void SetValue(int v) { val = v; } }; class FList { Node* head; Node* tail; Node* PrevNode(Node*); Node* AddressNode(int p); public: FList() :head(0)...
ALGO
0.998862
4.157904
aa6a5414-adba-46e6-93ae-4793c2f1e2c6
Bob8percent/Programming-Abstractions-in-C-
10/MergeSort.cpp
#define _USE_MATH_DEFINES #include <iostream> #include <cctype> #include <iomanip> #include <sstream> #include <fstream> #include <cmath> #include <string> #include <SFML/Graphics.hpp> #include "TokenScanner.h" #include "Library/queue.h" #include "Library/map.h" #include "Library/set.h" // mergeSort()の再起呼び出しはO(logN),...
ALGO
0.999128
4.446155
8893e386-8bd4-4b7b-ab17-4b788b3a9378
yuxi0724/C_Lab
task2.cpp
#include<vector> using namespace std; template<typename T> class sort { public: void sort_ascending(T x[], int size) { for(int i = 0; i < size; i++) { for (int j = i + 1; j < size; j++) { if (x[i] > x[j]) { T X = x[i]; x[i] = x[j]; x[j] = X; } } } } void so...
ALGO
0.999948
4.327849
a4ab73c9-f161-4097-ad13-d55e8eddc1f8
Md-Minhajul-Islam/Codeforces
B Set/Just_Eat_It.cpp
// Q: #include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef vector<int> vii; typedef vector<ll> vll; typedef long double ld; #define fi first #define se second #define pb push_back #define mp make_pair void solve() { int n; cin >> n; ll a[n]; ll yasser= ...
ALGO
0.999979
4.59595
600bad1c-2d05-4d0a-b23e-7a69a2097a12
zeeldadhaniya1895/programming
c++ programming/APNC+CWH/pattern/pascal_triangle.cpp
#include <iostream> using namespace std; int pascal(int i,int j) { if(j==1||i==j) { return 1; } int a=pascal(i-1,j-1); int b=pascal(i-1,j); return a+b; } int main() { int n=5; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n - i; j++) { co...
ALGO
0.999964
4.061982
ec07f87a-697f-42f3-82e0-2a136b2d95bc
TNishimoto/rlbwt_iterator
src/debug/time_main.cpp
#include <cassert> #include <chrono> //#include "../common/cmdline.h" //#include "../common/print.hpp" //#include "../common/io.h" #include "stool/include/io.hpp" #include "stool/include/cmdline.h" #include "stool/include/debug.hpp" #include "../include/rlbwt_iterator.hpp" #include "../include/bwt.hpp" #include <sdsl...
ALGO
0.968727
5.753575
0066f38c-7e27-45ad-b39d-aa8062ed9725
gcbpay/radar9
src/ripple/core/tests/Config.test.cpp
//------------------------------------------------------------------------------ //============================================================================== #include <BeastConfig.h> #include <ripple/basics/contract.h> #include <ripple/core/LoadFeeTrack.h> #include <ripple/core/Config.h> #include <ripple/core/Con...
TEST
0.865377
7.502991
45cd4717-0351-45b6-9934-b42bdcd134f3
alex-kity/optimization-Registration
3rdpart/gtsam/gtsam/linear/VectorValues.cpp
/** * @file VectorValues.cpp * @brief Implementations for VectorValues * @author Richard Roberts * @author Alex Cunningham */ #include <gtsam/linear/VectorValues.h> #include <boost/bind.hpp> #include <boost/range/combine.hpp> #include <boost/range/numeric.hpp> #include <boost/range/adaptor/transformed.hpp> #incl...
TOOL
0.99027
7.566338
0f3c7abb-fd2f-4952-a910-48e4f13193e5
Vishal-Ansari/LeetCode-Repo
Grinding Geek.cpp
class Solution{ public: int help(int ind, int n,int total, vector<int> &cost, vector<vector<int>> &dp){ if(ind==n) return 0; if(dp[ind][total]!=-1) return dp[ind][total]; if(total < cost[ind]){ return dp[ind][total] = help(ind+1,n, total, cost,dp); } else{ ...
ALGO
0.999394
4.403113
31647ee1-27f7-4ff4-9945-ad6cc7a7c47f
ChuannanTao/SecSMT
mitigations/gem5/src/systemc/tests/systemc/misc/synth/combo/switch4/switch4.cpp
/***************************************************************************** switch4.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /****************************************************************************...
ALGO
0.970221
5.225846
9ce955f0-0696-463e-9fa1-dc91945f65f3
michaelyhuang23/Competitive-Programming-Cpp
KattisPolygonarea.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <queue> #include <deque> #include <iterator> #include <list> #include <stack> #include <map> #include <set> #include <functional> #include <numeric> #include <utility> #include <time.h> #include <stdio.h> #include <...
ALGO
0.999928
3.486374
f5b531e0-9eaf-403a-a381-5ab109649b4f
jonhue/algorithms-lab
07/shopping-trip/main.cpp
#include <bits/stdc++.h> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/push_relabel_max_flow.hpp> typedef boost::adjacency_list_traits<boost::vecS, boost::vecS, boost::directedS> traits; typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property...
ALGO
0.999873
5.177631
b2cab374-84cb-4d89-a034-62c2dcc58ce6
Masters-Akt/CS_codes
leetcode_sol/67-Add_Binary.cpp
class Solution { public: string addBinary(string a, string b) { string ans=""; int iterator_a=a.size()-1, iterator_b=b.size()-1, carry = 0; while(iterator_a>=0 && iterator_b>=0){ if(a[iterator_a]=='0' && b[iterator_b]=='0'){ if(carry==0) ans+="0"; ...
ALGO
0.999984
6.390613
5f82230a-0747-4f18-8642-bc654068e391
KylusheL/CppPractice
Daily PS/BOJ/부분합(1806, G4).cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n, target; cin >> n >> target; vector<int> data; for (int i = 0; i < n; i++) { int x; cin >> x; data.push_back(x); } int ...
ALGO
0.999979
4.562993
ad0509b8-de70-4f29-a706-4cc378792b6b
WindBlowAssCold/ollvm
libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // UNSUPPORTED: libcpp-has-no-incomplete-ranges // <algorithm> // template<random_access_iterator I, sentinel_for<I> S, class Comp = ranges::less, // class Proj = identity> // requires sortable<I, Comp, Proj> // constexpr I // ranges::pop_heap(I first, S last...
TEST
0.996496
7.396097
17067155-57f8-4ae0-9570-4080f7299dd3
allicen/Labs_C_plus_plus
lab4/programm/Line.cpp
#include <iostream> #include <cmath> #include <limits> #include "Line.hpp" using namespace std; Line::Line() { Point a; Point b; a.SetX(0); a.SetY(0); b.SetX(0); b.SetY(0); a_ = a; b_ = b; } Line::Line(Point a, Point b) { a_ = a; b_ = b; } Line::Line(Point a) { Poin...
ALGO
0.92425
3.940057
379cfb72-afde-4fc3-8c1d-5b8f6d1b75ba
ORGelling/ConsoleApplicationPlayingAround
class-structure.cpp
//Trying to wrap all of this in classes now. WIP. /* struct Card { string rank; string suit; int points; // Points for blackjack int sort; }; class Deck { private: int numDecks; int totalCards; int deckSize; Card* deck; public: Card* createDeck(int numDecks = 1) { const char* ranks[] = { "2", "3", "4"...
ALGO
0.924403
4.731519
7a20ae75-9a2b-4ff9-89a1-948a7ff734c6
lwDavid/Algorithm_Notebook
Codes/PAT_B1004.cpp
#include <stdio.h> struct Student { char name[11]; char id[11]; short score; } temp, min, max; int main() { int n; if (scanf("%d", &n)) ; min.score = 101; max.score = -1; for (int i = 0; i < n; i++) { if (scanf("%s %s %hd", temp.name, temp.id, &temp.score)) ; ...
ALGO
0.996102
3.463624
7638a4d6-dc45-4962-9792-b5986656176a
Sudhanshu2306/Competitive-coding
C_Dolce_Vita.cpp
#include <bits/stdc++.h> using namespace std; // Commonly used loops #define for0(i, n) for (int i = 0; i < (n); ++i) #define for1(i, n) for (int i = 1; i <= (n); ++i) #define rfor0(i, n) for (int i = (n) - 1; i >= 0; --i) #define rfor1(i, n) for (int i = (n); i >= 1; --i) #define foreach(it, v) for (auto it = v.begin...
ALGO
0.999653
4.792229
b026876e-51c0-48d1-982c-16e4d5ea0e6c
Oks748/kurs4Project
cluster.cpp
#include "cluster.h" #include <math.h> cluster::cluster(){} //-------------------------------------------------------------------------- Bitmap^ cluster::toGrayScale(Bitmap^ bitPict) { Bitmap^ picture = bitPict; for (int y = 0; y < picture->Height; y++) for (int x = 0; x < picture->Width; x++) { Color p = pi...
ALGO
0.997718
3.55863
169ee29e-a4b9-43a7-bb5a-463704014164
Le0ks/CSES
Restaurant Customers/main.cpp
#include <algorithm> #include <iostream> int main() { int n; std::cin >> n; int arrival_time[n], leaving_time[n]; for (int i = 0; i != n; ++i) { std::cin >> arrival_time[i] >> leaving_time[i]; } std::sort(arrival_time, arrival_time + n); std::sort(leaving_time, leaving_time + n); int i = 0, j = 0; ...
ALGO
0.999895
4.774036
b5b440b7-dd7b-4af6-89f3-11d65894cfc8
CrossUCI/PandaCore
src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
/* ScriptData SDName: Boss_Morogrim_Tidewalker SD%Complete: 90 SDComment: Water globules don't explode properly, remove hacks SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "serpent_shrine.h" enum eEnums { // Yell SAY_AGGRO =...
TOOL
0.915341
3.665109
bc8f5175-6161-4dbd-a290-d0e2604b6bc1
qtcyy/OI-practice1
POJ1655/main2.cpp
#include <bits/stdc++.h> using namespace std; const int N = 100005; vector<vector<int>> edge; int n; int siz[N],weight[N]; int minweight; void dfs(int u,int fa){ siz[u]=1;weight[u]=0; for (int& v:edge[u]){ if (v==fa) continue; dfs(v,u); siz[u]+=siz[v]; weight[u]=max(weight[u]...
ALGO
0.999943
4.538604
a2989c92-9717-4b08-96b3-14c493da6b96
Eeman1113/Leetcode
Problems/295.cpp
class Solution { public: int minTotalDistance(vector<vector<int>>& grid) { const int m = grid.size(); const int n = grid[0].size(); vector<int> I; // i indices s.t. grid[i][j] == 1 vector<int> J; // j indices s.t. grid[i][j] == 1 for (int i = 0; i < m; ++i) for (int j = 0; j < n; ++j) ...
ALGO
0.999855
6.521289
e611265f-e239-4347-9cc6-69c4d040989f
holyocto/BD_Coding_study
week2/BOJ_2440.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; for (int i = N; i >= 1; i--) { for (int j = 0; j < i; j++) cout << '*'; cout << '\n'; } return 0; }
ALGO
0.999965
4.064562
0d93b58b-572f-4ca7-9146-98668d65b25c
hiranoo/atcoder
contests/OTHER_CONTESTS/atcoder_library_practice/j2.cpp
#include <bits/stdc++.h> using namespace std; using namespace std; namespace fastio { static constexpr int SZ = 1 << 17; char ibuf[SZ], obuf[SZ]; int pil = 0, pir = 0, por = 0; struct Pre { char num[40000]; constexpr Pre() : num() { for (int i = 0; i < 10000; i++) { int n = i; for (int j = 3; j >...
ALGO
0.999983
4.70504
56737554-094a-4f7d-a968-ef82c500c355
rupav/cp
competitive_coding/Preparations/implementMinStack.cpp
#include<bits/stdc++.h> using namespace std; #define watch(x) cout << (#x) << " is " << (x) << endl #define fr(i,n) for(int i=0; i<n; i++) #define rep(i, st, en) for(int i=st; i<=en; i++) #define repn(i, st, en) for(int i=st; i>=en; i--) #define sq(a) (a) * (a) typedef long long ll; typedef pair<int, int> pii; typedef...
ALGO
0.999824
4.463443
edcbf33f-0515-4c86-8e79-ddab267d50c7
partho-das/CompetitiveProgrmming
CP_CODE/Codeforces/Educational Codeforces Round 80 (Rated for Div. 2/b.cpp
#include <bits/stdc++.h> using namespace std; //____________________________________________________________________________________________________________________________________ #define PI 2*acos(0.0) #define pf printf #define sf scanf #define ff first #define ss second #define mp make_pair #define pb push...
ALGO
0.997972
3.941443
0a755b84-109f-4d09-90a2-d324753a6b33
phuocchubeo123/Codeforces
Contests/ARC/070/ksol.cpp
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pii> vii; typedef vector<vector<int> > vvi; typedef vector<string> vs; typedef complex<double> cd; #define rep(i,l,r) for(int i=l;i<=r;++i) #define per(i,r...
ALGO
0.994602
4.051852
639df230-c449-4e4c-bfe9-403313e771d1
NEONITIN3/DSA-in-Cpp
c_programming/datastructure/HACKEREARTHPROBLRM.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string s,t; cin>>s>>t; map<char,int>m; for(char ch:t) { m[ch]++; } int flag=0; for(int i=0;i<s.length();i++) { if(m.find(s[i])!=m.end()) { flag=1; break; } } if(flag==1) cout<<"YES"<<endl; else cout<<"NO"<<e...
ALGO
0.999898
4.422883
3e1615fd-83c7-4b39-b38d-b9972b91f969
rutura/The-C-20-Masterclass-Source-Code
44.ZoomingOnSTLContainers/44.16PriorityQueue/main.cpp
#include <iostream> #include <queue> class Book{ friend std::ostream& operator<< (std::ostream& out, const Book& operand); public : Book() = default; Book(int year, std::string title) : m_year(year),m_title(title) { } bool operator< (const Book & right_operand)const{ ...
TOOL
0.99135
5.085181
1aee0eb2-cc0e-47f1-ba97-d88f9bdf453c
wuvei/algorithm
Algorithm/cpp/0435.Non-overlappingIntervals/eraseOverlapIntervals.cpp
class Solution { public: int eraseOverlapIntervals(vector<vector<int>>& intervals) { sort(intervals.begin(), intervals.end(), [](vector<int> &a, vector<int> &b) -> bool { return a[1] < b[1]; }); int ans = 0, last = intervals[0][1]; for (int i = 1; i < intervals.size(); i+...
ALGO
0.999963
6.1211
f97f355f-9a73-4a9f-afe9-ee624526f53a
deryabuder/reconstruction
Reconstuction3d/Reconstuction3d/glFuncs.cpp
#include "header.h" using namespace cv; #if !defined(GLUT_WHEEL_UP) # define GLUT_WHEEL_UP 3 # define GLUT_WHEEL_DOWN 4 #endif // void MapTexTri(Mat & texImg, Point2f pt2D[3], Point3d pt3D[3]) { // ˺ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);//ͼƬӳ䵽Ļ glTexParameterf(GL_TEXTURE_2D, GL_TEXT...
TOOL
0.886781
4.2243
bebed15f-1376-4459-bfdd-001cb29d96d3
N-i-h-al/Data-Structure
Lab assignment 2/2.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class node { public: T data; node * nxt; }; template <class T> class SinglyLinkedList { public: node<T> *head; int sz; SinglyLinkedList() { head = NULL; sz = 0; } node<T> * CreateNewNode(T data) { ...
ALGO
0.98324
3.762984
282bed18-42d5-4b27-8127-85f2254f7af2
ainayeem/Phitron_programming_course
5.XPSC/ProblemSolve/03_w2/B_Digits.cpp
#include <bits/stdc++.h> using namespace std; const int N = 5e5 + 5; int main() { int n, b; cin >> n >> b; vector<int> a(N); int i; for (i = 0; n > 0; i++) { a[i] = n % b; n = n / b; } int count = 0; for (int j = i - 1; j >= 0; j--) { // cout << a[j]; ...
ALGO
0.999469
3.50196
ad5ca856-8117-48bb-8162-9f44781b9c56
siedex/OpenMP
Lab 1/Assignment/MatrixMultiplication/Source.cpp
#include "Header.h" #include <ctime> using namespace std; void MatrixMultiplying(int k); void NonZeroElements(); void NumbersInBorders(); void LaunchMatrixRowsCount(int n, int m, bool useOmp); void CountMatrixRows(); void AvgArrayNeighbours(int count); void MultiplicateMatrixVector(); void CriticalSectionComparison(...
ALGO
0.991506
3.640064
f9182850-c820-49bc-8212-cd520c8fd7c4
yibx/module_zy
cuda-build/pcl-points-gpu/icp_accelerated.cpp
#include "icp_accelerated.hpp" ICPAccelerated::ICPAccelerated( const std::vector<Point3d>& source, const std::vector<Point3d>& target, bool use_gpu, int num_threads ) : source_points(source), target_points(target), use_gpu(use_gpu), num_threads(num_threads) { if (use_gpu) { CUDAManager:...
ALGO
0.97745
5.830144
f24abc54-e059-43cc-8244-a50bed535cc1
DavidIlnytskyi/leetCodeGrind
DailyChallange/OutOfBoundaryPaths.cpp
/* https://leetcode.com/problems/out-of-boundary-paths/description/?envType=daily-question&envId=2024-01-26 */ class Solution { public: int findPaths(int m, int n, int N, int x, int y) { const int M = 1000000000 + 7; vector<vector<int>> dp(m, vector<int>(n, 0)); dp[x][y] = 1; int ...
ALGO
0.99999
6.841772
b8edd34d-0767-46ed-b4c8-ba72638eba6c
ragibshahrier/cp
Contests/Beginners Individual Contest - Round 3/E_E.cpp
#include<bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> using namespace std; // #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> // using namespace __gnu_pbds; typedef long long ll; #define vi vector<int> #define v...
ALGO
0.999981
3.609999
58c46219-cbcb-4901-b07b-b00da916afe4
redknotmiaoyuqiao/Eyer3rdpart
opencv-4.5.0/modules/stitching/src/motion_estimators.cpp
#include "precomp.hpp" #include "opencv2/core/core_c.h" #include "opencv2/calib3d/calib3d_c.h" #include "opencv2/core/cvdef.h" using namespace cv; using namespace cv::detail; namespace { struct IncDistance { IncDistance(std::vector<int> &vdists) : dists(&vdists[0]) {} void operator ()(const GraphEdge &edge) ...
ALGO
0.999895
5.227169
6c9c6f0b-26ff-41f5-a542-cdd2ef1324ec
rushikeshk1411/Preparation
ARRAY.cpp/FIND_UNIQUE.cpp
#include <iostream> using namespace std; int findUnique(int *arr, int size){ int unique = 0 ; for(int i=0; i<size; i++){ unique = arr[i] ^ unique; // cout<<unique<<" "; } return unique; } int main(){ int arr[9] = {1,2,3,1,2,3,4,6,6}; int Unique = findUnique(arr,9); cout<<Unique<<endl;...
ALGO
0.999321
4.206445
0d31ea54-fa67-4a75-acd6-ccc0f33a1bae
Doris-UESTC/codeforces_train
atcoder210d.cpp
#include<bits/stdc++.h> using namespace std; int a[1005][1005]; int dp[1005][1005]; int c; int main(){ int n,m; cin>>n>>m>>c; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } int x=0,y=0; long long tmp=a[0][0]; long long ans=tmp; for(int i=0;i<n;...
ALGO
0.999956
4.057152
b8ea4594-19f6-40c1-9637-1c4be6235510
denis-gubar/Leetcode
all/1121. Divide Array Into Increasing Sequences.cpp
class Solution { public: bool canDivideIntoSubsequences(vector<int>& nums, int K) { vector<int> count(100'001); map<int, int> M; int total = nums.size(); for (int n : nums) { ++count[n]; ++M[n]; } int size = *max_element(count.begin(), count.end()); if (K * size > total) return false; vector...
ALGO
0.99983
5.524026
e61817d0-78fd-4e35-8f6c-3e7b424153c1
OV2/snes9x-libsnes
cpuops.cpp
/*********************************************************************************** Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. (c) Copyright 1996 - 2002 Gary Henderson (<EMAIL>), Jerremy Koot (<EMAIL>) (c) Copyright 2002 - 2004 Matthew Kendora (c) Cop...
ALGO
0.946622
3.104986
8490c2b1-da9a-45ac-93f2-5f388cac5884
Sneha-2045/DSA
stacks/insertAtBottom(recursion).cpp
#include<iostream> #include<stack> using namespace std; void f(stack<int>&st,int x){ if(st.empty()){ st.push(x); return; } int curr=st.top(); st.pop(); f(st,x); st.push(curr); } int main(){ stack<int>st; st.push(1); st.push(2); st.push(3); st.push(4); sta...
ALGO
0.99998
4.287381
bcc56bec-0949-49db-bb5a-a8f4df7c15ae
Ishavashisht/Leetcode_dsa
2262-solving-questions-with-brainpower/2262-solving-questions-with-brainpower.cpp
class Solution { public: int n; long long solve(int i,vector<vector<int>>& questions){ if(i>=n)return 0; long long taken=questions[i][0]+solve(i+(questions[i][1]+1),questions); long long non_taken=solve(i+1,questions); return max(taken,non_taken); } long long solveMem(int i,vector<vector<int>>&...
ALGO
0.999906
5.598808
832b8f29-2083-4907-8db9-d368c4ede384
THARUN7474/DSA--FULL-in-cpp-
02codeforces_atcoders/contests/div4/find01_.cpp
#include<iostream> #include<string> using namespace std; int main(){ int N; cin>>N; while(N--){ string a; cin>>a; int count =1; bool flag = false; for(int i=1;i<a.size();i++){ if(a[i]=='0' && a[i-1] == '1'){ count ++; } ...
ALGO
0.999974
4.157434
a283aaa8-1297-47ae-acd6-55c69366fcbe
Hazrat-Ali9/XPSC-Problem-Solving
Week 6/day 1/3.cpp
// liink === https://https://www.codechef.com/problems/RCT #include<bits/stdc++.h> using namespace std; //......... macros......... #define ull unsigned long long #define ll long long #define ld double #define pii pair<int,int> #define F first #define S second #define vi vector<int> #define vii vector<pii> #define v...
ALGO
0.999435
4.533149
5b1c89b3-9ea9-4b27-b3a5-7109b359437d
Katia-ML/APM
APM/FreeImg/FreeImage/Source/Metadata/FIRational.cpp
#include "FreeImage.h" #include "Utilities.h" #include "FIRational.h" /// Initialize and normalize a rational number void FIRational::initialize(LONG n, LONG d) { if(d) { _numerator = n; _denominator = d; // normalize rational normalize(); } else { _numerator = 0; _denominator = 0; } } /// Default cons...
TOOL
0.850943
4.896581
f1ae3a19-4c69-4309-a1c0-ba4128ac5d91
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10967_6.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k, val; cin >> n >> k; vector<int> vec; int counter = 0; for (int i = 0; i <= n * 2; i++) { cin >> val; vec.push_back(val); } for (int i = 1; i <= n * 2; i++) { if (i % 2 != 0) { int swap = vec[i]; swap = swap - 1; ...
ALGO
0.999998
3.172677
b3bf816b-2717-48ae-a380-32bd414b9cfc
na-thy/C-
desafio6.cpp
//Crie um algoritmo em c++, em que o usuário informa os gastos com alimentação de 5 famílias, //calcula a média de gastos e diz de cada família, se seu gasto é abaixo, acima ou na média. #include <iostream> using namespace std; int main() { float vetor[5]; float mediaFamilia = 0; for(int i = 0; i < 5; i...
ALGO
0.997393
4.112874
52d75a22-0538-49ab-a409-837b022e73db
fadeybog2/cpp-pilot-hse
tasks/search2/search.cpp
#include "search.h" #include <algorithm> #include <cctype> #include <cmath> #include <functional> void SearchEngine::BuildIndex(std::string_view text) { index_.BuildIndex(text); } void SearchEngine::Index::BuildIndex(std::string_view text) { size_t beg = 0; size_t str_beg = 0; bool is_word = std::isa...
ALGO
0.996775
6.052572
956f6d5b-9a4d-434b-9f69-59c31bdd550f
JorgeIba/Competitive-Programming-Problems
CodeForces/E - 1794.cpp
#include <bits/stdc++.h> #define endl '\n' #define lli long long int #define ld long double #define all(v) v.begin(), v.end() #define fastIO(); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define SZ(s) int(s.size()) #define debugg(x) cerr << #x << " = " << x << endl; #define forn(i, n) for(int i = 0; i < (...
ALGO
0.99996
4.146217
87dbf9ad-dcfb-4d8a-86f2-062336ace18f
1Codealot/Advent_Of_Code_2024
day_04/part2.cpp
#include <iostream> #include <vector> #include <string> #include <fstream> #include <algorithm> using namespace std; int main(){ string buff; vector<string> lines; int xmas_cnt = 0; ifstream f("input.txt"); while (getline(f, buff)){ lines.push_back(buff); buff.clear(); ...
ALGO
0.999053
4.803107
fc0a8d5e-d98c-4547-b750-0bb0a98cc5a3
kangrace/OS-CPUscheduler
CPUscheduler/algorithm.cpp
#include <string> #include <functional> #include <algorithm> #include <iomanip> #include "algorithm.h" #include "queue.h" // processes are handled in order starting from 1 void Algorithm::FCFS(vector<Process> process) { // the vector comes from main, vector<Process> process = fileRead::readFile(); int currentTime = ...
ALGO
0.99988
3.705235
1fa9266b-da46-4df7-99d6-f0453a1ef880
KKapoor0801/DSA_DAT
Leetcode/Dynamic Programming/132_Palindrome_Partitioning_II.cpp
class Solution { public: bool isPalin(string &str,int start, int end){ // Function to check if a string is palindrome or not between 2 given indices while(start <= end){ if(str[start] != str[end]) return false; else{ start++; end-...
ALGO
0.999985
5.827667
04209d91-62da-4c76-bd45-b0005659f035
kokilinot/laboratory-work-2nd-year
lab 2 c++/lab2/Treebin.cpp
#pragma once #include "treeBin.h" #include <iostream> #include <queue> TreeBin::TreeBin(int a) { Node* node = new Node(a); this->head = node; } void TreeBin::Puch(int a) { Node* NewElem = new Node(a); PuchHelperFunction(head, NewElem); } void TreeBin::BFS() { std::queue<Node*> q; Node* temp = new Node(); q.pu...
ALGO
0.999039
3.610587
c3fdf93c-4eb3-4e3a-adea-a276ae8a5514
gedorinku/llvm-65816
lldb/test/API/python_api/thread/main2.cpp
#include <stdio.h> #include <stdlib.h> int a(int); int b(int); int c(int); int a(int val) { if (val <= 1) return b(val); else if (val >= 3) return c(val); return val; } int b(int val) { int rc = c(val); void *ptr = malloc(1024); // thread step-out of malloc into function b. i...
TOOL
0.975292
3.954445
669179b4-a4de-4227-9afd-a8ade92ff956
lorenzo-rovigatti/cahn-hilliard
split_files/ch.cpp
#include <iostream> #include <fstream> #include <cstdlib> #include <cmath> #include <vector> #include <algorithm> #include <string> #include <numeric> #include <cxxopts/cxxopts.hpp> #define SQR(X) ((X) * (X)) struct FreeEnergyModel { FreeEnergyModel(cxxopts::ParseResult &options) { } virtual ~FreeEnergyModel() ...
ALGO
0.999736
5.425138
86960868-0232-4c28-9f64-a93698c4ac68
ishandutta2007/codeforces
w0nsh/normal/1353/E.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, a) for(auto & i : (a)) #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, ...
ALGO
0.999867
4.020982
c9972d49-b2ca-4b02-91a8-8df9f0c935f1
Shihabulminhaz/My_Competitive_Programming_Code
Codeforces/A/1370A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int main() { fast int t,n,xxx; cin >> t; while(t--){ cin >> n; cout << n/2 << endl; } return 0; }
ALGO
0.999606
4.220181
11a5507e-8761-4aa8-adc4-a5614617ed1d
Kazuha-Li/LeetCode
Cpp/217_Contains_Duplicate.cpp
/* https://leetcode.com/problems/contains-duplicate/ Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct. Example 1: Input: [1,2,3,1] Output: true Example 2: ...
ALGO
0.999248
5.382786
4740330e-0bc1-4db0-92e4-1b36703ad579
sourav-gt47/DAA-LAB-ASSIGNMENT-5
Quick_sort_hoare_mid.cpp
#include<iostream> using namespace std; void swap(int* a, int* b){ int temp=*a; *a= *b; *b= temp; } //hoare's partition pivot = arr[mid] int partition(int arr[], int low , int high){ int i= low-1; int j=high+1; int mid=(low + high)/2; int pivot=arr[mid]; while(i<j){ do{ i++; }while( arr[i]<pivot ); do { ...
ALGO
0.999981
4.888931
0c4f2bae-54a0-4b13-b209-122539a64cd8
rinon/Simple-Homomorphic-Encryption
circuit.cpp
#include "circuit.h" // Input gate Gate::Gate(GateType gate_type, unsigned long input_index, SecuritySettings *sec) : sec(sec), gate_type(gate_type), input_index(input_index) { input1_resolved = true; input2_resolved = true; unresolved_outputs = 0; init_vars(); degree = 1; norm = 1; } // Input Literal ga...
ALGO
0.981398
4.690773
6380ff47-66ca-4225-9887-35dbf7948e37
RRIZVE/Templet-1
1 Templet/all sub arrey.cpp
//***********************Bismillah-ir-Rahman-ir-Rahim******************************\ //In the Name of Allah //La ilaha illallah Muhammadur Rasulullah //Rabbir Hamhuma Kama Rabba Yani Sagheera #include<bits/stdc++.h> using namespace std; #define Alhamdulillah ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #defin...
ALGO
0.999607
4.004777
a97f3a04-9b38-4863-a08c-264fd0b39d77
wangtongxue-369/xcpc_Code_file
file/codeforces/old_/Educational Codeforces Round 170 (Rated for Div. 2)/B/B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define INF 0x3f const ll mod = 1e9 + 7; const ll MAXN = 500005; ll _ = 1, n, m, ans = 0, a[MAXN], f[MAXN]; void solve() { cin >> n; ll x; a[0] = 1; a[1] = 2; for (int i = 2; i <= 100100; i++) { ...
ALGO
0.99997
3.581825
93ff1a07-1096-4518-ac9f-400e81c957c4
ee08b397/LeetCodeSolution
Problem057-Insert Interval/Solution.cpp
/* * @SEU(master);@ZZULI(bachelor) * author:CuiXuan * email:<EMAIL> * If you find any errors, please let me know. * If you have any better solution, please let me know. * * Solution Using time 580ms */ /** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : ...
ALGO
0.99996
5.614549