uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
febbe4f3-779b-40dd-973a-087b3c1cc49c
Saifu0/Competitive-Programming
CP/1500/560D.cpp
// ----- In the name of ALLAH, the Most Gracious, the Most Merciful ----- #include<bits/stdc++.h> using namespace std; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #define sim template < class c #define ris return * this #define dor > debug & operator << #defin...
ALGO
0.999797
4.208089
adf42f79-9d7f-4ff0-9eee-67ab0fc74a85
JonathonMacleod/Distributed-Game-Architecture
libs/BOOST1.82.0/libs/graph/example/dijkstra-no-color-map-example.cpp
#include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths_no_color_map.hpp> #include <boost/property_map/property_map.hpp> using namespace boost; int main(int, char*[]) { typedef adjacency_list< listS, vecS, directedS, no_property, prop...
ALGO
0.99977
5.936502
113ddfab-e579-4f7e-a66c-a1c10005c712
thanhcong2k7/Code-DTTin-23-24
adu/CP/Code/c2vyvp.contest.codeforces.com/e.cpp
#include <iostream> using namespace std; int main() { int m,n,t,kq[100]; cin >> t; for (int i=1; i<=t; i++) { cin >> m >> n; kq[i]=m/n; } for (int i=1; i<=t; i++) cout << kq[i] << endl; return 0; }
ALGO
0.999741
3.742062
d7917584-3826-413b-b3b9-119d8d3044c5
Manan-jn/CoDing-Problems
leetcode/richest_wealth.cpp
//1672. Richest Customer Wealth //LEETCODE easy //2D vector Link: https://leetcode.com/problems/richest-customer-wealth/ #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int maximumWealth(vector<vector<int>> &accounts) { int max_sum = 0; fo...
ALGO
0.998556
5.686771
e4a686d5-cb1f-49c8-98f5-e15efc1516f6
22388o/test
src/util/bip32.cpp
#include <sstream> #include <stdio.h> #include <tinyformat.h> #include <util/bip32.h> #include <util/strencodings.h> bool ParseHDKeypath(const std::string& keypath_str, std::vector<uint32_t>& keypath) { std::stringstream ss(keypath_str); std::string item; bool first = true; while (std::getline(ss, item...
TOOL
0.911375
6.04334
cb143fcd-8f6f-4b9a-928f-5fb135c6b597
nqbao1501/btvnctdlgt
3-5-2024/baiTapTrenLop.cpp
#include <iostream> using namespace std; struct NodeDT { float heso; int somu; NodeDT* link; }; struct ListDT { NodeDT* fist, * last; }; //khoi tao danh sach da thuc void initDT(ListDT *lDT) { lDT->fist = NULL; lDT->last = NULL; } //tao mot node moi NodeDT* callNode(float hs,int sm) { N...
ALGO
0.993493
3.144846
d3ea76b1-d6ae-4e21-9049-a4ee91c9ac11
Aanal/RobosoccerAttack-Athena
chain_action/actgen_self_pass.cpp
// -*-c++-*- #ifdef HAVE_CONFIG_H #include <config.h> #endif #include "actgen_self_pass.h" #include "self_pass_generator.h" #include "action_state_pair.h" #include "predict_state.h" #include <rcsc/player/world_model.h> #include <rcsc/common/logger.h> using namespace rcsc; /*--------------------------------------...
ALGO
0.868122
3.609277
a5b907a6-49c1-4be7-aa08-9e812aa53567
nis-cyber/funiture-app-using-flutter
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
4a042799-2f1e-484d-9cf5-0e8d58c22d24
viktoriia-fomina/Homework
hw8/AVL tree/AVL tree/Set.cpp
#include "Set.h" #include "Node.h" #include <algorithm> Set::Set() { head = nullptr; } Set::~Set() { if (head != nullptr) { deleteRecursion(head); } } void Set::deleteRecursion(Node * current) { if (current->leftChild != nullptr) { deleteRecursion(current->leftChild); } if (current->rightChild != nullptr...
TOOL
0.976298
4.650167
141b15b4-ca10-4c9d-a255-2ecd9dd70f8e
dengkevin/kattis
pascal.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; //make a copy of n to reference later int n_copy = n; int product = 1; //we will omit first smallest prime factor bool first = true; //reduce to odd while (n % 2 == 0) { if (first) { n = n /...
ALGO
0.999961
4.84901
e5ec1614-f440-44ea-8fc6-d7669685223c
mcdonough-john82/OpenCV
modules/photo/src/calibrate.cpp
#include "precomp.hpp" #include "opencv2/photo.hpp" #include "opencv2/imgproc.hpp" #include "hdr_common.hpp" namespace cv { class CalibrateDebevecImpl CV_FINAL : public CalibrateDebevec { public: CalibrateDebevecImpl(int _samples, float _lambda, bool _random) : name("CalibrateDebevec"), samples(_s...
ALGO
0.997997
6.254205
92a9f053-3e0d-4fc6-af4d-213176e6bf2e
Davit2022/Sax_texekutyun
c++/pointer2.cpp
#include <iostream> char is_lower_case(char c); char is_upper_case(char c); char lower_case(char c); char upper_case(char c); char is_latter(char c){ std::cout << "Enter your letter:" << std::endl; std::cin >> c; if(c >= 65 && c <= 90 || c >= 97 && c <= 122){ is_lower_case(c); }else{ ...
TOOL
0.970956
4.796827
ca2281ca-333c-4b04-845f-56844813aae7
ycsgg/oi_code
archieve/CF213E/CF213E.cpp
#include <iostream> using namespace std; typedef unsigned long long ull; const int N = 2e5 + 5; const ull base = 23; ull Hasha, dpow[N], sum; int n, m; int a[N], b[N]; int pos[N], ans; struct Node { ull tot, val; } tr[N * 4]; void pushup(int x) { tr[x].tot = tr[x * 2].tot + tr[x * 2 + 1].tot; tr[x].val = tr[x * ...
ALGO
0.999712
4.027138
a97967c7-312a-416c-ae18-68304a8cf810
ZHENZHI76/CPP_OJ_exercise
C++算法编程课C1/c++练习/OJ练习/1041.cpp
#include<iostream> #include<iomanip> using namespace std; int main() { char ms; int p; double d; cin >> ms >> p; if (ms == 'P') { d = 0.7; } else if (ms == 'G') { d = 0.8; } else if (ms == 'S') { d = 0.9; } else { d = 0.95; } double py = p * d;...
ALGO
0.984828
3.803135
8f094eb4-e6d7-4c44-a05c-8092a551b6eb
johnrsibert/tagest
25-alpha/src/xinit3.cpp
//$Id: xinit3.cpp 2754 2011-01-02 20:57:07Z jsibert $ #include "par_t_reg.h" #include "trace.h" extern double min_nb_par; extern double max_nb_par; extern ofstream clogf; namespace movemod { double boundpin(const double x, const double fmin, const double fmax); } template<> void par_t_reg<d3_array,dmatrix,dvector,d...
CONFIG
0.86143
4.260723
a36c6297-b931-4bbf-81bd-fa840b4b11de
shubham-0505/Data-Structures-and-Algorithms
Basics/this.cpp
#include<iostream> using namespace std; class arithmetic{ private: int a; int b; public: arithmetic(int a,int b); int add(); int sub(); }; arithmetic::arithmetic(int a,int b){ this->a = a; this->b = b; } int arithmetic::add(){ int c; c = a + b; return c; } int arithmet...
ALGO
0.960793
5.095892
939555ec-583f-49f0-ae6f-94d6bec5dbbc
rafaelkatalan/Ponderadas-M10
P4/flutter_app/flutter_application_1/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.995228
6.763549
35245eff-ac9c-44cb-a4a6-5f010f572ba3
matter13311/Computer-Science-Class-projects-and-work
CSCI 136 LAB assignments/lab2c.cpp
/* Author: <Matthew Liang> Course: {136} Instructor: <Alexey Nikolaev> Assignment: <Task C. Modeling social dynamics> checks if all user inputted numbers are negative. Then runs number through formula, and spits it back out in loops. */ #include<iostream> using namespace std; int main() { double p0; double p1; int sum...
ALGO
0.999836
3.612299
5de8aca6-fc8c-4f16-a379-93748c3dce43
shreejitverma/SDE-Interview-Prep
competitive-programming/Bit Manipulation/Program to find whether a no is power of two.cpp
/*Given a non-negative integer N. The task is to check if N is a power of 2. More formally, check if N can be expressed as 2x for some x. Example 1: Input: N = 1 Output: true Explanation: 1 is equal to 2 raised to 0 (20 = 1). Example 2: Input: N = 98 Output: false Explanation: 98 cannot be obtained by any power of ...
ALGO
0.996185
6.467775
16bb28c1-f8b0-447f-97f0-a73c42823a02
ishandutta2007/codeforces
gepardo/normal/889/A.cpp
#include <iostream> #include <set> using namespace std; int main() { int n; cin >> n; set<int> s; for (int i = 0; i < n; i++) { int q; cin >> q; s.insert(q); } cout << n + 1 - s.size() << endl; return 0; }
ALGO
0.993283
3.256943
78565c41-b3e0-4db7-89a4-5af7c56b249f
Caerind/SDLBgfxTest
bgfx/bgfx/3rdparty/meshoptimizer/src/spatialorder.cpp
#include <assert.h> #include <float.h> #include <string.h> // This work is based on: // Fabian Giesen. Decoding Morton codes. 2009 namespace meshopt { // "Insert" two 0 bits after each of the 10 low bits of x inline unsigned int part1By2(unsigned int x) { x &= 0x000003ff; // x = ---- ---- ---- ---- ...
ALGO
0.999938
6.282986
cfb75efd-911a-457a-b724-e3fa7eb3602d
IvyLH03/algo-contest-archive
contest-algo-archive/pdf/p29s25.cpp
#include<cstdio> using namespace std; int main() { int a,b,n,i,x; scanf("%d%d",&a,&b); for(i=1;i<=b;i+=1) { x=a*a%7; } switch(x) { case 1:printf("Monday");break; case 2:printf("Tuesday");break; case 3:printf("Wednesday");break; case 4:printf("Thursday");break; case 5:printf("Friday");break; case 6...
ALGO
0.999969
3.298975
8a9fb0da-d405-4e6d-b98b-838db30ac1ce
apandia/LinkedList
LinkedListNodeWhereCycleBegins.cpp
#include <iostream> using namespace std; class SingleLinkedListNode { public: int data; SingleLinkedListNode* next; SingleLinkedListNode() : data(0), next(nullptr) {} SingleLinkedListNode(int x) : data(x), next(nullptr) {} SingleLinkedListNode(int x, SingleLinkedListNode *next) : data(x), next(ne...
ALGO
0.999981
5.563704
23b1a2ae-542f-49a3-9994-e4b3a51865a1
songminkyu/CPP_TEST_UNTIL_17
ConsoleApplication1/소스34.cpp
#include "stdafx.h" #include <chrono> #include <condition_variable> #include <cstdio> #include <functional> #include <future> #include <mutex> #include <queue> #include <thread> #include <vector> namespace ThreadPool { class ThreadPool { public: ThreadPool(size_t num_threads); ~ThreadPool(); // job ߰Ѵ. tem...
TOOL
0.868183
4.851977
a4699d32-65ad-4f35-a0a9-e8790b317170
ana-lazar/education
year1/ga/kosaraju.cpp
#include <iostream> #include <fstream> #include <vector> #include <stack> #include <algorithm> #include "comun.h" using namespace std; struct Var { int pi, d, f; string colour; Var(string colour, int pi, int d, int f) : colour(colour), pi(pi), d(d), f(f) { } }; vector<vector<int>> G_kosaraju; // reprezentare: li...
ALGO
0.997267
4.71537
06616c52-f68e-476f-a869-1b31844694fe
Ourgaht/prog3d
ext/nanogui/ext/eigen/doc/examples/Tutorial_ArrayClass_addition.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXXf a(3,3); ArrayXXf b(3,3); a << 1,2,3, 4,5,6, 7,8,9; b << 1,2,3, 1,2,3, 1,2,3; // Adding two arrays cout << "a + b = " << endl << a + b << endl << endl; // Subt...
ALGO
0.954508
3.642258
6c6fcce1-b8b1-4d80-8e04-2690b92b28b3
freedomDR/coding
nowcoder/66offer/61.cpp
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } }; */ class Solution { public: char* Serialize(TreeNode *root) { if(root == NULL) return NULL; string str; Serialize...
ALGO
0.999759
5.702444
2939f1df-182b-4f8e-a18d-a57818e51617
theducdev/CodePTIT-Cpp
cpp0429.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n, k, b; cin >> n >> k >> b; int a[100001] = {0}; for (int i=0; i<b; i++) { int x; cin >> x; a[x]=1; } int cnt=0; for(int i = 1; i <= k; i++) { if(a[i]==1) ...
ALGO
0.99994
3.584977
6ab3e833-06c8-4f20-a17c-a4479c1d4369
sarvex/leetcode-checked-c
solution/1700-1799/1717.Maximum Score From Removing Substrings/Solution.cpp
class Solution { public: int maximumGain(string s, int x, int y) { if (x < y) { reverse(s.begin(), s.end()); return maximumGain(s, y, x); } int ans = 0; stack<char> stk1; stack<char> stk2; for (char c : s) { if (c != 'b') ...
ALGO
0.999889
5.439429
560bbc44-0a89-4feb-a66c-d606e7d72c7c
TeddyReady/AlgebraMadness
libs/mathlib/mebiusfunction.cpp
#include "mebiusfunction.h" MebiusFunction::MebiusFunction() : number(1) {} MebiusFunction::MebiusFunction(int number) : number(number) { if (number < 0) { std::cerr << "ERROR in mebiusfunction.cpp: Number cannot be lower zero!" << std::endl; this->number = 1; } } int MebiusFunction::solve...
ALGO
0.999863
5.675858
71d48287-a0d2-49e4-98ba-5d32103af202
callmeliuchu/practice_c
freqs_1.cpp
// // Created by liuchu on 2020/12/16. // #include <stdio.h> int freqs(char *source,char *target){ int count = 0; while(*source){ char *s1 = source; char *s2 = target; while(*s1 && *s2 && *s1 == *s2){ s1++; s2++; }; if(!*s2){ puts(sour...
TEST
0.986972
4.006864
74b23d01-d455-463a-9ca2-bc9e65af755d
jl3937/leetcode
Pow.cpp
class Solution { public: double pow(double x, int n) { // Start typing your C/C++ solution below // DO NOT write int main() function if (n == 0) return 1; if (n > 0) { double r = pow(x, n / 2); r *= r; if (n % 2) r *= x; return r; } double r = pow(x, -((-...
ALGO
0.999811
5.458924
fba2cfc7-3084-45bf-bacf-4a50a83d042e
sarvex/leetcode-scratch
solution/1700-1799/1786.Number of Restricted Paths From First to Last Node/Solution.cpp
using pii = pair<int, int>; class Solution { public: const int inf = INT_MAX; const int mod = 1e9 + 7; vector<vector<pii>> g; vector<int> dist; vector<int> f; int n; int countRestrictedPaths(int n, vector<vector<int>>& edges) { this->n = n; g.resize(n + 1); dist.ass...
ALGO
0.99998
5.211738
f7dbf963-cc56-4567-995c-37dd0177e98b
TuGraph-family/tugraph-db
procedures/algo_cpp/lcc_procedure_v2.cpp
#include <cstdlib> #include "lgraph/lgraph.h" #include "lgraph/lgraph_types.h" #include "lgraph/lgraph_result.h" #include "tools/json.hpp" #include "./algo.h" using json = nlohmann::json; using namespace lgraph_api; using namespace lgraph_api::olap; extern "C" LGAPI bool GetSignature(SigSpec &sig_spec) { sig_spec...
ALGO
0.994021
4.770147
4e6ec400-621b-4ec7-ac07-2d109aab243b
Chiyoshic/SCAU-OJ-online-judge
2-数据结构/实验6-排序/8644-堆排序.cpp
#include <iostream> // 堆排序算法实现 // 算法思想:利用堆这种数据结构设计的排序算法,分为建堆和排序两个阶段 // 记忆方法:"大顶堆" - 父节点总是大于子节点,每次取堆顶元素 using namespace std; int n; // 堆调整函数:保持以s为根的子树满足堆性质 void HeapAdjust(int* a, int s, int m){ int root = a[s]; // 保存当前根节点值 // 从根节点开始向下调整 for(int j=2*s; j<=m; j*=2){ // 步骤1:选择较大的子节点 if(j<m &&...
ALGO
0.999978
4.528021
c47b40ad-abfd-4344-b401-b248e3ebe354
DKB-17/LinguagemDeProgramacao
02-28 - Ponteiros/exercicio1.cpp
#include <iostream> #include <conio.h> using namespace std; void sumEsub(int x, int y, int z, int &soma, int &subtracao){ soma = x + y + z; subtracao = x - y - z; } int main(){ int a,b,c,soma,subtracao; cout << "Digite os valores de A,B,C respectivamento separados pelo espaco: "; cin >> a >> b...
TOOL
0.989983
3.603199
3605bd11-e9e2-4e8a-b907-568c331ac019
xinye83/leetcode
Cpp/0112_Path_Sum.cpp
/* Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary tree and sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ \ ...
ALGO
0.999987
6.55882
a9456d74-93f4-4a32-9cce-a5b4110e652f
ConnorAU/A3ExtendedChat
emojipacks/output/flags/data/flag-id.cpp
class flag_45_id { displayName="Indonesia Flag"; icon="cau\extendedchat\emojipack\twemoji\flags\data\flag-id.paa"; keywords[]={"flag-id"}; shortcuts[]={}; condition="true"; };
ALGO
0.958413
5.355655
9fc16988-d482-413c-835e-1a6af9586af7
iRobot42/Leetcode
Medium/Add Two Numbers.cpp
struct Solution { ListNode* addTwoNumbers( ListNode* l1, ListNode* l2 ) { ListNode* h{ new ListNode }, *n{ h }; int s{}; while ( l1 || l2 || s ) { if ( l1 ) s += l1->val, l1 = l1->next; if ( l2 ) s += l2->val, l2 = l2->next; n = n->next = new ListNode( s % 10 ), s /= 10; } n = h,...
ALGO
0.99949
6.604902
d0fead6c-e1c0-4c21-9f07-affc671c24e9
mertpasacukur/riscv_llvm
libc/src/math/generic/lrintf.cpp
#include "src/math/lrintf.h" #include "src/__support/FPUtil/NearestIntegerOperations.h" #include "src/__support/common.h" namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(long, lrintf, (float x)) { return fputil::round_to_signed_integer_using_current_rounding_mode<float, ...
ALGO
0.996417
6.559422
af80d5ca-ac58-4860-87ac-a0e5f2c4b68b
PiXeN-OS/frameworks_av
media/libstagefright/codecs/amrnb/dec/src/lsp_avg.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/lsp_avg.c Functions: Date: 04/14/2000 ------------------------------------------------------------------------------ REVISION HISTORY Description: Removed the functions lsp_avg_init and lsp_avg...
ALGO
0.976542
6.638196
c9f5302e-d7a9-4eb4-b7a6-77f7ae63ed73
skyqnaqna/algorithm_study
swea/1230_암호문3.cpp
#include<iostream> using namespace std; const int MAX = 1000000; struct Node { int data; Node* next; Node* prev; Node* myAlloc(int data, Node* prev) { this->data = data; this->next = prev->next; prev->next->prev = this; this->prev = prev; return this; } } nodes[MAX]; int nodeCnt; No...
ALGO
0.997893
4.181466
a1ea4458-4c24-4b6a-9e7e-98c87d7f3af3
TheoLong/NTRT_ML
src/core/tgBulletUnidirComprSpr.cpp
/** * @file tgBulletUnidirComprSpr.cpp * @brief Definitions of members of class tgBulletUnidirComprSpr * @author Drew Sabelhaus, et al. * @copyright Copyright (C) 2016 NASA Ames Research Center * $Id$ */ // This module #include "tgBulletUnidirComprSpr.h" #include "tgBulletSpringCableAnchor.h" #include "tgCast.h"...
TOOL
0.895289
6.694458
a3ff1a91-b695-48cf-890b-fe6563ed215e
Yan-XiaoMing/brush-questions
src/leetCode/探索/二叉树/二叉树的最大深度.cpp
//#include<vector> //#include<iostream> //using namespace std; // //struct TreeNode { // int val; // TreeNode* left; // TreeNode* right; // TreeNode(int x) : val(x), left(NULL), right(NULL) {} //}; // // //int maxDepth(TreeNode* root) { // if (root == NULL) { // return 0; // } // int l = 1 +...
ALGO
0.998539
4.681947
c662fce9-75ca-4367-9d6c-0b299d090515
Abhishek-1337/Competitive-coding-CPP
Binary Heap/KthLargestEl.cpp
#include<bits/stdc++.h> using namespace std; void maxHeap(vector<int> &v, int n){ int i = n; int key = v[i]; while(i > 1 && key > v[i/2]){ v[i] = v[i/2]; i = i/2; } v[i] = key; } int del(vector<int> &v, int n){ int key = v[1]; int keyIndex = 1; v[1] = v[n-1]; ...
ALGO
0.999891
3.688118
40f3b801-b8c3-4cf3-974f-3936e361ccbf
VipulChauhan89/Leetcode-solutions
Math/2028-Find_Missing_Observations.cpp
class Solution { public: vector<int> missingRolls(vector<int> &rolls,int mean,int n) { int m=rolls.size(); long long sum=accumulate(rolls.begin(),rolls.end(),0); long long total=(n+m)*mean,diff=total-sum; if(diff>6*n || diff<n) { return {}; } ...
ALGO
0.999716
5.337548
38c47169-7f87-4be4-a5ff-4cf784c7911d
Chrisding/seal
caffe/src/caffe/layers/conv_layer.cpp
#include <vector> #include "caffe/layers/conv_layer.hpp" namespace caffe { template <typename Dtype> void ConvolutionLayer<Dtype>::compute_output_shape() { const int* kernel_shape_data = this->kernel_shape_.cpu_data(); const int* stride_data = this->stride_.cpu_data(); const int* pad_data = this->pad_.cpu_data...
ALGO
0.892313
7.832802
d921cf7c-3841-4136-bc26-9fab5a36e052
anlingbbq/LearnRayTracing
11.DefocusBlur/11.DefocusBlur.cpp
// 11.DefocusBlur.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "PPMRender.h" class DefocusBlurRender : public PPMRender { void init() override { nx = 1280; ny = 640; ns = 100; vec3 lookform(-2, 2, 1); vec3 lookat(0, 0, -1); float dist_to_focuse = (lo...
TOOL
0.877299
5.912586
cece2f76-5573-4f20-b728-a2518f01f0c6
CubePresser/CS475-Parallel_Programming
project_4/arraymult.cpp
#include "simd.p4.h" #define NUMTRIES 25 #ifndef ARRAYSIZE #define ARRAYSIZE 1000 #endif int main() { FILE* outfile = fopen("results.txt", "a"); if(!outfile) { fprintf(stderr, "Error opening results.txt\n"); return -1; } float* a = new float[ARRAYSIZE](); float* b = new flo...
ALGO
0.998751
4.902869
de9c6dee-d67a-4720-a620-ae364e58e57a
domob1812/crowncoin
src/core_read.cpp
#include "core_io.h" #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" #include "serialize.h" #include "streams.h" #include "univalue/univalue.h" #include "util.h" #include "utilstrencodings.h" #include "version.h" #include <boost/algorithm/string/classification.hpp> #includ...
TOOL
0.856301
7.148677
b8109177-2450-4d53-b756-ab2e022bf656
hjwdzh/TextureNet
data/QuadriFlow/src/adjacent-matrix.cpp
#include "config.hpp" #include "adjacent-matrix.hpp" #include "dedge.hpp" #include <fstream> void generate_adjacency_matrix_uniform( const MatrixXi &F, const VectorXi &V2E, const VectorXi &E2E, const VectorXi &nonManifold, AdjacentMatrix& adj) { adj.resize(V2E.size()); #ifdef WITH_OMP #pragma omp parallel for #endif...
ALGO
0.990452
4.155656
0e5c0c90-abec-4b10-8329-ca9feee93a57
ruisebastiao/QtBarcodeReaderLib
QZXing/zxing/zxing/datamatrix/decoder/DataMatrixBitMatrixParser.cpp
#include <zxing/datamatrix/decoder/BitMatrixParser.h> #include <zxing/common/IllegalArgumentException.h> #include <iostream> namespace zxing { namespace datamatrix { int BitMatrixParser::copyBit(size_t x, size_t y, int versionBits) { return bitMatrix_->get(x, y) ? (versionBits << 1) | 0x1 : versionBits << 1; } Bi...
ALGO
0.979788
4.455661
970c1558-4958-4d71-8f50-dce35acfbb21
pvy-it-tdh/LeThachPhucVy_Cpp
Chapter13/program3.cpp
// This program creates three instances of the Rectangle class. #include <iostream> using namespace std; // Rectangle class declaration. class Rectangle { private: double width; double length; public: void setWidth(double); void setLength(double); double getWidth() const;...
TOOL
0.895714
4.18969
5e1ba125-1a81-4d2c-b351-0b98349f9e1a
abime-ly/SM9
miracl_5.5.4/miracl/source/curve/schoof2.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <cstring> #include "ec2.h" // GF(2^m) Elliptic Curve Class #include "crt.h" // Chinese Remainder Theorem Class // poly2.h implements polynomial arithmetic. Karatsuba multiplication is // used for maximum speed, as the polynomials get v...
ALGO
0.999775
3.227927
58cd829b-8d17-4590-ac43-0fc441388f1a
Injarapugc/cpcodes
recursion/combination.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: void combination(int ind,int target,vector<int> &a,vector<int> &ds,vector<vector<int>> &ans) { if(ind==a.size()) { if(target==0) { ans.push_back(ds); } retur...
ALGO
0.999978
5.774525
4225c9e8-5384-438f-a32d-00f4669027c5
MedoN11/CompetitiveProgramming
SGU/321.cpp
#include <iostream> #include <cstdio> #include<list> #include<iomanip> #include<cmath> #include <random> #include<queue> #include <functional> #include<stdio.h> #include<assert.h> #include<stack> #include<sstream> #include <cstdlib> #include<map> #include<algorithm> #include<iostream> #include<set> #include<utility> #i...
ALGO
0.999869
3.887973
f63fc875-20d1-4d11-8352-beeb11833af9
chengui/1337c0d3
62-unique-paths/solution.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: int uniquePaths(int m, int n) { vector<vector<int> > triangle; int sum = 0; triangle.resize(m); for (int i = 0; i < m; i++) { triangle[i].resize(n); for (int j = 0; j < n; j++) { ...
ALGO
0.999935
5.873303
3c001c27-c161-450b-aef3-a36d9e1d00d3
shivgupta198922/CodeForces-Master-in-cpp
200B_Drinks.cpp
/* ~ Author : @tridib_2003 ~ Title : 200B. Drinks ~ Link : https://codeforces.com/contest/200/problem/B */ #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; double pi, total_pi = 0; for (int i = 0; i < n; ++i) { cin...
ALGO
0.999087
3.800812
25d81627-2b71-409a-b49e-ebda41ab2443
Spandan-m-28/Codeforces_CP31_sheet
900/22.LuntikandSubsequences.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; void solve(){ ll n; cin >> n; vector<ll> arr(n); ll zeros = 0, ones = 0; for(ll i = 0;i < n;i++){ cin >> arr[i]; if(arr[i] == 0){ zeros++; } else if(arr[i] == 1){ ones++; ...
ALGO
0.999317
5.217132
24348857-d1f8-41b7-97af-78a6628e541b
Zapryanovx/FMI-OOP-2025-PREP
Week 10/Practicums/Practicum Group 02/Students/SortedStudentDB/SortedStudentDB.cpp
#include "SortedStudentDB.h" SortedStudentDB::SortedStudentDB() : StudentDB() {} void SortedStudentDB::sortBy(compare cmp) { for (size_t i = 0; i < getSize() - 1; i++) { size_t minIdx = i; for (size_t j = i + 1; j < getSize(); j++) { if (cmp(*getStudents()[j], *getStudents()[minIdx])) { minIdx = j; ...
TOOL
0.939261
4.85222
97f53588-eba8-40cd-8a55-42c3ce7c3ec4
Andrew123098/LearningCpp
CSCI2275/Tests/Midterm4/FinalExam.cpp
// On line 64 of PHeap.cpp, trying to access spot in nodes array that never has space allocated for it. So I made nodes a vector and allocated space for it. // On line 45 of FinalExam.cpp, not enough space allocated for people in CSV. Changed capacity from 100 to 882. // On line 90 of PHeap.cpp, should be returning the...
ALGO
0.998106
4.339913
aaecbbc1-15d0-4a60-a110-1c47a5bc40a9
Sookmyung-Algos/2023algos
algos_assignment/길수민_2093ab/summer_day4/1708.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stack> using namespace std; typedef long long ll; typedef pair<ll, ll> pi; int N; vector<pi> pos; pi firstPos; int ccw (pi a, pi b, pi c) { a = (pair<long, long>)a; b = (pair<long, long>)b; c = (pair<long, long>)c; // ll ans = a.firs...
ALGO
0.999967
4.848858
3eb8b57d-c10d-4f60-b158-599572202693
behnejad/Online-Judge-Solutions
ZOJ/1082 - Stockbroker Grapevine.cpp
#include<iostream> #include<string> using namespace std; int main(){ int T[100][100]; int N; int m,a,b; int min_time, start; while(1){ scanf("%d",&N); if(N==0) break; for(int i=0;i<N;i++) fill(T[i],T[i]+N,(1<<20)); for(int i=0;i<N;i++) T[i][i]=0; ...
ALGO
0.999514
3.291645
8a5bec4e-22d8-411e-a570-53cfe6d4b7a6
u4usmankhalil/DS-Paper
DS Paperr/singly linklist insertion.cpp
#include<iostream> #include<conio.h> #include<string.h> using namespace std; class Node{ public: int Value,j; Node *Next; Node() { j=0; Next=NULL; } }; Node *head;//=new Node();//agr () na lgao to no issue void count(Node *n) { int j=0; while(n!=NULL) { j++; n=n->Next; } cout<<"Node="<<j<<en...
ALGO
0.999257
3.357443
85dc14c9-6a43-4742-af32-8031b9287031
SofiaSilvestro/Esercitazione_2_Eigen
Exercise2/main.cpp
#include <iostream> #include "Eigen/Eigen" using namespace Eigen; using namespace std; // Function to solve the linear system Ax = b with PALU decomposition bool SolveSystemPALU(const MatrixXd& A, const VectorXd& b, const VectorXd& exactSolution, double& detA, double& condA, ...
ALGO
0.999919
3.862445
cc97a457-83d3-4fb0-b0f8-c097710e673f
ashutosh97/Competitive-Programming-questions
Dynamic Programming/Maximize the Product/solution.cpp
#include <bits/stdc++.h> using namespace std; // We declare the vector of factors for storing the vector<int> factors; // function to find out the factors of a number void findFactors(int n) { // we loop until the i reaches the sqrt(n) for (int i = 1; i * i <= n; i++) { // we check if ...
ALGO
0.999997
5.29281
e7690c48-76d1-4eca-9ba1-2699ba0fc407
raincross7/code-similarity
codes/train_code/problem005/problem005_4.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <map> #include <iomanip> #include <stdlib.h> #include <queue> using namespace std; const int nmax = 1e9 + 7; const long long INF = 1e18; const double PI = 2 * asin(1); typedef long long ll; int main(){ int N; cin...
ALGO
0.999883
3.729951
79e19985-7d54-487b-ac50-7273b751be8d
ldx-star/Algorithm
16/main.cpp
/// https://www.acwing.com/problem/content/1209/ #include<iostream> #include<vector> using namespace std; struct Edge{ int id,w; }; const int N = 1e5+10; vector<Edge> h[N]; int dist[N]; void dfs(int u,int father,int d){ dist[u] = d; for(auto e : h[u]){ if(e.id != father){ dfs(e.id,u,d...
ALGO
0.999855
3.995505
129f876c-b60d-4cfc-87a1-0d9ebecf03f7
SuyashJoshi179/ProgramsForProblems
codeforces/775/Aafter.cpp
#include <bits/stdc++.h> #include <random> #include <fstream> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<double, double> pd; typedef vector<ll> vl; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<vector<ll...
ALGO
0.999353
5.238159
51cad43d-acbc-44a4-a9a6-abf44dde27c1
Sgw32/CppLab
lexem_calc/lab1/expression_calculator.cpp
#include "expression_calculator.h" void processLexem(char* subs,Queue<char*>& res,Stack<char*>& slaveS) { // . if ((isOperand(subs))||(isVariable(subs))) { push(res,subs); printf("OP %s \n",subs); } else if (isFunction(subs)) { push(slaveS,subs); } else if (isOperator(subs)) { Node<char*>* st = s...
ALGO
0.998138
3.455473
7b6adac2-ac67-4bfe-afb9-d70fe69afbbf
triakshgupta/Leet_fun
0035-search-insert-position/0035-search-insert-position.cpp
class Solution { public: int searchInsert(vector<int>& nums, int target) { int ans=nums.size(); int i=0; int j=nums.size()-1; int mid=j+(i-j)/2; while(i<=j){ mid=j+(i-j)/2; // if(nums[mid]==target) return mid; if(nums[mid]>=target){ ...
ALGO
0.99997
6.221345
4738507b-938d-4a81-8b51-8d4a369c24de
7thKsJ/boj
11/11650.cpp
// solved_1896kb_64ms_53551237_417b #include <stdio.h> #include <algorithm> struct st{ int a, b; }; int n; st arr[100000]; bool cmp(st x, st y){ if(x.a == y.a) return x.b < y.b; return x.a < y.a; } int main (){ scanf("%d", &n); for(int i = 0; i < n; i++){ scanf("%d %d", &arr[i].a, &arr...
ALGO
0.999785
4.327092
daca4a65-2b90-48a1-9feb-128819dab5cf
Johniel/contests
atcoder/arc028/C/main.cpp
// atcoder/arc028/C/main.cpp // author: @___Johniel // github: https://github.com/johniel/ #include <bits/stdc++.h> #define each(i, c) for (auto& i : c) #define unless(cond) if (!(cond)) using namespace std; template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << ...
ALGO
0.999338
4.345003
73cf88ad-b33c-4648-8640-07a2ede425c9
ishandutta2007/codeforces
gs12117/normal/1264/D2.cpp
#include<cstdio> const long long int mod = 998244353; int n, m, p; char s[1001000]; long long int fct[1001000]; long long int ifct[1001000]; long long int fd[1001000]; long long int sd[1001000]; long long int mpow(int x, int y) { if (y == 0)return 1; long long int r = mpow(x, y / 2); r *= r; r %= mod; if (y % 2 ==...
ALGO
0.999996
3.954928
6cf482c3-05c4-464d-a5d5-b24a66e38e7b
croaxx/ProjectEuler
Hackerrank_Tasks/Dijkstra: Shortest Reach 2/main.cpp
// Problem description: https://www.hackerrank.com/challenges/dijkstrashortreach/problem #include <iostream> #include <vector> #include <queue> #include <limits> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef long long lli; typedef pair<lli, int> pllii; typedef vector<lli> vlli; const l...
ALGO
0.999934
4.548691
5615c17c-f380-4de3-94cb-97c390c2621e
priyanshubhandari0/cpp-assignment
nextgreat.cpp
// Online C++ compiler to run C++ program online #include <iostream> using namespace std; int main() { int a[100]={2,9,3,4,6,5}; cout<<"Previous array"<<endl; for(int i=0;i<6;i++) { cout<<a[i]<<" "; } cout<<endl; cout<<"Current array"<<endl; for(int i=0;i<6;i...
ALGO
0.998839
3.167209
2464d5f0-e59e-4c2a-b41a-2a95ee9f5f3c
umarsalman/Hackerrank-Solutions
clock problem.cpp
#include <bits/stdc++.h> using namespace std; int main() { int hr,min; cin>>hr; cin>>min; const char *args[] ={ "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven"...
ALGO
0.997498
5.836438
447f2ad5-5324-4dec-8fe3-0f5f03cedaab
EmilAlexandruStoica/libcxx
test/libcxx/containers/sequences/vector/db_iterators_5.pass.cpp
// <vector> // Add to iterator out of bounds. #if _LIBCPP_DEBUG >= 1 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) #include <vector> #include <cassert> #include <iterator> #include <exception> #include <cstdlib> #include "test_macros.h" #include "min_allocator.h" int main() { { typedef int T...
TEST
0.862291
3.561875
85563bdb-3d05-49fa-8008-36ebc7045b22
raincross7/code-similarity
codes/train_code/problem124/problem124_36.cpp
#include <bits/stdc++.h> using namespace std; inline void prep () { cin.tie (0); cin.sync_with_stdio (0); }; const double pi = acos(-1.); //printf(%.12lf\n,mid); // __builtin_popcount(int) count 1's in binary // get decimal part of number /* double intpart; double thiss = modf((double)(n*m)/(double)k, &intpart); ...
ALGO
0.999926
3.479305
03f4cd18-d3b6-4f23-a8e0-85a759d86bf9
lazy3ninja/TLE-CP31
800/3.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--){ int n; cin >> n; string s; cin >> s; int ans = 0; int cnt = 0; for(int i = 0;i<n;i++){ if(s[i] == '#'){ cnt = 0; } else{ cnt++; ...
ALGO
0.99977
3.772659
fa73fab8-926a-48b6-b587-85a0b20cd732
HalfdanJ/ofxFaceTracker2
src/ofxFaceTracker2Instance.cpp
#include "ofxFaceTracker2Instance.h" ofxFaceTracker2Instance::ofxFaceTracker2Instance(int label, dlib::full_object_detection shape, dlib::rectangle rectangle, ofxFaceTracke...
TOOL
0.8998
6.088744
dcffc679-f40c-45ae-b888-04223f76599b
VladDorofeev/Contests
Spring/Cs/C1.cpp
#include <iostream> class Seq { public: Seq(int _sz); Seq(Seq &sq); Seq& operator =(const Seq &sq); ~Seq(); int &item(int pos) const; friend void print_seq(const Seq &sq); private: int *arr; int sz; }; Seq::Seq(int _sz) { arr = new int[_sz]; this->sz = _sz; } Seq::~Seq() { ...
ALGO
0.98818
4.037633
d2ead1cc-2b62-4f1e-bbe2-4429177ad8fe
Epic-Eric/1010W_VEXcode
lol/src/PurePursuit/PurePursuit.cpp
#include "PurePursuit/PurePursuit.h" #include <vector> #include <math.h> #include <cmath> #include "vex.h" #define SQD(n) std::pow(n,2) //returns the sign of a num int sign(double x) { if (x > 0.0) return 1; if (x < 0.0) return -1; return 0; } double get_degrees() { return 360.00 - InertialSensor.heading(deg...
ALGO
0.99943
4.240921
0bcd97f1-c3e9-409d-ac63-429ed6d531a0
NancyFan96/PageRank
src/pagerank++.cpp
#include <iostream> #include <sstream> #include <fstream> #include <map> #include <string> #include <cstring> #include <string.h> #include <stdlib.h> #include <sqlite3.h> using namespace std; #define PAPER //#define AUTHOR //#define VENUE //#define DEBUG #define max(a, b) ((a>b)? a:b) static double graph[25000][250...
ALGO
0.998896
3.995311
315e6b12-cfb9-4313-8f16-a086ac4ffa07
panasalap/frameworks_av_Before
media/libstagefright/codecs/amrnb/common/src/residu.cpp
/* Pathname: ./audio/gsm-amr/c/src/residu.c ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template used to PV coding template. First attempt at optimizing code. Description: Deleted stores listed in the Local Stores Needed/Modified...
ALGO
0.999934
3.810766
9673735a-9eaa-4044-9915-9b7db28b8116
ohdodin/kai-world.io
자료구조/연습문제/prob3-2.cpp
//׽Ʈ #include <stdio.h> #include <stdlib.h> #include <string.h> #pragma warning (disable:4996) #define MAX 100 void swap(int a[], int b[]); int main() { int intervals[2][MAX]; //int intervals[MAX][2]; int* temp; int n, min, index; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &intervals[0][i]);...
ALGO
0.99995
3.068339
1ce4b006-43ff-4378-9556-a0f8b62a753e
pri1712/codefoces
Div2edu158_A.cpp
#include <bits/stdc++.h> #include <algorithm> #include <vector> #include <cmath> #include <map> typedef long long ll; typedef std::vector<ll> vl; typedef std::vector<int> vi; typedef std::unordered_map<int, int> unmap; typedef std::unordered_set<int> unset; typedef std::unordered_set<char> unsetc; using namespace std; ...
ALGO
0.99971
5.014569
60b03bce-96b8-4b52-b802-2c364a01e487
frisbii/CONFER
src/posit.cpp
#include <stdio.h> #include <fstream> #include "ap_int.h" #define VIVADO_BACKEND #include "hint.hpp" #include "posit/posit_dim.hpp" #include "params.hpp" #if WIDTH >= 64 #define WES 3 #elif WIDTH >= 32 #define WES 2 #elif WIDTH >= 16 #define WES 1 #else #define WES 0 #endif ap_uint<WIDTH> compute...
ALGO
0.985452
4.527921
e451af7b-5d72-411e-b49c-d159fd3233f7
ishandutta2007/codeforces
hehere/normal/934/B.cpp
//CF923B // #include <cstdio> #include <cstring> #include <cctype> typedef long long LL; #define pass printf("Passing Line.%d in function'%s'\n", __LINE__, __FUNCTION__); namespace BasicUnit { inline int readint() { int a=0, p=1; char c = getchar(); while(isspace(c)) c = getchar(); if(c == '-') p = -1, c = getch...
ALGO
0.99984
3.791989
1413418e-0331-444d-8c02-ddd564257e8b
gokulcodes/leetcode
128-longest-consecutive-sequence/128-longest-consecutive-sequence.cpp
class Solution { public: int longestConsecutive(vector<int>& nums) { sort(nums.begin(), nums.end()); if(nums.size() == 0) return 0; if(nums.size() == 1) return 1; int res = 0, local = 0, n = nums.size(); for(int i = 0; i < n - 1; i++){ ...
ALGO
0.999981
5.756759
6da9f745-7b1c-417c-9f04-543b64db0bc5
Tariqul-huda/CP-problem
Codeforces/C_Longest_Good_Array.cpp
#include "bits/stdc++.h" using namespace std; #define int long long #define endl '\n' signed main() { ios::sync_with_stdio(0); cin.tie(0); int T; cin >> T; while (T--) { int l,r; cin >> l >> r; int count = 1; int dif = 1; while(l<=r){ count++; ...
ALGO
0.999878
3.963455
cc834a56-c245-4adc-bfe8-1a6a14c93577
whoismtrx/Advent_of_Code
2024/Day11/C++/Plutonian_Pebbles_P1.cpp
//MTRX #include <iostream> #include <sstream> #include <string> #include <list> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string str; list<pair<long long, string>> ls; long long a; getline(cin, str); stringstream ss(str); ...
ALGO
0.996763
3.844724
96e87290-b057-43aa-b34e-ae03a075b27e
netpipe/IrrlichtDemos
Games/PIRATES/libraries/bullet3/src/BulletDynamics/Featherstone/btMultiBodyGearConstraint.cpp
///This file was written by Erwin Coumans #include "btMultiBodyGearConstraint.h" #include "btMultiBody.h" #include "btMultiBodyLinkCollider.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" btMultiBodyGearConstraint::btMultiBodyGearConstraint(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int li...
ALGO
0.954517
6.164709
1c12b6e3-2c44-4c29-a92f-6a0cc94fffc4
PulkitBxtra/CACSC06
Practical10/FrKnapsack.cpp
#include <iostream> using namespace std; struct Item { int value, weight; // Constructor Item(int value, int weight) { this->value = value; this->weight = weight; } }; // Comparison function to sort Item according to val/weight ratio bool cmp(struct Item a, struct Item b) { double r1 = (double)a.value / (d...
ALGO
0.999991
5.223397
11caa8cc-aff9-41f0-bec5-719fd68f8298
Rushi-kale-1/Data-Structures-Algorithms
15jun2024/selectionSort.cpp
#include<bits/stdc++.h> using namespace std; void selectionSort(vector<int> &arr){ int n=arr.size(); for (int i=0; i<n-1; i++){ auto mini = min_element(arr.begin()+i, arr.end()); swap (arr[i],*mini); } } int main(){ vector<int> arr ={1,4,2,60,2,9}; selectionSort(ar...
ALGO
0.999911
4.76901
f6a834a7-706f-467a-bf22-89204dc9492a
arlechann/atcoder
AtCoder/ABC182/E.cpp
#include <algorithm> #include <boost/optional.hpp> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string...
ALGO
0.999961
4.156069
be22667f-5292-4806-aa88-314cff80e520
remotemcu/adin-llvm
lib/CodeGen/MachineInstrBundle.cpp
#include "llvm/CodeGen/MachineInstrBundle.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/CodeGen/TargetRegisterInfo.h...
TOOL
0.866101
7.924751
cc135626-b895-4f3e-8822-1df33ebe4403
sKAR04/CP-Practice
Codeforces/116/116B.cpp
/* ##################################################### # I will win.. maybe not immediately but definitely # ##################################################### */ #include <bits/stdc++.h> using namespace std; //save time #define endl '\n' typedef long long ll; //for sorting #define all(a) a.begin(),a.end() //C...
ALGO
0.999817
3.899262
0c9de816-3ec6-4774-b931-750a1cbe4866
lakshmendraB95/CPpractice
B_Smartphone_Addiction.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD = 998244353; #define rep(i,e) for(ll i = 0; i < e; i++) #define endl "\n" #define dbg(x) cout<<#x<<" = "<<x<<ln #define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define all(x) (x).begin(), (x).end() int m...
ALGO
0.999995
4.744377
d02fb86e-c2b1-41e8-93a2-df079f1651e7
ishandutta2007/codeforces
wifiiii/normal/1284/D.cpp
#include<bits/stdc++.h> typedef long long ll; using namespace std; random_device rng; mt19937 mrand(rng()); #define ii for(int i=1;i<=n;++i) #define ji for(int j=1;j<=n;++j) #define jj for(int j=1;j<=m;++j) #define ij for(int i=1;i<=m;++i) #define sz(x) ((ll)x.size()) #define all(x) x.begin(),x.end() #define alll(x) x+...
ALGO
0.999843
3.683968