uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
8c554d80-1ef7-497d-9855-cbb3ecbc9b91
DevashishPathrabe/LeetCode
LeetCode Solutions/LeetCoding Challenge/March 2020 LeetCoding Challenge/Remove Palindromic Subsequences.cpp
class Solution { public: int removePalindromeSub(string s) { if(s == ""){ return 0; } for(int i=0, j=s.size()-1; i<j; i++, j--){ if(s[i] != s[j]){ return 2; } } return 1; } };
ALGO
0.999368
6.45928
724377b6-d0a1-4879-9aeb-551b5d17bb42
XiaotaoGuo/code_collections
cpp/cpp-learnings/templates/function_templates/example1.cpp
#include <stdio.h> int getSum(int* arr, int N) { int sum = 0; for (int i = 0; i < N; ++i) { sum += arr[i]; } return sum; } double getSum(double* arr, int N) { double sum = 0; for (int i = 0; i < N; ++i) { sum += arr[i]; } return sum; } // template <typename T> // T g...
ALGO
0.997256
5.588342
1f7cf79c-d789-464e-be26-fe455322fd8d
scloke/SegTest
Supporting Files/Software/bgslibrary-master/src/algorithms/LBFuzzyGaussian.cpp
#include "LBFuzzyGaussian.h" #if CV_MAJOR_VERSION >= 2 && CV_MAJOR_VERSION <= 3 using namespace bgslibrary::algorithms; LBFuzzyGaussian::LBFuzzyGaussian() : IBGS(quote(LBFuzzyGaussian)), sensitivity(72), bgThreshold(162), learningRate(49), noiseVariance(195) { debug_construction(LBFuzzyGaussian); initLoad...
ALGO
0.862948
6.2228
097c62f0-b942-4108-bd43-1123e7319063
ishandutta2007/codeforces
evilbuggy/normal/1554/E.cpp
#include <bits/stdc++.h> using namespace std; const int THR = 15; const int N = 100005; const int mod = 998244353; const int root = 15311432; const int iroot = 469870224; vector<int> g[N], fac[N]; int base[1 << 22], ibase[1 << 22]; int dp0[N], dp1[N], deg[N], ans[N], posib[N]; inline void add(int &x, int y){ x += y...
ALGO
0.9996
5.02441
f3488a49-c3c0-493e-9434-260c05b72d5e
Sumra-siddiqui/Sumra
4..how many time a number occur.cpp
#include<iostream> using namespace std; int main() { int arr[5]; for(int i=0;i<5;i++) { cout<<"Enter value "<<i+1<<": "; cin>>arr[i]; } cout<<"values are "; for(int i=0;i<5;i++) { cout<<arr[i]<<"\t"; } int no,count; cout<<"Enter a number to check how many time that number repeat : "; cin>>no; for(int ...
ALGO
0.998148
3.172256
64854d12-01dd-454f-9944-a032ab552f28
renhaofan/Source-Archive
OpenCV/opencv-4.5.2/3rdparty/carotene/src/remap.cpp
#include "remap.hpp" namespace CAROTENE_NS { #ifdef CAROTENE_NEON namespace internal { void remapNearestNeighborReplicate(const Size2D size, const u8 * srcBase, const s32 * map, u8 * dstBase, ptrdiff_t dstStride...
ALGO
0.969393
6.870541
988fed69-627d-4ca6-ae3c-d4f390f3c5ec
Maulin-sjsu/DataStructuresPractise
LeetCodeProblem/LinkedLists/SumOfTwoLists.cpp
#include <iostream> using namespace std; struct Node { int data; struct Node* next; Node(int data) { this->data = data; next = NULL; } }; void printLinkedList(Node *head) { if(head == NULL){ return; } while(head != NULL) { cout << head->data...
ALGO
0.999809
5.290914
2d7517b0-32b5-44ca-b3ac-d5ae9f3567d2
ishandutta2007/codeforces
arthurpd/normal/1066/C.cpp
#pragma once #include <bits/stdc++.h> using namespace std; template <class TH> void _dbg(const char *sdbg, TH h) { cerr << sdbg << '=' << h << endl; } template <class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) { while (*sdbg != ',') cerr << *sdbg++; cerr << '=' << h << ','; _dbg(sdbg + 1, a...)...
ALGO
0.999833
4.550816
cf405d48-79c0-47e2-8256-5a4d8e791710
Abhijithsr13/Leetcode-Problems
0199-binary-tree-right-side-view/0199-binary-tree-right-side-view.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.999927
6.019879
648c699e-2e95-4733-ad3f-89406341a0ab
green-tea-sigphon/dwa_planner
dwa_planner_node.cpp
#include "dwa_planner/dwa_planner_node.hpp" #include "dwa_planner/dwa_planner_component.hpp" #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" #include "tf2_ros/static_transform_broadcaster.h" #include "tf2_ros/transform_broadcaster.h" #include <chrono> #include <cmath> #include <limits> long num_existed_markers = 0...
TOOL
0.934832
5.119048
3cb8d2bc-cab1-414d-bf1e-94711ae4c15b
shivam0912/LinkedList
ReverseRecursive.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node *next; }; Node *head; void createList(int val) { Node *temp,*newNode; newNode = new Node(); temp = NULL; newNode->data = val; newNode->next = NULL; if(head == NULL){ head =newNode; re...
ALGO
0.999803
5.184669
96eb02de-18bc-4a2f-898d-b415e0ee1852
DmitryMnk/Skillbox_C-
10_Installation_of_IDE/calc.cpp
#include <iostream> main() { std::cout << (-6) * (-6) - 4 * (-1) * (-9); }
ALGO
0.995404
3.034474
8e3da847-4d23-419f-b91f-70d2cc994d0b
NumanAnees/Leetcode-Solution
Linked List/Flatten a LinkedList/index.cpp
Node* mergeTwoSortedLists(Node *a,Node *b){ Node *temp=new Node(0); Node *res=temp; while(a!=NULL and b!= NULL){ if(a->data<b->data){ temp->bottom=a;//store new temp. temp=temp->bottom;//move temp. a=a->bottom;//move a as well. }else{ temp...
ALGO
0.999728
3.618662
b921472e-511e-4f06-a0b4-3c6a03aa10fa
sabilafirdias/0192_DoubleLinkedList
DoubleLinkedList/DoubleLinkedList.cpp
#include <iostream> #include <string> using namespace std; struct Node { int noMhs; string name; Node* next; Node* prev; }; Node* START = NULL; void addNode() { Node* newNode = new Node(); //step 1: create a new node cout << "\nEnter the roll number of the student: "; cin >> newNo...
ALGO
0.998898
4.261366
b94ddc39-ea28-4ef8-82b8-87bfe8ba2f47
manasvini-88049/manna1
bst_post.cpp
#include <bits/stdc++.h> using namespace std; class TreeNode { // tree node is defined public: int val; TreeNode* left; TreeNode* right; TreeNode(int data) { val = data; left = NULL; right = NULL; } }; void postorder(TreeNode* root) { //base case if (root == NU...
ALGO
0.999986
5.571866
3ad73bff-e38e-44d3-a433-8039aa88a381
Arpit-AD/LeetCode
923-3sum-with-multiplicity/923-3sum-with-multiplicity.cpp
class Solution { public: int threeSumMulti(vector<int>& arr, int target) { unordered_map<int, int> m; int res = 0, mod = 1e9 + 7; for (int i = 0; i < arr.size(); i++) { res = (res + m[target - arr[i]]) % mod; for (int j = 0; j < i; j++) { m[arr[i] + a...
ALGO
0.999934
6.195098
32a3727f-5769-4bc7-a0d5-4929612322d7
lyx997/RLCourseHW
CarND-test/src/Eigen-3.3/bench/sparse_cholesky.cpp
// #define EIGEN_TAUCS_SUPPORT // #define EIGEN_CHOLMOD_SUPPORT #include <iostream> #include <Eigen/Sparse> // g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/lin...
ALGO
0.987356
4.173108
e0a17318-fa2b-478b-bacc-bed80160fba7
ishandutta2007/codeforces
kokokostya/normal/763/A.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> c; vector< vector<int> > g; vector<bool> used; vector<int> ok; vector<int> up; void dfs(int v) { used[v] = 1; ok[v] = c[v]; for (int i : g[v]) { if (!used[i]) { dfs(i); if (ok[i] != ok[v]) ok[v] = -1; } } r...
ALGO
0.999982
4.050274
44de8294-be77-4b80-987e-108a006d1edd
TanYongF/algorithm
2022-3-19/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define ms(s,val) memset(s, val, sizeof(s)) const int inf = INT_MAX; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), l...
ALGO
0.998829
4.239771
8e3050ac-6d19-449b-a269-130176660832
pranav-satheesh/Numerical_Methods_Git_Page
ODE advanced/Lorentz.cpp
#include<iostream> #include<math.h> #include<fstream> #include "rkroutines.h" using namespace std; void loreq(double X[],double t, double param[],double deriv[]) { double x = X[0]; double y = X[1]; double z = X[2]; double r = param[0]; double sigma = param[1]; double b = param[2]; deriv[0] = sigma*(y-x); deriv[1] = ...
ALGO
0.999989
3.608627
6696590f-2a9f-4584-98bb-ce96b0aa79d3
mmike73/UbbCsRo
a1s2/grafuri/algoritmi_practice/args/Conversii.cpp
#include <fstream> using namespace std; ifstream f("intrare.in"); ofstream g("iesire.out"); int n, nod1, nod2; int matAd[105][105], matInc[105][105], matInc2[105][105], listaVec[105][105]; int main() { f>>n; int x=n; int k=1; while(x) { f>>nod1>>nod2; matAd[nod1][nod2]=matAd[nod2][nod1]=1; ...
ALGO
0.999957
3.624653
1abc849c-c489-4b97-998e-2271ca7df9ce
Ragulraj1836/Data-Structure
Linked List/basic circular.cpp
#include<iostream> using namespace std; class node {public: node* next; int data; }; void insertatlast(int val,node*& head) { node* newnode=new node(); newnode->data=val; if(head==NULL) { head=newnode; head->next=head; } node* temp=head; while(temp->next!=head){ t...
ALGO
0.9999
3.517653
a8cd8eb8-ffe7-4b21-922d-088fa13c2843
sarvex/leetcode-free-basic
solution/2200-2299/2208.Minimum Operations to Halve Array Sum/Solution.cpp
class Solution { public: int halveArray(vector<int>& nums) { priority_queue<double> q; long long s = 0; for (int& v : nums) { s += v; q.push(v); } double d = s / 2.0; int ans = 0; while (d > 0) { double t = q.top() / 2; ...
ALGO
0.999887
5.823159
560d8563-34e6-4280-b9c5-458b17f4f118
lssfau/walberla
tests/pde/JacobiTest.cpp
#include "blockforest/Initialization.h" #include "blockforest/communication/UniformBufferedScheme.h" #include "core/Abort.h" #include "core/debug/TestSubsystem.h" #include "core/math/Constants.h" #include "core/mpi/Environment.h" #include "core/mpi/MPIManager.h" #include "field/AddToStorage.h" #include "field/GhostLa...
ALGO
0.937205
4.447331
c957d5e2-24c6-419a-9fbd-08ae81226dd2
AshrafulHaqueToni/Lightoj-solution
lightoj 1134.cpp
// Created by ash_98 #include<bits/stdc++.h> using namespace std; #define mx 100005 #define ll long long #define mod 1000000007 int ar[mx]; char ch[mx]; int n,m,k,ii; void solve() { map<int,int>mp; mp[0]++; scanf("%d%d",&n,&m); ll re=0,sum=0; for(int i=1;i<=n;i++) { int x; scanf(...
ALGO
0.999643
3.761358
a2e21772-55ae-403c-bcae-18766c515aaf
igorpontes/SPOJ-BR
PRIMO.cpp
#include <iostream> #include <cmath> #include <math.h> using namespace std; int main () { int q=0,c=0; double n, cond; cin>>n; cond = pow(2.0, 31.0); if (n<cond && n>-cond) { n = abs (n); switch ((int) n) { case 0: cout << "nao"; return 0; break; case 1: cout << "nao"; return 0; ...
ALGO
0.999977
3.821382
31cb3229-025c-431e-b2b5-5e7134561b3c
everythingapplejj/JJ-s-LeetCode-Solutions
225-implement-stack-using-queues/225. Implement Stack using Queues.cpp
class MyStack { public: std::queue<int>main; std::queue<int>placeholder; MyStack() { } void push(int x) { this -> main.push(x); } int pop() { while(main.size() > 1) { int extract = main.front(); main.pop(); placeholder....
ALGO
0.998014
5.635206
d4a61644-947e-414b-9f61-28ba5dc53d27
ishandutta2007/codeforces
yzc2005/normal/1534/E.cpp
#include <bits/stdc++.h> using namespace std; const int N = 505, inf = 1e9; int n, k, dp[N], ans; bool g[N][N], valid[N]; void find(int u) { if (!u) cout << "! " << ans << endl, exit(0); vector<int> a, b; for (int i = 1; i <= n; ++i) if (valid[i]) b.emplace_back(i); else a.emplace_back(i); for (int...
ALGO
0.999981
3.365607
652ed0e7-2d35-4537-b6bb-571c0b97a7a6
raincross7/code-similarity
codes/train_code/problem396/problem396_389.cpp
#include <bits/stdc++.h> using namespace std; // cout << (char)(z + 1); int main(){ string S; int frag; cin >> S; for (char c = 'a'; c != '{'; c = (char)(c + 1)){ frag = 0; for (int i = 0; i < S.size(); i++){ if(S.at(i) == c){ frag = 1; } } if(frag == 0){ cout << c <<...
ALGO
0.999802
3.950692
155de023-e389-4c16-8259-8200afba4a0f
ducga1998/Codealgorithm
zero.cpp
#include<stdio.h> #include<stack> #include<iostream> using namespace std; void induong(int n,int m,int *d) { if(n==m) {cout<<n;return;} induong(n,d[m],d); cout<<"->"<<m; } bool DFS(int n,int m) { stack<int> S; int *d=new int [n+5]; for(int i=m;i<=n;d[i++]=0); S.push(n); while(!S.empty()) { int t=S.top(); S...
ALGO
0.999955
3.669187
40fa7472-789d-4fe2-b9b9-c2d0facc0d14
mrbharat03/bharatcpp
pattern printing/sq_654.cpp
#include <iostream> using namespace std; int main() { int n; cout<<"Enter a number "<<endl; cin>>n; int size = 2*n-1; int pattern[size][size]; for(int i=0;i<n;i++) { for(int j=i;j<size-i;j++) { pattern[i][j] = n-i; pattern[size-i-1][j] = n-i; ...
ALGO
0.999908
3.524265
22d96314-4b79-467f-a033-94f7d4a8ca39
Almoontasir/C--C-plus-plus-ProblemSolving
InsertDataToHeap.cpp
#include<bits/stdc++.h> using namespace std; int parrent(int i) { return i/2; } int left(int i) { return i*2; } int right(int i) { return i*2+1; } void heppifay(int heap[],int heap_size, int i) { int l,r,largest,t; l = left(i); r = right(i); if(l<heap_size && heap[l]>heap[i]) { l...
ALGO
0.99997
3.285165
a0799087-fe4e-4bd4-995f-0b64c9881e6f
abx975/VSP
VSP2/veraltete versionen/mainV5.cpp
/** * @author Nils Eggebrecht * @author Lennart Hartmann * @version 11.11.2017 */ // C++ standard library includes #include <string> #include <vector> #include <sstream> #include <iostream> #include <algorithm> #include <unordered_map> #include <bits/stdc++.h> #include <time.h> #include <sys/time.h> #include <rand...
WEB
0.987117
4.265871
76ebc871-f676-4522-a86c-ad83820f8a3e
naman-ptdr/DSA_Problems_LoveBubbar_SDESheet
lec22_PrintAllPrime.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter the value of N : "; cin>>n; cout<<"2\t"; for(int i=3; i<=n; i++){ for(int j=2; j<i; j++){ if(i%j!=0){ cout<<i<<"\t"; break; }else{ break; ...
ALGO
0.999634
3.824229
69251495-bae4-441c-b0e6-8c49fdd6cd53
dubey22rohit/CPP-DSA
DataStructures/Strings/HasDuplicates.cpp
#include <iostream> using namespace std; char *StringDuplicates(char *c) { // Only for lowercase letters; int *h; char *ans; h = new int[26]; ans = new char[26]; for (int i = 0; i < 26; i++) { h[i] = 0; } for (int i = 0; c[i] != '\0'; i++) { h[c[i] - 97]++; } i...
ALGO
0.999918
4.974835
4c723221-8adf-4eda-873e-fcd6d4863e76
thorbenlouw/lbm-graphcore
main/TileMappingStats.cpp
#include <cstdlib> #include <cxxopts.hpp> #include "include/StructuredGridUtils.hpp" #include <chrono> #include <iostream> #include <sstream> int main(int argc, char *argv[]) { std::string outputFilename; unsigned numIpus = 1u; unsigned minWidth = 128u; unsigned minHeight = 128u; unsigned maxWidth...
TOOL
0.881325
6.296886
912e1150-651e-4a28-8706-b25ca636f3b9
lyxuansang91/BigKen
cocos2d/cocos/platform/win32/CCFileUtils-win32.cpp
#include "platform/CCPlatformConfig.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "platform/win32/CCFileUtils-win32.h" #include "platform/win32/CCUtils-win32.h" #include "platform/CCCommon.h" #include <Shlobj.h> #include <cstdlib> #include <regex> #include <sstream> using namespace std; NS_CC_BEGIN #defin...
TOOL
0.940763
6.218097
3a39a2f8-4c4d-4683-957a-c3b8d606a026
Mazen-Ghaleb/ParallelLowPassFilter
ParallelLowPassFilter/LPF_MPI.cpp
#include "LPF_MPI.h" Mat MPILowPassFilter(const Mat& inputImage, const int kernelSize, const int world_size, const int world_rank, const int collector) { // Define the filter kernel float filter_value = (1 / (float)(kernelSize * kernelSize)); // Perform zero padding on the input image int paddingSize ...
ALGO
0.999026
5.217819
0eb75642-7013-486f-9e37-edf5cabf8d35
ishabhray/Competitive-Programming
codeforces/182B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define vi vector<int> #define ii pair<int,int> #define pb push_back #define mp make_pair #define ff first #define ss second #define pll pair<ll,ll> #define vv vector int gcd(int a,int b){return (b)?gcd(b,a%b):a;} int main() { ios_base::sync_wit...
ALGO
0.999811
3.255183
42f4dbc0-ed75-4aff-8971-d5e56b30fb11
justindomke/marbl
main_code/eigen322/doc/examples/tut_matrix_coefficient_accessors.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { MatrixXd m(2,2); m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); std::cout << "Here is the matrix m:\n" << m << std::endl; VectorXd v(2); v(0) = 4; v(1) = v(0) - 1; std::cout << "Here is the vector v:\n...
ALGO
0.998424
3.687909
12d08f75-8e1a-4dc0-81a0-1373456dd448
SagarPrajapati1/LeetcodePOTD2024
March24/remove_Nth_node_from_end_of_list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* removeNthFr...
ALGO
0.999975
5.96875
192c8459-7185-4317-b9b2-a6698277381d
hzfsls/leetcode-supercrawl
data/0921.minimum-add-to-make-parentheses-valid/code_snippets/sol.cpp
class Solution { public: int minAddToMakeValid(string s) { } };
ALGO
0.99964
6.347257
fec18da4-fb29-4a0b-b04a-c0e85918f548
selmabutun/Algorithms-Project
proje50.cpp
#include <iostream> using namespace std; inline int dikdortgen(int sayi1,int sayi2){ return sayi1*sayi2; } int main() { int sayi1,sayi2; cout<<"kisa kenar:"; cin>>sayi1; cout<<"uzun kenar"; cin>>sayi2; cout<<"dikdortgenin alani:"<<dikdortgen(sayi1,sayi2)<<endl; return 0; }
ALGO
0.981722
3.587277
e433c688-97e1-4484-8af4-d07dc516e7bc
ishandutta2007/codeforces
suiseiseki/normal/1451/E2.cpp
#include <cstdio> const int Maxn=(1<<16); int n; bool vis[Maxn+5]; int b[Maxn+5]; int a[Maxn+5]; int id[Maxn+5]; int query_and(int x,int y){ printf("AND %d %d\n",x,y); fflush(stdout); int ans; scanf("%d",&ans); return ans; } int query_or(int x,int y){ printf("OR %d %d\n",x,y); fflush(stdout); int ans; scanf("%...
ALGO
0.999949
3.198447
1b8d65a3-5ad9-485b-aa22-3558f95d4639
GipsyPotter/PTNK
bt vong lap/2b.cpp
#include <iostream> #include <iomanip> #include <vector> using namespace std; vector<int> fact(1,1); vector<double> prod; void factorial(int n){ for(int i=2;i<=n;i++) fact.push_back(fact[fact.size()-1]*i); } void product(double x, int n){ prod.push_back(x); for(int i=2;i<=n;i++) prod.push_back(prod[prod.s...
ALGO
0.999937
4.093237
233a8bca-e4ad-4422-ab1b-aa33aca29111
Technerd1124/takedown
prime.cpp
#include <iostream> using namespace std; bool isPrime(int num) { if (num < 2) return false; for (int i = 2; i * i <= num; i++) { if (num % i == 0) return false; } return true; } int main() { int num; cout << "Enter a number: "; cin >> num; if (isPrime(num)) cout << num ...
ALGO
0.997609
4.340598
161cbe44-ee80-428e-89e3-e929b58c95a0
kaloronahuang/KaloronaCodebase
Practices/Luogu/P4781.cpp
// P4781.cpp #include <bits/stdc++.h> #define ll long long using namespace std; const int MAX_N = 2020, mod = 998244353; int n, k, xi[MAX_N], yi[MAX_N], numerators[MAX_N], denominators[MAX_N]; int quick_pow(int bas, int tim) { int ans = 1; bas %= mod; while (tim) { if (tim & 1) a...
ALGO
0.999955
4.54184
d8334820-d1e1-40b4-93ae-677520115249
ishandutta2007/codeforces
cnnfls_csy/normal/523/D.cpp
#include <iostream> #include <algorithm> #include<cmath> #include<cstring> #include<cstdio> #include<cstdlib> #include<vector> #include<iomanip> #include<queue> #define sqr(x) (x)*(x) using namespace std; priority_queue<long long> now; long long n,m,i,j,x,y,z; int main() { ios::sync_with_stdio(0); cin>>n>>m; for (i=...
ALGO
0.999978
3.638843
a10e481c-9b37-479d-b51d-f139cffb0f42
cran/mergeTrees
src/as.fusionTree.cpp
#include <Rcpp.h> using namespace Rcpp; IntegerVector get_fusion_desc(int child, const IntegerVector& topoOrder, const IntegerVector& idown, const IntegerVector& iup) { IntegerVector fusion_desc (2) ; if (child < 0) ...
ALGO
0.996927
5.838764
6d8b393a-d2c1-47ee-9716-070b42fa104f
MDNROnik/Competitive-Programming
Codeforces/B. Serval and Inversion Magic.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define fastIo() ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr) int main() { fastIo(); ll test;cin>>test; while(test--){ ll n;cin>>n; string s;cin>>s; ll i=0,j=n-1; ll c=0,count=0; ...
ALGO
0.999931
4.220365
27061ab7-bdb4-480e-bc6a-ddc0e7e28b20
AkshayAnil1080/DSA
Eventual Safe States - GFG/eventual-safe-states.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: vector<int> eventualSafeNodes(int V, vector<int> adj[]) { vector<vector<int>> revadj(V); for (int i = 0; i < V; ++i) { ...
ALGO
0.999979
6.460715
13195edf-2c14-458b-a940-a2697fb1b4e4
ghtjr026/assignment
problem-solve/problem-solve/rmp.cpp
#include <fstream> #include <vector> using namespace std; ifstream finp("rmp.inp"); ofstream fout("rmp.out"); int arr[1000001]; int tree[4045001]; int result = 0; bool flag; int maketree(int idx, int start, int end) { if (start == end) { return tree[idx] = start; } int mid = (start + end) / 2; int left = mak...
ALGO
0.999831
3.81758
47a5288f-eeb8-469d-9344-6ca03401ee71
Roshan-1024/LeetCode-Solutions
Product of Array except Self.cpp
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { vector<int> leftArr, rightArr, ans; int size = nums.size(); int i = 0; //Set intial values to 1 while(i < size){ leftArr.push_back(1); rightArr.push_back(1); i++...
ALGO
0.999969
6.202947
9e8fb112-7562-41e9-92c5-d67c5317d032
shubhamcodingblocks/DSA
G11-DSA/10-01-2024/delete_at_first.cpp
#include<iostream> using namespace std; int main(){ int a[100]; int n; cin >> n; for(int i=0;i<n;i++){ cin >> a[i]; } for(int i=1;i<n;i++){ a[i-1] = a[i]; } n--; for(int i=0;i<n;i++){ cout << a[i] << " "; } return 0; }
ALGO
0.999699
3.538922
6479e378-0c94-4006-bd28-99ec798d5d52
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/Year2021/January/WatchingCpl_20210103135657.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999996
4.224235
0f87c438-903c-46af-aabd-df58b10bbf0a
archun39/Ctudy
week02/1764.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #define endl '\n' using namespace std; bool cmp (string A, string B){ return A < B; } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; set<string> s; vecto...
ALGO
0.999983
3.801611
2fdacfa2-b38c-4206-987b-fb2d1786aad6
wabiverse/UnrealEngineOldArchived
Engine/Source/ThirdParty/Intel/Embree/Embree2140/src/kernels/bvh/bvh_intersector_stream_filters.cpp
#include "bvh_intersector_stream_filters.h" #include "bvh_intersector_stream.h" namespace embree { namespace isa { static const size_t MAX_RAYS_PER_OCTANT = 8*sizeof(size_t); static_assert(MAX_RAYS_PER_OCTANT <= MAX_INTERNAL_STREAM_SIZE,"maximal internal stream size exceeded"); __forceinline void Ray...
ALGO
0.956312
6.46161
e83b4771-6546-4772-abb0-9cf01499fd6e
NagaBabu30/Dsa0152-c-
factorial using do while.cpp
#include<iostream> #include<cmath> using namespace std; int main() { int f=1,n,i=1; cout<<"N = "; cin>>n; do { f *= i; i++; } while(i<=n); { cout<<"Factorial = "<<f; } }
ALGO
0.999791
3.556577
2d9807ce-2962-470f-8390-c35b541e567d
gabrielpessoa1/Competitive-Programming
Educational Codeforces #65/D.cpp
// Educational Codeforces Round #65 // D - Bicolored RBS // https://codeforces.com/contest/1167/problem/D #include <bits/stdc++.h> using namespace std; const int ms = 5e5+5; int main() { cin.tie(0); ios::sync_with_stdio(0); int n; string s; cin >> n >> s; int arr[2] = {0, 0}; for(int i = 0; i < n; i++) {...
ALGO
0.999935
3.864092
cb34e1b1-7768-4bd0-b6a4-458d0fc9275c
poradosr/CS-162-Linked-Lists
recursion.cpp
#include <iostream> using namespace std; // Description: // The longest line of the pattern has n stars beginning in column col of the output. // Precondition: n is an positive odd number. // Postcondition: A pattern based on the above example has been printed. void pattern(int n, int col) { if (n == 1) { ...
ALGO
0.999338
4.93319
d00601e2-9a9b-497c-9805-9020857515a5
bhargavi-gudur/Cpp_BasicCode
GEEKS_PROGRAMS/DifferentConcepts/division_program.cpp
/** * @file division_program.cpp * @author GandlaBhargavi * @brief program to find the quotient and remainder. * using pass by reference method,function parameters. * @version 0.1 * @date 2025-02-24 * * @copyright Copyright (c) 2025 * */ #include <iostream> using namespace std; void division(int &quotient, ...
ALGO
0.981613
4.809564
ffd9f82d-7e75-434c-9631-bcce1f085035
knightdb/LULZBOT_WORKHORSE_SKR_1.4_turbo
buildroot/share/PlatformIO/variants/LERDGE/variant.cpp
#include "pins_arduino.h" #ifdef __cplusplus extern "C" { #endif const PinName digitalPin[] = { PB_12, PB_13, PB_14, PB_15, PD_8, PD_9, PD_10, PD_11, PD_12, PD_13, PD_14, PD_15, PG_2, PG_3, PG_4, PG_5, PG_6, PG_7, PG_8, PC_6, PC_7, PC_8, PC_9, PA_8, PA_9, PA_10, PA_11, PA_12, PA_13, PA_1...
CONFIG
0.938876
5.010884
6bcaea11-8cc8-4b0f-b543-d2c49db1ba9e
Slept0122/Tarefas_LPR
Aula_7/vetor/exercicio 1/exercicio1.cpp
#include <iostream> #include <vector> using namespace std; vector<int> num(10); vector<int> escolhido(10); int main() { cout << "digite 10 valores inteiros para fazer separacao impar ou par" << endl; cin >> escolhido[0] >> escolhido[1] >> escolhido[2] >> escolhido[3] >> escolhido[4] >> escolhido[5] >> escol...
ALGO
0.998204
4.120952
7e0fcb96-048f-42de-ac86-fcd5e74c26bc
Sylus-girl/C-
子函数求玫瑰花数.cpp
#include<stdio.h> int rose(int m) { int a,b,c,d; a=m%10; b=m/10%10; c=m/100%10; d=m/1000%10; if(a*a*a*a+b*b*b*b+c*c*c*c+d*d*d*d==m) { return 1; } else { return 0; } } int main() { int i,s=0; for(i=1000;i<=10001;i++) { if(rose(i)) { s++; printf("õ廨У%d\n",i); } } printf("õ廨У%d",s); re...
ALGO
0.995181
3.262775
412a15fa-50ba-40fc-a470-4c9c7cef0072
HowXuVSCode/GalaxyEmotion
jdk8/hotspot/src/share/vm/opto/parse3.cpp
#include "precompiled.hpp" #include "compiler/compileLog.hpp" #include "interpreter/linkResolver.hpp" #include "memory/universe.inline.hpp" #include "oops/objArrayKlass.hpp" #include "opto/addnode.hpp" #include "opto/memnode.hpp" #include "opto/parse.hpp" #include "opto/rootnode.hpp" #include "opto/runtime.hpp" #includ...
ALGO
0.936678
6.905519
ff731e6b-99fa-4b22-9129-ea7b780c01b1
sorinmiroiu97/old-CPP-stuff
git_C++/oglindit_recursiv/main.cpp
#include <iostream> using namespace std; int long afisare(int n) { if (n!=0) {cout<<n%10; afisare(n/10);} } int main() { int n; cin>>n; cout<<afisare(n); return 0; }
ALGO
0.999354
4.229837
9ac4fc7d-5965-4702-9cf2-71ba47904ba4
raincross7/code-similarity
codes/train_code/problem217/problem217_9.cpp
#include <iostream> #include <set> #include <iomanip> #include <math.h> #include <algorithm> #include <functional> #include <stdio.h> #include <vector> #include <string> #include <map> #define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++) //#define rep(i, n) for(int (i) = 0, TmP = (n); (i) < (int)TmP ; ++(i)) #def...
ALGO
0.999969
4.059219
6f36ae9b-a4a8-4205-b966-cad33cfedd62
Fengdalu/acm-icpc
CF/347/c.cpp
#include <cstdio> #include <cstring> #include <string> #include <cstring> #include <iostream> #include <sstream> #include <queue> #include <map> #include <set> #include <algorithm> using namespace std; char s[100]; int main() { int n; cin >> n; while(n--) { scanf("%s", s); int len = strlen(...
ALGO
0.998358
3.643886
01efb27c-a5d2-4bfa-b68f-cff524d44a6b
ManojKumarPatnaik/Sr.SoftwareEngineerInterviewPrep
03]. LeetCode/1]. Problems/C++/0006]. Zigzag Conversion.cpp
/* Example 1: Input: s = "PAYPALISHIRING", numRows = 3 Output: "PAHNAPLSIIGYIR" Example 2: Input: s = "PAYPALISHIRING", numRows = 4 Output: "PINALSIGYAHRPI" Explanation: P I N A L S I G Y A H R P I Example 3: Input: s = "A", numRows = 1 Output: "A" */ class Sol...
ALGO
0.999999
6.449488
9683722b-dca6-4948-8fe1-e17c2e173398
darkshadoww/Heuristics-CodeForces-GYM
100765/D.cpp
#include<iostream> #include<iomanip> #include<ctime> #include<cstdio> #include<vector> #include<algorithm> #include<utility> #include<queue> #include<stack> #include<string> #include<cstring> #include<sstream> #include<map> #include<unordered_map> #define rep(i,N) for(int (i)=0;(i)<(N);(i)++) #define repi(i,j,N) for(in...
ALGO
0.999973
3.082495
0001a418-8da5-4580-87a7-925e3f427e3f
nie-game-old/cycles
src/render/curves.cpp
#include "render/curves.h" #include "device/device.h" #include "render/mesh.h" #include "render/object.h" #include "render/scene.h" #include "util/util_foreach.h" #include "util/util_map.h" #include "util/util_progress.h" #include "util/util_vector.h" CCL_NAMESPACE_BEGIN /* Curve functions */ void curvebounds(float...
ALGO
0.998197
7.623651
56e9f567-af3e-4d4f-8b93-621edd17c342
chestnutme/pat-solution
A1056.cpp
#include <cstdio> #include <queue> using namespace std; const int maxn = 1007; struct mouse { int weight; int r; }mice[maxn]; queue<int> q; int main() { freopen("C:\\Users\\Alex\\Desktop\\showmethecode\\c\\pat\\data\\A1056.txt", "r", stdin); int np, ng, order; scanf("%d%d", &np, &ng); for(in...
ALGO
0.99998
3.501895
bc3bbd97-fe3d-43ee-94b8-3dab6d79a1e5
AdityaChirravuri/CompetitiveProgramming
HackerEarth/Data Structure/Arrays/1D/LongATMQueue.cpp
#include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); int main() { fastio; long int n; cin >> n; long int arr[n]; for(long int i=0; i<n; i++)cin >> arr[i]; long int groups = 0; bool flag ;//= true; for(int i=0; i<n-1; i++){ ...
ALGO
0.999894
4.079458
8a4fe573-2f82-475f-89a8-060ea42fe8ab
PhoenixAthens/DataStructures-Essentials
DataStructures-Essentials/CodeChef/Below500/Double-Rent.cpp
#include "all.h" int main(){ int x; cin >> x; cout << 2*x << "\n"; return 0; }
ALGO
0.998478
3.144438
05b3e8b2-2514-4bef-9a25-e74d7a0636f5
KevinXuhao/Software_Team18
Lena.cpp
#include <iostream> using namespace std; #include "./gdal/gdal_priv.h" #pragma comment(lib, "gdal_i.lib") #define BOXFILTER 1 #define MOTINEFILTER 2 #define EDGEFILTER 3 #define SHARPENFILTER 4 #define EMBOSSFILTER 5 #define GAUSSFILTER 6 int imFilter(char* pathIn, char* pathOut, int flag); // The fi...
ALGO
0.88818
4.047851
7800a6ca-d769-40c3-b795-a990b15e118e
SwapnilSaha59/Important-Programs-on-CP
Roman Number to Integer.cpp
/* Roman Number to Integer ======================= Given a string in roman no format (s) your task is to convert it to an integer . Various symbols and their values are given below. I 1 V 5 X 10 L 50 C 100 D 500 M 1000 Example 1: Input: s = V Output: 5 Example 2: Input: s = III Output: 3 Your Task: Complete the fu...
ALGO
0.999853
6.263332
0edc2b56-f111-4a15-82e2-819c35f89136
limon2009/ACM-UVA-Online-Judge-solution
380.cpp
#include<stdio.h> #define MAXN 10002 struct xx { int st, end; int des; }; struct ss { xx list[111]; int ind; }Call[MAXN]; int M[10003]; int Num[MAXN], tn; char Fg[MAXN]; void ReadCase() { int a, b, c, d, u, v; tn = 1; while(1) { scanf("%d",&a); if(!a) break; u = M[a]; if(!u) { u = tn++; Num[tn-1] = a...
ALGO
0.997805
3.254617
1c51b581-3b45-45e4-a8eb-11bf33eca17e
psychokino/OS-homework
lab02/out.cpp
#include <iostream> #include <unistd.h> #include <sys/ipc.h> #include <sys/shm.h> #include <sys/wait.h> #include <fstream> #include <vector> #include <sys/time.h> #include <iomanip> #include <cstdlib> using namespace std; inline int fork_pcs(pid_t* pcs,int index){ index--; if(index > 0 ){ pcs[index] = fork(); ...
ALGO
0.998916
3.156569
66d1222b-6dbb-44f5-ba03-7e754c096bf1
mutationpp/Mutationpp
thirdparty/eigen/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A; A << 1, 2, 2, 3; cout << "Here is the matrix A:\n" << A << endl; SelfAdjointEigenSolver<Matrix2f> eigensolver(A); if (eigensolver.info() != Success) abort(); cout << "The eigenvalues of A ...
ALGO
0.999633
3.846247
b834b3a8-38f6-4250-a8be-04a2bcddd174
Ayuhoney/Adavanced-DSA-CODE
AVLTREE.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int key; Node* left; Node* right; int height; }; int max(int a, int b){ return (a > b) ? a : b; } int height(Node* node){ if(!node)return 0; return node->height; } Node* newNode(int key){ Node* node = new Node(); ...
ALGO
0.99999
5.058918
eccb5755-b841-42d1-8af5-cd0c81e03b97
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-cot-gpt4/Codenet/p00100/557522221/response_3.cpp
#include <iostream> #include <map> #include <vector> using namespace std; int main() { int n, i; while (cin >> n, n) { map<int, long long> m; vector<int> vec; long long p, q, s = 0; while (n--) { cin >> i >> p >> q; if (!m[i]) vec.push_back(i); m[i] += p * q; } int ...
ALGO
0.999048
4.132064
890946e8-dff6-4042-8715-1bbca93ae516
buildbot-stone-devs/device_xiaomi_stone_matrox
gps/utils/loc_misc_utils.cpp
#define LOG_NDEBUG 0 #define LOG_TAG "LocSvc_misc_utils" #include <stdio.h> #include <string.h> #include <inttypes.h> #include <dlfcn.h> #include <math.h> #include <log_util.h> #include <loc_misc_utils.h> #include <ctype.h> #include <fcntl.h> #include <inttypes.h> #ifndef MSEC_IN_ONE_SEC #define MSEC_IN_ONE_SEC 1000UL...
TOOL
0.961056
5.910943
c0e17844-ad4b-449b-ae65-60bfbe01e86f
catalinboja/cpp_examples_2017
Laborator/1050/ProjectLab3/p1.cpp
#include <stdio.h> void printArray(int* values, int n){ printf("\n Values:"); for(int i = 0;i<n;i++) printf(" %d",values[i]); } //funcion that creates a new array in heap void createArray(int* &existing, int& n){ printf("\n New number of elements:"); scanf("%d",&n); if(existing!=NULL) delete[] existing; ...
ALGO
0.996805
3.528309
8060e856-01cd-4555-9ddc-2aa557575534
ebsrn/lzm-face
main.cpp
#include <iostream> #include <vector> #include "LZM.h" #include "opencv2/opencv.hpp" #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/nonfree/features2d.hpp> #include <opencv2/nonfree/nonfree.hpp...
TOOL
0.869908
4.376664
27d2dc7c-046e-4edc-8cb7-03cc97de4105
Minssc/BJA
old/1463.cpp
#include<iostream> using namespace std; short C[1000001]; int main(){ cin.tie(0), ios_base::sync_with_stdio(0); int N; cin>>N; C[0] = 0; C[1] = 0; for(int i=2; i<=N; ++i){ int min = C[i-1]+1; //C[i] = min(min(C[i/3]+1, C[i/2]+1), C[i-1]+1); if((i%3==0) && (C[i/3] + 1 < min)) min = C[i/3]+1; if(...
ALGO
0.999977
3.978496
010d8897-e01e-4416-8e46-167a72726c6d
krishna146/DSASheetAndSolution
2.PatternSolving/Pattern7th.cpp
#include<iostream> using namespace std; int main(){ int n ; cin >> n; for(int row = 1 ; row <= n ; row++){ //for each row for(int col = 1 ; col <= row ; col++){ cout << col ; } // after every row cout << endl; } }
ALGO
0.999881
4.127877
a824e820-0332-4881-9d7e-099bd45e18f9
Siddy2611/Clg
NS/vernam.cpp
#include<iostream> #include<string> using namespace std; void encrypt(){ string plainText; cout<<"Enter Plain Text : "; getline(cin, plainText); string key; cout<<"Enter Key : "; getline(cin, key); string cipherText; for (int i = 0; i < plainText.length(); i++) { if(plain...
TOOL
0.998106
3.303699
c4dbc0a8-9ddc-42c9-bbc1-8198f7ba14f9
abckhush/DSA-QA
12. Integer to Roman.cpp
class Solution { public: string intToRoman(int num) { vector<string>ones= {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}; vector<string>tens= {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"}; vector<string>hundreds= {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DC...
ALGO
0.9991
6.277667
de278f22-3e03-4d4d-adb4-851e6ef08d17
Arpit455/LeetCode-Daily-Problems
2024/DEC/Continuous Subarrays.cpp
long long continuousSubarrays(vector<int>& nums) { map<int,int>s; int i=0,j=0; long long int count=0; while(j<nums.size()) { s[nums[j]]++; while(s.rbegin()->first-s.begin()->first>2) { s[nums[i]]--; if(s[nums[i...
ALGO
0.999969
5.561959
9481052e-61d3-4e60-bf0d-fd8cd1e3ad11
yadurajgupta/CSES_Solutions
Graph Algorithms/Planets_Queries_I.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <iostream> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl '\n' #define int long long template <class type> usi...
ALGO
0.999945
4.163709
09296491-3879-41db-8686-15d7fb6de5fc
GNAQ/Algorithm-Contest-Archive
Template/SAM.cpp
#include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<cstdlib> #include<algorithm> #define ll long long using namespace std; ll ans,len; char str[1000010]; template<typename int_t> void readx(int_t& x) { x=0; int_t k=1; char ch=0; while (ch<'0' || ch>'9') { ch=getchar(); if (ch=='-') k=-1; ...
ALGO
0.999955
3.744681
4530037c-cbf3-4814-b5dd-3fdc069fc28a
wjdwls0630/2019_2_DSP_Lab
DSP_other/10주차/1/1/main.cpp
#include<iostream> #include<fstream> #include"complex.h" using namespace std; #define PI 3.141592 void DFT(int, complex*, complex*); void IDFT(int, complex*, short*); void DoDirichlet(int, int, complex*, complex*); int main() { ifstream Infile;//о Infile.open("noiseMusic.wav", ios::binary); char* header = new cha...
ALGO
0.997747
3.620756
5f270f65-b7e1-4fdc-a389-91096482b4ef
Badhansen/LeetCode-Solutions
step-by-step-directions-from-a-binary-tree-node-to-another/step-by-step-directions-from-a-binary-tree-node-to-another.cpp
class Solution { public: TreeNode* LCA(TreeNode* root, int& a, int& b){ if(!root || root->val == a || root->val == b) return root; TreeNode* left = LCA(root->left, a, b); TreeNode* right = LCA(root->right, a, b); if(left && right) return roo...
ALGO
0.999928
6.444923
b4abc2bd-095b-4ada-85db-8d342bd8fc50
jun6292/Algorithm
프로그래머스/lv1/12916. 문자열 내 p와 y의 개수/문자열 내 p와 y의 개수.cpp
#include <string> #include <iostream> using namespace std; bool solution(string s) { bool answer = true; int pcnt = 0, ycnt = 0; for (int i = 0; i < s.length(); i++){ if (s[i] == 'p' || s[i] == 'P') pcnt++; else if (s[i] == 'y' || s[i] == 'Y') ycnt++; } if (p...
ALGO
0.999154
4.430664
599060be-0353-4679-9e97-ae0270f7cf64
UnePatate5010/3D-Programming_Course
WORK1/mds3d_work1/ext/nanogui/ext/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; int main() { ArrayXXf a(2,2); a << 1,2, 3,4; cout << "(a > 0).all() = " << (a > 0).all() << endl; cout << "(a > 0).any() = " << (a > 0).any() << endl; cout << "(a > 0).count() = " << (a > 0).count() << endl...
ALGO
0.947139
3.835741
5e2d1d37-8727-41fc-b4a4-b00a4c22f24c
framework-res/pb_system_core
adb/daemon/jdwp_service.cpp
#if !ADB_HOST #define TRACE_TAG JDWP #include "sysdeps.h" #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h> #include <list> #include <memory> #include <vector> #include <android-base/cmsg.h> #include "adb.h" #include "adb_...
TOOL
0.856082
7.085862
2707f4e1-6adf-4901-9913-ea68c25e9d39
lucasw0908/SchoolCodingHomework
112-2/C01.cpp
#include<bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); #define int long long signed main() { int a, b; cin>>a>>b; for (int i = a; i < b; i++) { //從a開始到b(左閉右開)輸出數字 cout<<i<<" "; } cout<<b; //輸出一個不用加空格的b }
ALGO
0.996956
3.292137
a6022918-39da-41af-a2ed-664fd2d7ca7f
customer0907/Baekjoon
백준_10814.cpp
#include <iostream> #include <algorithm> using namespace std; class Member { public: int age; string name; Member() { age = 0; name = ""; } ~Member() { } }; Member* m = new Member[100001]; bool compare(Member a, Member b) { return a.age < b.age; // ׳ ϰڴٴ . ٸ Ŭ ü̱ compare Լ . } int main() { int N; ...
ALGO
0.999848
4.874403
3d36b8b8-3fb9-4690-b3ba-868561454937
ishandutta2007/codeforces
dingdingsb/normal/521/E.cpp
#include<bits/stdc++.h> using namespace std; template<typename T> inline void read(T &x){x=0;char c=getchar();bool f=false;for(;!isdigit(c);c=getchar())f|=c=='-';for(;isdigit(c);c=getchar())x=x*10+c-'0';if(f)x=-x;} template<typename T ,typename ...Arg>inline void read(T &x,Arg &...args){read(x);read(args...);} template...
ALGO
0.999985
4.145636
d132616b-7a95-4ef7-b604-a2eeaca2eb7f
toskip/leetcode
57_Insert Interval.cpp
/** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int s, int e) : start(s), end(e) {} * }; */ //搞不懂这题的存在意义,懒的算了直接套上一题 bool myfunction (Interval i,Interval j) { return (i.start<j.start); } class Solution { public: vecto...
ALGO
0.999928
5.566748