uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
167f76ed-a3d5-4786-87fa-808224b07515
AST-TheCoder/CP-Solutions
CodeForces/GNU C++14/252B | Unsorting Array/42360029.cpp
/******************************************************/ /******************************************************/ /** BISMILLAHIR RAHMANIR RAHIM **/ /** Al-Shahriar Tonmoy - Red_Sparkle **/ /** Department of Computer Science and Engineering **/ /** Barisal Universit...
ALGO
0.999981
3.491801
07127660-93b6-43c5-9e51-c96bbcf7eec4
HIHJH/CV
GaussianFilter/Gaussian/gray/GaussianGray.cpp
#include <iostream> #include <opencv2/opencv.hpp> #include <math.h> /* exp */ #define IM_TYPE CV_8UC3 using namespace cv; // Image Type // "G" for GrayScale Image, "C" for Color Image #if (IM_TYPE == CV_8UC3) typedef uchar G; typedef cv::Vec3b C; #elif (IM_TYPE == CV_16SC3) typedef short G; typedef Vec3s C; #el...
ALGO
0.984738
5.578622
86568dd3-7d36-428c-b436-cf7e5c949ffd
Kontae/algorithm_box
프로그래머스/3/258709. 주사위 고르기/주사위 고르기.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; void sumDFS(vector<vector<int>>& dice, vector<int>& v, vector<int>& sumV, int count, int sum) { if (count == 0) { sumV.push_back(sum); return; } for (int i = 0; i < 6; i++) { int cur = ...
ALGO
0.99989
6.044076
16c300ca-6b33-41fe-b592-41d32e0bae0a
Denniszhaoo/Cplusplus
3. Expressions and Interactivity/3.2 Mathematical Expressions/Example 3.5.cpp
#include <iostream> #include <cmath> using namespace std; int main() { const double PI=3.14159; double area, radius; cout << "This program calculates the area of a circle.\nWhat is the radius of the circle? "; cin >> radius; area=PI*pow(radius,2); cout << "The area is " << area << ".\n"; } /* ...
ALGO
0.976424
5.217576
9adbbf98-95af-4d8a-8147-607aa89bcd77
Moynstain/1_HelloWorld
cppPrimerPlus_6th_edition/Chap1/chap1_getinfo.cpp
// // Created by Moynstain_MBA on 2022/10/13. // #include "iostream" using namespace std; int main(){ int carrots; cout << "How many carrots do you have?" << endl; cin >> carrots; cout << "You have " << carrots << " carrots.\nAnd here are 4 more for you.\n"; carrots += 4; cout << "Now you ha...
TOOL
0.962899
4.047467
b6a36daa-2ed0-4791-8407-9284400e8708
ikuo-suyama/competitive-programming
abc153/b.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; int main() { ifstream in("abc153/b.txt"); cin.rdbuf(in.rdbuf()); int H, N; cin >> H >> N; vector<int> c(N); rep(i, N) { cin >> c[i]; } ll max = accumulate(c.begin(), c.end(), 0); stri...
ALGO
0.999992
3.946822
e1f7b0e8-b076-42bd-a2b3-0de91660c7e4
Seungchan0325/ioikorea
winter2025/day 7/B.cpp
#include <bits/stdc++.h> using namespace std; const int MAXK = 10050; int K, N, ans[MAXK]; vector<int> graph[MAXK]; bool inStack[MAXK]; int pv, num[MAXK], low[MAXK], scc[MAXK], t; stack<int> s; int Not(int u) { return u^1; } void add_edge(int u, int v) { graph[Not(u)].push_back(v); graph[Not(v)].push_b...
ALGO
0.999883
4.027133
de888ff8-9b83-49f9-8a3e-a91a41b9c394
Ayushi02paul192/Leetcoding
Merge two binary Max heaps - GFG/merge-two-binary-max-heaps.cpp
// { Driver Code Starts // Initial Template for C++ // C++ program to merge two max heaps. #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: vector<int> mergeHeaps(vector<int> &a, vector<int> &b, int n, int m) { // your cod...
ALGO
0.999961
5.065777
cd993bb5-a1b4-4e0c-a20f-24b7af06419f
SimoneDalMedico/BattagliaNavale
nave.cpp
#include "nave.h" void Nave::reset() { std::map<unsigned short int,tpair>::iterator it; caselleNave.clear(); } int Nave::counter() { int count=static_cast<int>(caselleNave.size()); return count; } bool Nave::check_posizione(unsigned short x, unsigned short y) { if(caselleNave.empty()){ re...
ALGO
0.968713
3.61532
bcc8edd3-3150-4039-8023-0a4962720806
richardwei6/Competitive-Programming
VISUAL STUDIO/CodeForces/CodeForces/WayTooLongWords.cpp
/* #include <iostream> #include <algorithm> #include <string> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <functional> #include <cmath> #include <limits> #include <list> #include <memory> #include <stack> #include <iterator> #include <queue> #include <numer...
ALGO
0.999025
4.19678
ff611033-123e-4794-bd38-a3ae5761cdf2
iznilul/leetcode-
editor/cn/[剑指 Offer 15]二进制中1的个数.cpp
//请实现一个函数,输入一个整数(以二进制串形式),输出该数二进制表示中 1 的个数。例如,把 9 表示成二进制是 1001,有 2 位是 1。因此,如果输入 //9,则该函数输出 2。 // // // // 示例 1: // // //输入:00000000000000000000000000001011 //输出:3 //解释:输入的二进制串 00000000000000000000000000001011 中,共有三位为 '1'。 // // // 示例 2: // // //输入:00000000000000000000000010000000 //输出:1 //解释:输入的二进制串 00000000000...
ALGO
0.999307
6.492084
129ee4bf-e1e6-4239-8e7c-cfcdea12e3ac
pepepper/llvm-temple
libc/src/math/generic/remainderl.cpp
#include "src/math/remainderl.h" #include "src/__support/FPUtil/DivisionAndRemainderOperations.h" #include "src/__support/common.h" namespace __llvm_libc { LLVM_LIBC_FUNCTION(long double, remainderl, (long double x, long double y)) { int quotient; return fputil::remquo(x, y, quotient); } } // namespace __llvm_li...
TOOL
0.979359
5.661
5a0c42bc-3cfc-4d51-a799-514e2b886c2c
Keshi-23/OpenGeoSys
ProcessLib/BoundaryConditionAndSourceTerm/NodalSourceTerm.cpp
#include "NodalSourceTerm.h" #include <cassert> namespace ProcessLib { NodalSourceTerm::NodalSourceTerm( std::unique_ptr<NumLib::LocalToGlobalIndexMap> source_term_dof_table, std::size_t const source_term_mesh_id, MeshLib::Mesh const& st_mesh, const int variable_id, const int component_id, Par...
ALGO
0.991709
6.66613
c6690e77-daaf-4d28-975f-1ebd134097a5
LuisEnilton/Maratona
VJudge/Atividade - Two Pointers/E - Vasya and String/dadinho.cpp
// // Created by Luis on 11/07/2023. // #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define optimize ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3fLL #define ALL(x) x.begin(), x.end() #define U...
ALGO
0.999859
4.432195
897d1019-8a9a-4817-b345-9151e83a3072
Anilkumar90386/Data-Structures-And-Alogorithms
Greedy Algorithm/jump_II.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; } int cnt=1; int j=1; for(int i=2;i<n;i++) { if(arr[i]>arr[j]) { cnt++; j=i; } } cout<<cnt; }
ALGO
0.999886
3.68927
f474cf5b-d626-4c6b-a14f-33fc8bc6248d
shreyansh-sinha/Competitive-Programming
CF_global6/B.cpp
#include <bits/stdc++.h> #define int long long int using namespace std; void solve() { int t; cin >> t; while(t--) { int n; cin >> n; if(n < 15) cout << "NO" << '\n'; else { int c = 1; int flag = 0; while(c <= 6) { if((n-c) % 14 == 0) { flag = 1; break; } c++; } if(fla...
ALGO
0.999909
4.935365
fe0947f2-6f66-4a55-9309-a0ab681d3169
YogaAzhari23/Projek-c-
projek10.cpp
#include <iostream> using namespace std; template <class T> void tukar(T &x, T &y) { T tmp; tmp = x; x = y; y = tmp; } int main() { int m = 5, n = 7; double x = 75.89, y = 12.34; cout << "m = " << m << " n = " << n << endl; tukar(m, n); cout << "m = " << m << "n = " << n << endl...
ALGO
0.998489
5.186888
cd542788-6e00-430a-a96c-0b3e6b71c5a2
lostseaway/ProblemSolving
bstprint.cpp
#include <stdio.h> struct Node { int n; Node* left; Node* right; Node(int v, Node* l=0, Node* r=0) : n(v), left(l), right(r) {} }; void insert(Node*& head,int n){ if(head == 0){ head = new Node(n); return; } if(n< head->n) return insert(head->left,n); else return insert(head->right,n); } int find(No...
ALGO
0.999925
3.733658
e7b4e54b-ddb8-4b81-adc7-eab569650982
goldi1027/GT-EHL
boost_1_64_0/libs/spirit/classic/example/fundamental/stuff_vector.cpp
/////////////////////////////////////////////////////////////////////////////// // // This sample demontrates a parser for a comma separated list of numbers // This is the phoenix version of number_list.cpp. // This is discussed in the "Phoenix" chapter in the Spirit User's Guide. // // [ JDG 1/12/2004 ] // ///////...
TOOL
0.970412
7.116484
1e1f3e6e-8d33-4442-a300-ff5a7523cc8c
MohamedAIsmail/LeetCode-Problems
844-backspace-string-compare/844-backspace-string-compare.cpp
class Solution { public: bool backspaceCompare(string s, string t) { stack<char> stS, stT; for (int i = 0; i < s.size(); i++) { if (s[i] == '#' && !stS.empty()) stS.pop(); else if (s[i] != '#') stS.push(s[i]); } for...
ALGO
0.99992
6.217721
9d2eea6f-737c-49a9-9cda-7f6caacebe1a
wangzilong2019/text
作业四/最优加工时间.cpp
#include<stdio.h> #define INF 8888 struct node{ int x, y; //ÿڵһ̨͵ڶ̥ӹʱ }T[7]; int bestf; int f1, f2; int x[7]; int max (int a, int b) { return a>b ? a:b; } void backtrack(int t) { int i, temp, tp; if (t > 6) { bestf = f2; return ; } for (i = t; i <= 6; i++) { f1 = f1 + T[x[i]].x; temp = f2; f2 = max(...
ALGO
0.999736
3.260387
8d4a6778-c7dd-4ce4-8194-9e715e3bb7fb
Arbin97/Data_Structures
Graph/TopologicalSort.cpp
// Topological sorting is only possible in the directed acyclic graphs (DAG) because there exist relations between the node // Topological sorting can be a non-unique and thus can have multiple permutation(topological) of the graph // DFS implementation is used where the Exit time of the DFS calls are taken under con...
ALGO
0.999997
5.632911
8aadbe63-6623-4f9a-877f-9b218c90111f
AhmedSayedMansour/Atbash-cipher
main.cpp
// FCI Programming 1 2018 - Assignment 2 // Program Name: Atbash Cipher.cpp // Last Modification Date: 21/02/2018 // Author1 and ID and Group: AhmedSayedMansour 20170022 // Teaching Assistant: xxxxx xxxxx // Purpose:Cipher #include <iostream> #include <string> using namespace std; int main() { cout<<"Ahlan ya use...
TOOL
0.959225
3.300058
faf3a33c-b109-463f-883e-190fd4590617
shri314/cradle
_AtoFu00/TEMP0000.CPP
//Temporarily stored here on Friday May 18 2001 8:38 PM #ifndef __ATOFU_H #define __ATOFU_H #include <math.h> double add(double x,double y); double sub(double x,double y); double mul(double x,double y); double fdiv(double x,double y); double neg(double x); double inv(double x); double step(double x); double sgn(do...
TOOL
0.962263
4.94385
fec1c0a1-07db-459c-88b5-2091b25a90c5
Soumajith/myCodes
precompute/basicsort.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int a[N]; //merge sort void merge(int l, int r, int mid){ int l_sze = mid - l + 1; int L[l_sze+1]; int r_sze = r - mid; int R[r_sze +1]; for (int i = 0; i < l_sze; i++) { L[i] = a[i+l]; } for (int i = 0; ...
ALGO
0.999981
4.291963
350a6691-96ec-4983-88d0-0c721f137e0b
orsalmon/ORB_SLAM2_GTSAM
Thirdparty/DBoW2/DBoW2/FORB.cpp
#include <vector> #include <string> #include <sstream> #include <stdint-gcc.h> #include "FORB.h" using namespace std; namespace DBoW2 { // -------------------------------------------------------------------------- const int FORB::L=32; void FORB::meanValue(const std::vector<FORB::pDescriptor> &descriptors, FOR...
ALGO
0.993937
6.539618
52cfbda7-d809-4468-a00f-5381d00edb6a
kendryte/kendryte-tensorflow
tensorflow/lite/tools/make/downloads/eigen/doc/examples/Tutorial_BlockOperations_print_block.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::MatrixXf m(4,4); m << 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16; cout << "Block in the middle" << endl; cout << m.block<2,2>(1,1) << endl << endl; for (int i = 1; i <= 3; ++i) { cout << "B...
ALGO
0.992221
3.6853
bc81a2fd-cb83-48c8-8156-335dec200b39
Priyanshi662/DSA
01-Arrays/02-CountInversion.cpp
// https://leetcode.com/problems/count-of-smaller-numbers-after-self/description/ #include <bits/stdc++.h> using namespace std; class Solution{ public: void merge(long long arr[], long long low, long long mid, long long right, long long &ctr){ long long i= low, j=mid+1, k=low, temp[right]; while(i<=mid...
ALGO
0.999924
5.112786
6a9a96f5-7773-4f92-96e7-177462ad9c0d
ghostinthecamera/IGCS-GITC
Tools/IGCSInjector/IGCSInjector/Utils.cpp
using namespace std; BOOL isMainWindow(HWND handle) { BOOL toReturn = GetWindow(handle, GW_OWNER) == (HWND)0 && IsWindowVisible(handle); if (toReturn) { // check window title as there can be more top windows. int bufsize = GetWindowTextLength(handle) + 1; LPWSTR title = new WCHAR[bufsize]; toReturn &= GetW...
TOOL
0.944119
4.734179
0c18803a-251e-4aa8-bc49-b9410a29c1fe
cppisfun/GameEngine
foreign/boost/libs/thread/tutorial/factorial3.cpp
#include <boost/thread/thread.hpp> #include <iostream> const int NUM_CALCS=5; class factorial { public: factorial(int x, int& res) : x(x), res(res) { } void operator()() { res = calculate(x); } int result() const { return res; } private: int calculate(int x) { return x <= 1 ? 1 : x * calculate(x-1); ...
TOOL
0.976094
5.73906
8ba6db9d-82b2-47ca-933c-275788d92905
cofenberg/pixellight
Plugins/PLPhysicsNewton/src/BodyTerrain.cpp
//[-------------------------------------------------------] //[ Includes ] //[-------------------------------------------------------] #include <PLMath/Matrix4x4.h> #include "PLPhysicsNewton/BodyImpl.h" #include "PLPhysicsNewton/World.h" #include "PLPhysicsNewton/BodyTerrain...
ALGO
0.987338
6.464983
d4dd86ba-c1d9-4c68-b9b4-f1c26042928e
Ibrahim-786/CPP_TRAINING
Modern-CPP/day3/generic-wrapper.cpp
#include<iostream> using namespace std; //A traditional C++ generic function template<typename T1, typename T2> void Wrapper(T1& x, T2& y) { cout <<"x=" << x << endl; cout <<"y=" << y << endl; } template<typename T1, typename T2> void Wrapper(T1& x, const T2& y) { cout <<"x=" << x << endl; cout <<"y=...
TOOL
0.925133
6.208597
3e928785-c07c-4759-8fb1-aecff7b1231f
marmik599/Leetcode
Boundary Traversal of binary tree - GFG/boundary-traversal-of-binary-tree.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999891
6.506516
05ec5586-cdbd-4d0f-96d0-8234b1244452
CorvusAOSP-Revived/android_system_core
adb/sockets.cpp
#define TRACE_TAG SOCKETS #include "sysdeps.h" #include <ctype.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <algorithm> #include <chrono> #include <mutex> #include <string> #include <vector> #include <android-base/strings.h> #if !ADB_HOST #include <a...
TOOL
0.942091
5.494438
58aacf26-c8de-491e-82ad-fcd3d66d40a4
MJ-Singh/codechef-solutions
a good problem.cpp
#include<iostream> using namespace std; int max(int i,int j,int a[]) { int m = a[i]; for(int k=i;k<=j;k++) { if(m<=a[k]) { m = a[k]; } } return m; } int main() { int size; cin>>size; int a[size]; for(int i=0;i<size;i++) { cin>>a[i]; } int l,t=0; for(int i=0;i<size;i++) {...
ALGO
0.999962
3.934986
7c3a9628-3f9a-4768-a755-ab2186a5f4b5
15khushirastogi/dsa_leetcode
73-set-matrix-zeroes/set-matrix-zeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { int rows=matrix.size(); int cols=matrix[0].size(); queue<pair<int,int>>q; //find all the occurence of zeros for(int i=0;i<rows;i++){ for(int j=0;j<cols;j++){ if(matrix[i][j]==0...
ALGO
0.999197
6.445278
75eb5f42-2480-4377-aefb-f4f87940532e
splucs/Competitive-Programming
Codeforces/Gym/100784 2013-2014 CTU Open Contest/FS.cpp
#include <bits/stdc++.h> using namespace std; #define MAXN 1009 #define INF 0x3f3f3f3f #define MOD 1000000007 #define FOR(i, n) for(int i = 0; i < n; i++) #define REP(i, n) for(int i = n-1; i >= 0; i--) #define FOR1(i, n) for(int i = 1; i <= n; i++) #define REP1(i, n) for(int i = n; i > 0; i--) #define pb push_back #de...
ALGO
0.999976
3.948235
f2f34dde-6062-4268-b4fe-8b31a0918e21
DarshanRokkad/DSA
08_Stacks/06_Evaluation.cpp
// Evaluation of postfix #include <iostream> #include <stack> using namespace std; bool isOperator(char op) { switch (op) { case '+': case '-': case '*': case '/': case '^': return true; default: return false; } return -1; } int evaluate(int x, int y, char op) {...
ALGO
0.999875
4.690626
5fdb1e80-3465-4f74-b409-dbbe35c9dfc1
imtypist/algorithm-note
codeup/出租车费.cpp
#include <cstdio> int main(){ int n; double price; while(scanf("%d",&n) != EOF){ if(n == 0) break; if(n <= 4){ price = 10; }else if(n > 4 && n <= 8){ price = 10 + (n-4)*2; }else{ int s = n / 8; int r = n % 8; if(r >...
ALGO
0.999646
3.364963
421143a8-d598-49c8-904a-8d06c3243cdd
0x0c/fisheye_calibration
src/fisheye_calib.cpp
#include <string> #include <vector> #include <iostream> #include <opencv2/opencv.hpp> #include <boost/filesystem.hpp> #include "fisheye.hpp" // reads images in a directory std::vector<cv::Mat> read_images(const std::string &directory_path) { std::vector<cv::Mat> images; boost::filesystem::directory_iterator ...
TOOL
0.962833
5.247693
131d3dec-3f4d-4103-9499-cae44a05af24
aipinsui/geos_VS2022
src/geomgraph/index/SimpleSweepLineIntersector.cpp
#include <vector> #include <algorithm> #include <geos/geomgraph/index/SimpleSweepLineIntersector.h> #include <geos/geomgraph/index/SweepLineEvent.h> #include <geos/geomgraph/index/SweepLineSegment.h> #include <geos/geom/CoordinateSequence.h> #include <geos/geomgraph/Edge.h> #include <geos/util.h> using namespace geos...
ALGO
0.999349
6.279016
fdef9862-1444-4bcb-abc2-285b54a6c251
shanberochka/Ravesli
August/h6ex2.cpp
#include <iostream> #include <cstring> #include <algorithm> struct Student { std::string name; int mark; }; void bubbleSort(Student *array, const int &length) { for (int iteration=0; iteration < length-1; ++iteration) { int endOfArrayIndex(length - iteration); bool swapped(false...
ALGO
0.966311
5.1861
44ccdab2-fc55-406e-9aef-668e3d51de44
geke520/oj
PTA_b/002.cpp
// 读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 // 输入格式: // 每个测试输入包含 1 个测试用例,即给出自然数 n 的值。这里保证 n 小于 10^100 // 输出格式: // 在一行内输出 n 的各位数字之和的每一位,拼音数字间有 1 空格,但一行中最后一个拼音数字后没有空格。 // 输入样例: // 1234567890987654321123456789 // 输出样例: // yi san wu #include<bits/stdc++.h> #define long l using namespace std; void pinyin(string n) { int su...
ALGO
0.999826
4.471292
d4488088-a0be-4700-b65b-032eb9121582
mggruending/PG2WiSE22
main.cpp
#include "testDate.h" #include <cstdio> using namespace std; int main() { string s; int d1{}, m1{}, y1{}, d2{}, m2{}, y2{}, n{}; bool b{}; Date date1{Day(0), Month(0), Year(0)}; Date date2{Day(0), Month(0), Year(0)}; do { cout << "1st date: (dd.mm.yyyy): "; if(!(cin >> s)) // if...
ALGO
0.990821
4.28228
b0666c02-b4c6-4fad-8bed-0279e1f99c51
iASL-Gifu/aichallenge2023-integration-final
src/universe/autoware.universe/perception/lidar_apollo_segmentation_tvm/src/cluster2d.cpp
#include <common/types.hpp> #include <lidar_apollo_segmentation_tvm/cluster2d.hpp> #include <autoware_auto_perception_msgs/msg/object_classification.hpp> #include <geometry_msgs/msg/point32.hpp> #include <pcl/PCLPointCloud2.h> #include <pcl_conversions/pcl_conversions.h> #ifdef ROS_DISTRO_GALACTIC #include <tf2_geom...
DATA
0.981087
6.440249
56ad6975-cde3-4261-9111-e9ca55c8675c
Harb2551/DsAlgo
DATA STRUCTURES AND ALGORITHMS/450/GRAPHS/minedgestorevtomakepathfromsrctodes.cpp
#include<bits/stdc++.h> #define ll long long int #define mod 1000000007 #define intmax INT_MAX #define intmin INT_MIN #define ain(a,n) for(auto i=0;i<n;i++){cin >> a[i];} #define ain2(a,n,m) for(auto i=0;i<n;i++){for(auto j=0;j<m;i++){cin >> a[i][j];}} #define aout(a,n) for(auto i=0;i<n;i++){cout << a[i] << ' ';} #d...
ALGO
0.999989
3.970136
e2b7cc60-0034-430b-bb18-f2290719b79d
Ayuti-Pardeshi/Logic-Matters
categoryswitch.cpp
#include <iostream> using namespace std; int main() { int marks = 76; int category; // Categorizing marks into cases if (marks < 50) category = 1; else if (marks >= 50 && marks < 70) category = 2; else category = 3; switch (category) { case 1: ...
TOOL
0.963721
5.233312
0342aec1-451e-4314-a4d1-7af1e186937e
29akku/1_murian
1_sumofnaturalno.cpp
#include<iostream> using namespace std; int sum=0; void fun(int n) { if(n>0) { sum+=n; fun(n-1); } } main() { int n; cout<<"sum of first N digit natural number"<<endl<<"(input N): "; cin>>n; fun(n); cout<<endl<<"sum is : "<<sum; } /* #include<iostream> using namespace std; int fun(int n) { if(n>0) {...
ALGO
0.999839
4.014837
0c6d37e2-0806-4ed6-9996-2b248c151e52
monp97/cpp
recursion.cpp
#include<iostream> using namespace std; int add(int); int main() { cout<<"enter ten numbers"; int s=0; int sum=add(s); cout<<sum; return 0; } int add(int s) { int static n=1;int h; int n1; if(n==10) return s; if(n<=10) { cin>>n1; n++; } s=s+n1; ...
ALGO
0.988052
3.026396
a94984b3-960c-438b-a246-f037dff73e2c
ishandutta2007/codeforces
yuukakazami/normal/547/E.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <vector> using namespace std; const int MAX_N = int(2e5) + 10; const int MAX_Q = int(5e5) + 10; const int MAX_LEN = MAX_N * 2; struct State { State*suf, *go[27], *nxt; vector<State*> child; int rt, l, r; int...
ALGO
0.999892
3.955953
dca10a35-82f3-4683-965b-648f99a2b0fd
raincross7/code-similarity
codes/train_code/problem421/problem421_259.cpp
#include <bits/stdc++.h> #define sz(arr) (int)(arr).size() #define rng(arr) arr.begin(), arr.end() #define show(x) cout << #x << " = " << x << endl; using namespace std; typedef long long int ll; void _cin() {} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail) { cin >> head; _cin(forward...
ALGO
0.99997
4.272975
4e221f43-809c-473b-9ba7-70157efa7534
menaehab/Codeforces-Solutions
0 - 1000 problems/binary search STL.cpp
#include <iostream> #include <bits/stdc++.h> #include <vector> #include <algorithm> #include <cmath> #include <map> #include <iomanip> #include <string> #include <set> #include <queue> #include <unordered_map> #include <unordered_set> #define speedup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long ...
ALGO
0.999902
5.014613
1023faa1-8cd1-4660-9734-02c4218735ea
Hauwaujah/homework-2
transpose matrix.cpp
#include <iostream> #include <cstdlib> #include <ctime> const int ROWS = 3; const int COLS = 3; void generateRandomMatrix(int matrix[ROWS][COLS]) { srand(time(0)); // Seed the random number generator for (int i = 0; i < ROWS; i++) { for (int j = 0; j < COLS; j++) { matrix[i][j] = rand() %...
ALGO
0.999653
6.58863
bf2472b7-8e1a-4a8a-9824-e1f31ad2aee9
crisacc/TODOLIST
TODOLIST/TodoList.cpp
// // Created by Cristiano on 16/10/2024. // #include "TodoList.h" #include <iostream> #include <algorithm> #include <fstream> using namespace std; void TodoList::addActivity(const Activity &activity) { activityList.push_back(activity); markAsModified(); } void TodoList::deleteActivity(int index) { if(i...
TOOL
0.980472
6.111769
f2dbd677-8a85-4a3e-a77f-f7db873b62d7
Aryan810/programming
learn/learn_cpp/codeforces/1000/k_sort.cpp
#include <bits/stdc++.h> #define lli long long int #define vi vector<int> #define vii vector<int>::iterator #define vllii vector<lli>::iterator #define vlli vector<lli> using namespace std; lli logic(vlli & a){ bool inc = 1; vector<lli> b(a.size()); lli recent_max = a[0]; for (int i=0;i<a.size();...
ALGO
0.999639
4.34614
65732509-1e05-4c4e-ad7d-bdf0bdca577c
hafijul233/Algorithm-Design
Sorting/Quick Sort.cpp
#include <iostream> using namespace std; void exchange(int* x, int* y){ int temp = *x; *x = *y; *y = temp; } int Parition(int elements[], int l, int h){ int pivot = elements[h]; int i = (l-1); for(int j=l; j <= h-1; j++){ if(elements[j] <= pivot){ i=i+1; exchange(&elements[i], &element...
ALGO
0.999975
4.746028
d929c23a-0bab-4b31-9b29-28e6d33b4338
flowjiyun/algorithm_study
src/woongjae/0x02/BOJ1000.cpp
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; cout << a+b; }
ALGO
0.980846
3.199973
88bbac19-dc1d-48e1-b181-f74e37db4393
RahulAwasthi314/problem-solving
hackerrank/Algorithms/implementation/climbingTheLeaderBoard.cpp
/** * @file climbingTheLeaderBoard.cpp * @author Rahul Awasthi (<EMAIL>) * * @brief * try out the problem here: * https://www.hackerrank.com/challenges/climbing-the-leaderboard/ * */ vector<int> climbingLeaderboard(vector<int> ranked, vector<int> player) { vector<int> ans; set<int> unique(ranked.beg...
ALGO
0.999959
4.838145
0582c7ab-24f4-4503-92cc-64c83de411aa
anubhav100rao/CompettiveProgramming
DP/max_diff_btw_z_o.cpp
#include <bits/stdc++.h> using namespace std; #define dbg(x) cerr<<#x<<" = "<<x<<endl int countMaxDiffZeroOne(string &str) { if(!count(str.begin(), str.end(), '0')) return -1; int n = str.size(); int ans = 0; int curr = 0; for(char ch: str) { if(ch == '0') { curr++...
ALGO
0.999925
4.782807
338f90e2-8a7d-4d25-882c-f39ee7ae796f
shivamjha0306/Codes
Hackerrank/Skywatcher.cpp
#include <bits/stdc++.h> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ float t,c,n,x,y; cin>>n; t=n; float m; c=0; while(n--){ cin>>x>>y; if(x>0 && y>0){ c++; } } m=c/t; cout<<setp...
ALGO
0.998094
4.148031
719c3054-3ad2-47ca-98bd-c6dc96dc5ce5
swyoo1121/C-CPP
baekjoon/2512.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N, input, M, sum = 0, result; int low, mid, high; vector<int> v; cin >> N; for (int iter = 0; iter < N; iter++) { cin >> input; v.push_back(input); sum += input; } ...
ALGO
0.999992
4.759968
6a1969b0-4b99-4ca5-80b4-0f04d6b89b15
ishandutta2007/codeforces
nuip/normal/992/B.cpp
#include <string> #include <vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<functional> #include<list> #include<deque> #include<bitset> #include<set> #include<map> #include<unordered_map> #include<unordered_set> #include<cstring>...
ALGO
0.999962
3.446361
3f810d78-8f59-4943-b8f6-e11b1cbf74a7
MuratBolatoglu/LeetCode-Answers
0100-same-tree/0100-same-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.999979
6.368249
2b35fa6c-c016-44f9-a3a0-c79052300cca
ClementIV/subgraphNew
subgraphNew/CFL.cpp
#include "CFL.h" set<int> core; set<int> forest; set<int> leaf; extern map<int, GNode>GgraphNode; extern map<int, GEdge>GgraphEdge; extern map<int, qNode>QgraphNode; extern map<int, qEdge>QgraphEdge; //map<int, set<int>>CoreTree; map<int, set<int>>ForestTree; map<int, set<int>>LeafTree; map<int, set<int>>CoreGraph; //m...
ALGO
0.999518
3.233654
69080868-58a7-4d33-bf34-9c7c1a646819
Esperanzalukas/my-abacus-develop-fork
source/module_io/write_dos_lcao.cpp
#include "write_dos_lcao.h" #ifdef __MPI #include <mpi.h> #endif #include <sys/time.h> #include <vector> #include "cal_dos.h" #include "module_base/global_function.h" #include "module_base/global_variable.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/wavefunc.h" #include...
TOOL
0.958054
5.156374
3862b11a-1b0e-4d1c-8036-4ae7c94f4796
modgeosys/geos
source/geom/Geometry.cpp
#include <geos/geom/Geometry.h> #include <geos/geom/GeometryFactory.h> #include <geos/geom/PrecisionModel.h> #include <geos/geom/CoordinateSequence.h> #include <geos/geom/GeometryComponentFilter.h> #include <geos/geom/GeometryFilter.h> #include <geos/geom/GeometryCollection.h> #include <geos/geom/Point.h> #include <geo...
TOOL
0.917845
6.823424
1c044b85-bc05-420d-9156-2921389180bf
Peilin-Yang/leetcode
c++/unique_word_abbreviation.cpp
#include<iostream> #include<vector> #include<unordered_map> #include<unordered_set> using namespace std; class ValidWordAbbr { private: unordered_map<string, unordered_set<string> > m; public: ValidWordAbbr(vector<string> &dictionary) { for (int i = 0; i < dictionary.size(); i++) { int ss ...
ALGO
0.997739
5.773613
48ed299e-5bb0-4254-8010-20bf7458981d
thegamer1907/Code_Analysis
Graphs/1353.cpp
#include<iostream> using namespace std; main() { int n;cin>>n; int t;cin>>t; bool answer=false; int location=1; int a[n]; for (int i=1;i<n;i++) cin>>a[i]; for (int i=0;i<n;i++) { if (location==t) { answer=true;break; } ...
ALGO
0.999985
3.39686
04e661b9-5c44-419c-857d-6707b1f20ce2
willbraycotton/CSE-232
Week11/CensoredCopy.cpp
#include "CensoredCopy.hpp" #include <vector> #include <ostream> #include <istream> #include <sstream> #include <set> #include <map> #include <string> #include <iostream> #include <algorithm> using std::string; using std::istringstream; using std::set; using std::ostream; using std::map; using std::endl; using std::cou...
TOOL
0.981509
4.934436
9eee07c6-6c73-4b26-8e5f-0cc605cbd72d
ramyaa412/Booklist
Homework5_functions/Booklist_Parthasarathy.cpp
// // booklist_Parthasarathy.cpp // // Class Definition // // #include<iostream> #include<iomanip> #include "booklistparthasarathy.h" using namespace std; Booklist::Booklist() { arraysize = 0; flag = 0; maxvalue = 20; } void Booklist::insert(double list[], int new_element) { arraysize++; //Checking to see th...
ALGO
0.999842
3.597792
7cd39a7e-ef42-4cbf-8b47-36cfd95af335
LittleYang0531/CQ-NOIP-2021
CQ-0257/variance/variance.cpp
#include <bits/stdc++.h> using namespace std; int n; int ans=0x3f3f3f3f; double a[401]; void ver() { double v_,s=0; for (int i=1;i<=n;i++) s+=a[i]; v_=s/(double)n; s=0; for (int i=1;i<=n;i++) s+=(a[i]-v_)*(a[i]-v_); s*=n; ans=min(ans,(int)s); } void bt() { for (int i=2;i<n;i++) { int u=a[i]; a[i]=a[i-1]+a[...
ALGO
0.9998
3.66544
81df23e0-a6c5-4d7b-88d1-1ee9991cc725
shadmanrafid/Leetcode
Daily_temperature-stack.cpp
class Solution { public: vector<int> dailyTemperatures(vector<int>& T) { vector<int> result; stack< pair<int,int> >st; pair<int,int> a; int first,second; int len = T.size(); int ret[len]; int i; for(i =0;i<len;i++) { ret[i] = INT_MA...
ALGO
0.999926
5.712016
87b6e5b1-f98e-4049-9dc8-872be473e439
kabsmeiou/cp-solutions
Educational Codeforces/Round 160/B.cpp
#include <bits/stdc++.h> using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; while (T--) { string s; cin >> s; int zeroes = 0, ones = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == '0') zeroes += 1; ...
ALGO
0.999611
5.039107
9a70a0cc-cee6-445b-80c1-cdee4906bf93
SebastianMestre/Competitive-Programming
ICPC/TCArg2022/d7/b.cpp
#include <bits/stdc++.h> using namespace std; #define forr(i,a,b) for(int i=(a);i<(b);++i) #define forn(i,n) forr(i,0,n) #define dforr(i,a,b) for(int i=(b)-1;i>=(a);--i) #define dforn(i,n) dforr(i,0,n) #define db(v) cerr<<#v" = "<<(v)<<'\n' #define vecp(v) cerr<<#v<<" = "; for(auto ee:v)cerr<<ee<<' '; cerr<<'\n' #defi...
ALGO
0.999967
3.735382
b0c5c34a-1808-4414-bf56-31ffcb83cda5
ockie1729/paillier-secret-computation
server.cpp
#include "sumall.h" #include "comm.h" #include<sys/time.h> #include <unistd.h> //#define DEBUG #ifdef DEBUG #define DBG_PRT(...) printf(__VA_ARGS__) #else #define DBG_PRT(...) #endif double get_wall_time () { struct timeval time; if (gettimeofday (&time, NULL)) { return 0; } return (doubl...
WEB
0.928079
4.018849
651079c9-1d2b-4ae1-abac-31c3a44b401f
2anesh/DSA-PRACTICE
Find Common Nodes in two BSTs.cpp
class Solution { public: //Function to find the nodes that are common in both BST. void helper(Node *root,unordered_map<int,int>&mp) { if(root) { helper(root->left,mp); mp[root->data]++; helper(root->right,mp); } } void helper2(Node *root2, un...
ALGO
0.999954
5.3118
ea40f773-66e4-49e0-a328-787635c87239
rzando-org/leetcode
lcp/LCP 02. 分式化简/Solution.cpp
class Solution { public: vector<int> fraction(vector<int>& cont) { function<vector<int>(int)> dfs = [&](int i) { if (i == cont.size() - 1) { return vector<int>{cont[i], 1}; } vector<int> next = dfs(i + 1); int a = next[0], b = next[1]; ...
ALGO
0.999925
4.996248
2a5058b8-cb52-4029-99fe-262e88314cf9
sinian666/codes_41_1
cpp_副本/chapter_tree/binary_search_tree.cpp
/** * File: binary_search_tree.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 二叉搜索树 */ class BinarySearchTree { private: TreeNode *root; public: BinarySearchTree(vector<int> nums) { sort(nums.begin(), nums.end()); // 排序数组 ro...
ALGO
0.999936
6.349885
a509b09e-b976-49ef-a61a-07e7316b9fe6
kartnagrale/Summer-Camp-ICPSC
div 2 A/Desorting.cpp
//https://codeforces.com/problemset/problem/1853/A #include<bits/stdc++.h> using namespace std; using ll = long long; #define M_PI=3.14159265358979323846 #define vi vector<int> #define vll vector<ll> #define mp make_pair #define pb push_back #define endl '\n' #define setbits(x) __builtin_popcountll(x) #define ff first...
ALGO
0.999829
4.776439
78cde031-420d-403d-9883-fcd8af532192
gimddanggu/codetree-TILs
250413/문자열의 특정 위치 찾기 2/find-specific-location-in-spring-2.cpp
#include <iostream> using namespace std; int main() { // Please write your code here. string arr[5] = {"apple", "banana", "grape", "blueberry", "orange"}; char a; int count = 0; cin >> a; for (int j = 0; j < 5; j++) { for (int i = 2; i <= 3; i++) { if (arr[j][i] == a) ...
ALGO
0.998073
4.443813
e41a31f3-f148-4a61-ab97-dac85324ec48
gabriel-vanca/Infoarena
Algorithms/eratosthenes_sieve/ciur.cpp
#include <bitset> #include <cassert> #include <cmath> #include <cstring> #include <fstream> #include <iostream> #include <unordered_map> #ifdef PROFILING #include <chrono> #endif constexpr char INPUT_FILE_NAME[] = "ciur.in"; constexpr char OUTPUT_FILE_NAME[] = "ciur.out"; class IO_Base { protected: IO_B...
ALGO
0.999533
6.076635
817b18a6-a8e1-456a-a914-4002dbe8b279
ishandutta2007/codeforces
melusine/normal/1704/A.cpp
#include<iostream> #include<cstdio> using namespace std; inline int read() { int n=0,f=1,ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') { n=n*10+ch-'0'; ch=getchar(); } return n*f; } char s[200005],t[200005]; int main() { int ttt,n,m; ttt=read(); for(i...
ALGO
0.999974
3.405731
ed00fff0-be95-4829-b10f-b4f6d80b92a5
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/distribute-repeating-integers-Solution.canDistribute/177899_+Info.cpp
xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) { xmlParserCtxtPtr ctxt = NULL; xmlDocPtr ret; zend_bool old_allow_url_fopen; /* xmlInitParser(); */ old_allow_url_fopen = PG(allow_url_fopen); PG(allow_url_fopen) = 1; ctxt = xmlCreateFileParserCtxt(filename); PG(allow_url_fopen) = old_allow_...
ALGO
0.990314
4.270909
71fb55eb-de3d-447f-8ee1-31cfa0664f33
prakashharsh009/DSA-DONE_AND_DUSTED
Amazon SDE Most Asked Questions Pack/Arrays/3. Second Max.cpp
int print2largest(int arr[], int n) { // code here int largest = -1, res = -1; for (int i = 0 ; i < n ; i++){ largest = max(largest, arr[i]); } for (int i = 0; i < n ; i++){ if(arr[i] != largest){ res = max(res, arr[i]); } } ...
ALGO
0.999733
3.654171
a1020e41-064b-4cf6-ae25-6983403d683f
fzi-forschungszentrum-informatik/fzi-driver
TrafficAgent/util/Path.cpp
#include <algorithm> #define _USE_MATH_DEFINES #include <limits> #include <math.h> #include "LinearInterpolation.h" #include "MathUtil.h" #include "Path.h" FZIDriver::util::Path::Path(std::vector<FZIDriver::util::Vector2d<double>> centerLine) { // calculate the grid of s coordinates for the path // ans start...
ALGO
0.997345
3.788641
6ea2a72f-c86f-4c94-8f63-c41d5b6c4539
vedant-konade/Cpp_Programming
Loops/Loops5.cpp
//Write a program to print all odd numbers till n. #include<iostream> using namespace std; int main(){ int n; cout<<"Enter a number n: "; cin>>n; cout<<"Odd numbers till n are: "; for(int i=1;i<=n;i++){ if(i%2==0){ continue; } cout<<i<<","; } return 0; }...
ALGO
0.996838
4.218623
3d4d43db-4c0d-494c-a5b1-1e646fa201b6
omkaranu04/CP_DSA
AtCoder/abc385/A.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll a, b, c; cin >> a >> b >> c; if ((a + b == c) || (a + c == b) || (b + c == a) || ((a == b) && (b == c))) cou...
ALGO
0.999986
4.372213
f912ea1a-ca6d-415f-aa49-35f99c97de81
heavenMOJANG/ICPC
.history/Codeforces/CF2020/C_20241023192356.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include <bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; int calc(int x, int y) { return x & y; } void solve() { int b, c, d; cin >> b >> c >> d; int a{}; for (int i = 0; i...
ALGO
0.998934
4.484277
efb2052d-a7b6-46ef-accc-a4aee3b393ee
sure-trust/G1_DSA_CPlusPlus
Mini Projects/Jaswanthi/SURETrust_Assignment-5/TheCelebrityProblem.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: //Function to find if there is a celebrity in the party or not. int celebrity(vector<vector<int> >& M, int n) { for(int i=0;i<n;i++) { int cnt=0; for(int j=0;j<n;j++) { ...
ALGO
0.99967
5.79811
ac0b7de7-11bc-4299-b71c-425d096c2de8
mpoullet/NumCSE
Assignments/Codes/ODE/OrdNotAll/solutions/order_not_all.cpp
#include <iostream> #include <iomanip> #include <vector> #include <Eigen/Dense> #include "rkintegrator.hpp" using namespace Eigen; /*! * \brief errors Approximates the order of convergence of a scheme. * The scheme is a Runge Kutta scheme defined by A and b when applied * to the first order system y'=f(y), y(0)=...
ALGO
0.999426
6.242876
9a9f2f53-130a-42e8-903d-9735ec40922e
reverg/PS
boj/2609.cpp
#include <iostream> using namespace std; int main() { int a, b; cin>>a>>b; int mul=a*b; if(a<b) { int tmp=b; b=a; a=tmp; } while(a%b!=0) { a=a%b; int tmp=b; b=a; a=tmp; } cout<<b<<endl<<mul/b; return 0; }
ALGO
0.999937
4.166766
65fa6285-e660-4907-a7c1-de07fa53d1fc
king258436/algorithm
baekjoon/집합.cpp
#include <stdio.h> #include <string.h> int S[21];// S[0] 은 버리는걸로. void rmove(int x){ S[x]=0; } void add(int X){ S[X]=1; } int check(int x){ if(S[x]==1) return 1; else return 0; } void toggle(int x){ if(S[x]==1) S[x]=0; else S[x]=1; } void all(void){ for(int i=1;i<21;i++){ S[i]=...
ALGO
0.998251
4.365319
92aa0064-e704-4fed-8b04-48e01fa3d5f4
Prakhar-FF13/Competitive-Programming
CodeForces/514A - Chewbecca and Number.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string str; cin>>str; for(int i = 0 ; i < str.length() ; i++){ int x = str[i] - '0'; int y = 9 - x; if(y < x){ if(y != 0) str[i] = y + '0'; else if(i!=0) str[i] = y + '0'; } } cout<<str;...
ALGO
0.999893
4.576636
3a37f317-c359-4d97-8db2-8123ef7a1871
SymbolixAU/flatgeobufr
src/packedrtree.cpp
#include "packedrtree.h" namespace FlatGeobuf { void Rect::expand(const Rect& r) { if (r.minX < minX) minX = r.minX; if (r.minY < minY) minY = r.minY; if (r.maxX > maxX) maxX = r.maxX; if (r.maxY > maxY) maxY = r.maxY; } Rect Rect::createInvertedInfiniteRect() { return { std::numeric_limi...
ALGO
0.999126
6.356662
f9f63cd3-c7cf-4f89-9670-29c2d15df13a
yzzupgo/MFTCG
Data/abc127_a/goemon023/ac/5660940.cpp
#include <bits/stdc++.h> using namespace std; main(){ int A,B,money; cin >> A >> B ; if( A >= 13){ money = B; } else if( 12 >= A && A >= 6){ money = B/2; } else money = 0; cout << money << endl; }
ALGO
0.994745
3.23263
e711a9c7-48af-4160-b2d1-f86a4c66bbba
rajyan/AtCoder
others/Wizzards/Cver2.cpp
//#include <iostream> //#include <string> //#include <vector> //#include <utility> // //using namespace std; // //int main() { // // int num_box, num_spell; // // cin >> num_box >> num_spell; // // string box_letter; // // cin >> box_letter; // // vector <pair<char, char>> spell(num_spell); // for (int i = 0; i < num_s...
ALGO
0.999545
3.035849
f009000d-4983-429d-b35c-1d1fe4f1d51a
fmi-lab/up-2017-inf-group4
Resources/10_11_2017.cpp
#include <iostream> int main() { { int a = 5, b = -10; { int t = a; a = b; b = t; } { a = a + b; b = a - b; a = a - b; } { a ^= b; b ^= a; a ^= b; } } { int number; std::cin >> number; int temp = 1; int newNumber = 0; while (number > 0) { int lastDigit = num...
ALGO
0.999938
4.700694
e1892465-d49d-4c45-a6de-97253bcd2a91
ssk4988/Coding
CodeForces/922div2/d.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>; using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; using vpi = vector<pi>; using vpl = vector<pl>; using vpd = vector<pd>; using vv...
ALGO
0.999915
3.781736
9db5425f-82f2-4236-b3d3-e1c4dd61c9f1
zzz-00/CPP-example-code
04/04.14address/address.cpp
//address.cpp -- using the & operator to find addresses #include <iostream> int main() { using namespace std; int donuts = 6; double cups = 4.5; cout << "donuts value = " << donuts; cout << " and donuts address = " << &donuts << endl; cout << "cups value = " << cups; cout << " and cups add...
TOOL
0.98655
5.213704
fe6efb88-0b91-45ff-9d78-471d7029db33
Nensi1311/Leetcode-Solution
0954-maximum-sum-circular-subarray/0954-maximum-sum-circular-subarray.cpp
class Solution { public: int maxSubarraySumCircular(vector<int>& nums) { int maxi = INT_MIN, current = 0; for(int i=0; i<nums.size(); i++){ current += nums[i]; maxi = max(current, maxi); if(current<0){ current=0; } } in...
ALGO
0.999971
6.016605