uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
60e5ecf7-6afe-4de2-a53e-2600b760be7d
Priyanshu88/DSA-Sheet-by-Arsh-Goyal
DSA Practice Sheet/Linked List/Remove Linked List Elements/main.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* removeEleme...
ALGO
0.999986
6.128265
098a2ee1-479b-4b35-a78c-f6f0e66eb03e
ishandutta2007/codeforces
radewoosh/normal/1198/D.cpp
//~ while (clock()<=69*CLOCKS_PER_SEC) //~ #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("O3") //~ #pragma GCC optimize("Ofast") //~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //~ #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/asso...
ALGO
0.999852
4.120713
be764034-4674-4847-b616-59c7629f5f89
MarkGillespie/harnack-blender
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
#include "btCollisionDispatcher.h" #include "LinearMath/btQuickprof.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/CollisionShapes/btCollisionShape.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/BroadphaseCollision/btOv...
ALGO
0.985705
6.842875
8ebe6ab4-23be-44aa-ab3c-3302c3c96305
nicolasSaid/CS310FinalReview
answers/Heaps.cpp
/** * QUESTIONS: * 1. What type of tree is required to implement a heap? * Why does it matter? (For what operations to function * do we need that type of tree) * * 2. How are BSTs and Heaps similar? How are they different? * * 3. What is the height of a Heap with N nodes in it? * * 4. Describe the ...
ALGO
0.997083
4.247129
486f6d44-0cad-4c41-817f-ed37badab684
anmolalgorist7110/dsa-codes
BST/LCA of binary tree.cpp
#include<bits/stdc++.h> using namespace std ; template<typename T> class binarytreenode { public: T data ; binarytreenode* left ; binarytreenode* right ; binarytreenode(T data) { this -> data = data ; left = NULL ; right = NULL ; } ~binarytreenode() { delete left ; delete right ; } }; b...
ALGO
0.999989
4.572048
1797fb8c-eb08-4ca5-aeeb-851dfe158604
9yutae/CODE-KATA
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/0/181860.โ€…๋นˆโ€…๋ฐฐ์—ด์—โ€…์ถ”๊ฐ€๏ผŒโ€…์‚ญ์ œํ•˜๊ธฐ/๋นˆโ€…๋ฐฐ์—ด์—โ€…์ถ”๊ฐ€๏ผŒโ€…์‚ญ์ œํ•˜๊ธฐ.cpp
#include <string> #include <vector> using namespace std; vector<int> solution(vector<int> arr, vector<bool> flag) { vector<int> answer; for(int i=0;i<arr.size();i++) { int rept = arr[i]; if(flag[i]) rept *= 2; while(rept--) { if(flag[i]) answer.push_back(arr[i]); ...
ALGO
0.999968
5.106652
976e341c-8359-4001-945d-7bf9564be754
benjaminhuanghuang/ben-leetcode
0050_Pow(x,_n)/solution.cpp
/* 50. Pow(x, n) Level: Medium https://leetcode.com/problems/powx-n */ #include <iostream> #include <vector> #include <string> #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <numeric> #include <algorithm> #include "common/ListNode.h" #include "common/TreeNode.h" using n...
ALGO
0.999983
6.310109
734d95f7-06c3-4a67-af5f-a358d2117a2e
Anushka-1405/DS
charity.cpp
/* Implement the concept of Charity Management System using Binary Tree. Write the display function without using recursive function (Non-recursive way). - Also display the Leaf nodes. - Also calculate the height of the tree. */ #include<iostream> using namespace std; class CMS { string name; stri...
ALGO
0.999627
5.231373
6b5ab374-1801-4485-950d-b02fb684f0ae
PhiTruongCE/DSA
Hash.cpp
#include <iostream> #include <string> #include<bits/stdc++.h> using namespace std; class ChainingHash { private: int (*hash)(int); list<int> *data; int size; public: ChainingHash() { throw "Cannot create a hash with no hash function!"; } ChainingHash(int size, int (*hash)(int))...
ALGO
0.996709
4.910717
9af831d2-71dc-4d5d-8189-a75fb5704b54
Bloodevil/cote
sangmi/height-checker.cpp
/* * https://leetcode.com/problems/height-checker/ */ class Solution { public: int heightChecker(vector<int>& heights) { vector<int> sortedHeights (heights.size()); partial_sort_copy(begin(heights), end(heights), begin(sortedHeights), end(sortedHeights)); int ans = 0; for (int...
ALGO
0.999978
5.697357
8189544f-0ff5-4c29-986f-ebc71e92c17b
VICcoin/VicCoin_Source
src/rpcmining.cpp
#include "main.h" #include "db.h" #include "init.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; Value getgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getgenerate\n" "Returns true or false."); r...
WEB
0.911339
5.719903
f681671b-8653-40b1-b37f-7d96e6217c1a
oliver-zeng/leetcode
0026-Remove_Duplicates_from_Sorted_Array/main-1.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { int sz = nums.size(); if (sz == 0) return 0; // i้ๅކๆ•ดไธชๆ•ฐ็ป„๏ผŒkๆ•ฐ็ป„ไธญๆœ€ๆ–ฐ่ฆๆฏ”่พƒๆ•ฐ็š„็ฌฌไธ€ไธชไฝ็ฝฎ int k = 0; for (int i = 1; i < sz; i++) { if (nums[i] == nums[k]) continue; else ...
ALGO
0.999897
6.07867
c7daad85-b208-428f-9e83-6de40766b206
Briochee/235-Projects
project3-Briochee/ArrayBag.cpp
//Name: Rio Simpson //Email: <EMAIL> //Date: September 22nd, 2023 //Project 3: Tavern class implementation /* ArrayBag interface for term project CSCI 235 Fall 2023 */ #include "ArrayBag.hpp" /** default constructor**/ template<class ItemType> ArrayBag<ItemType>::ArrayBag(): item_count_(0){ } // end default constr...
TOOL
0.853523
5.983753
c6c4af73-e202-406b-9469-27de9c80560c
zhangty019/MultiAxis_3DP_MotionPlanning
ThirdPartyDependence/eigen3/doc/examples/DenseBase_template_int_middleCols.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << endl; return 0; }
ALGO
0.986837
3.154174
acc56a51-db2c-4724-8a92-d737a16a3492
oraccc/LeetCode-Solutions
c++ version/else/sort_algorithm/insert_sort.cpp
#include <iostream> #include <vector> using namespace std; // Time complexity: Best O(n); Worst O(n^2); void insertSort(vector<int> &nums, int n) { for (int i = 0; i < n; ++i) { for (int j = i; j > 0 && nums[j] < nums[j-1]; --j) swap(nums[j], nums[j-1]); } } int main() { vector<i...
ALGO
0.999967
5.448658
0a9db391-6174-4b26-8de8-0a2ee0b76e0d
ASH-ION-01/Pacman-ride
Source/Ghost.cpp
#include <array> #include <cmath> #include <SFML/Graphics.hpp> #include "Headers/Global.hpp" #include "Headers/Pacman.hpp" #include "Headers/Ghost.hpp" #include "Headers/MapCollision.hpp" Ghost::Ghost(unsigned char i_id) : id(i_id) { //I keep writing "gohst" instead of "gohst" (THERE! I did it again!). //So in thi...
TOOL
0.911523
4.079432
f0dd2b82-2aad-4038-a111-e9eabba0bd5b
intel/hyperscan
src/nfagraph/ng_som_util.cpp
/** \file * \brief Utility functions related to SOM ("Start of Match"). */ #include "ng_som_util.h" #include "ng_depth.h" #include "ng_execute.h" #include "ng_holder.h" #include "ng_prune.h" #include "ng_util.h" #include "util/container.h" #include "util/graph_range.h" using namespace std; namespace ue2 { static ...
ALGO
0.998738
7.222452
2302331b-0321-4aa0-bedf-dd3b9c7fb5d2
MDATIK-3/CPP-Problem-Solving
problem_1657_A.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int y; cin >> y; while (y-- > 0) { int a, b; cin >> a >> b; int distance = (a * a + b * b); int d = (int)(sqrt(distance)); if (a == 0 && b == 0) cout << 0 << endl; else if...
ALGO
0.9999
3.987017
cfaa06e3-8eb0-4935-8cca-651962b67225
sampartovi2/cs1b
random/s07/linkedlist.cpp
#include<iostream> #include<fstream> using namespace std; struct Node { int val; Node* next; }; //circular linked list void addToTheEnd(Node*& p, int val) { Node* newNode = new Node {val, nullptr}; Node* last; if (p == nullptr) { p = newNode; p->next = p; return; ...
ALGO
0.987573
4.863559
6410c704-2409-4568-977a-d0021fe6d720
Diam2023/Runner
Classes/utils/ImageAutoPolygon.cpp
// // Created by 35691 on 7/16/2023. // #include <clipper.hpp> #include <poly2tri/common/shapes.h> #include <poly2tri/sweep/cdt.h> #include <2d/CCNode.h> #include "ImageAutoPolygon.h" USING_NS_CC; const static float PRECISION = 10.0f; ImageAutoPolygon::ImageAutoPolygon() : _image(nullptr), _data(nullptr), _widt...
ALGO
0.996488
6.041931
d188a61b-29e2-476f-b8fb-3bd9bd955b2f
smyilik/calculator
calculator/summator.cpp
#include "Header.h" string summator(string str) { string first = "", second = "", big, small; long long i = 0, len = itc_len(str); while (i < len && !(itc_isDigit(str[i])) && str[i] != '-') i++; while (i < len && (itc_isDigit(str[i]) || (str[i] == '-' && itc_isDigit(str[i + 1])))) { first += str[i]; i++; } wh...
ALGO
0.999676
3.978427
7f18129e-5d4c-412f-8ba3-ee14c896bc9b
mkdir-sweetiepie/cpp_study
02_C++_ํ”„๋กœ๊ทธ๋ž˜๋ฐ์˜ ๊ธฐ๋ณธ/์˜ˆ์ œ3.cpp
#include <iostream> using namespace std; int main() { cout << "Input a width >> "; int width; cin >> width; // ลฐฮบ สบ ะพ width cout << "Input a height >> "; int height; cin >> height; // ลฐฮบ ฬธ ะพ height int area = width * height; // ็ฐข cout << "The area is " << area << "\n"; // ฯฐ ูท ัพ๎ฐจ }
TOOL
0.893655
3.511094
193d2b83-6b24-48df-91e4-f37569be1cfd
krishnasrikard/C-and-Cpp-Programming-Practice
Learn/Algorithms/Dynamic Programming/partitionProblem.cpp
// Soruce: https://www.geeksforgeeks.org/partition-problem-dp-18/ #include <bits/stdc++.h> using namespace std; typedef long long int ll; #define fr(i, a, b) for (int i=a; i<=b; i++) #define vec2d(v,n,m,init) vector<vector<bool>> v(n, vector<bool>(m,init)) void Input_Vector(vector<int> &array, int size){ for (int i ...
ALGO
0.999978
4.826356
6bc3bf7c-5a0e-4486-8b06-e87f885853f0
Syed-Aref/cp_templates
Solve-CSES/CSES Xor range.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n,q,x; cin >> n >> q; vector<long long int> v(n+1); v[0] = 0; for(int i = 1;i<=n;i++) { cin >> x; v[i] = v[i-1]^x; } while(q-->0) { int l ...
ALGO
0.999996
4.860149
2cb3a391-b745-4f19-ba3e-18e99d285d46
VeerRavi97/interview-prep
DSA-booklet/cpp/10.BST and Balanced BST/1.a)insertion.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD 1e9 + 7 #define INF 1e18 #define endl '\n' #define all(c) c.begin(), c.end() typedef vector<int> vi; class Node { public: int data; Node *left; Node *right; Node(int data) { this->data = data; this->left ...
ALGO
0.999921
4.965099
320a61cf-c9e6-40d6-a08c-dd850bbb6df2
RohanP-57/Codes_C
hmm.cpp
#include <iostream> using namespace std; void swap(int a, int b) { int c; c = a; a = b; b = c; } int main() { int a, b; cout << "Enter Numbers:"; cin >> a >> b; cout <<"Valoue of " << endl; cout << " a= " << a << ", b= " << b << endl; swap(a, b); cout << "After Swap" << endl;//...
ALGO
0.999454
3.629448
e1928ca5-8a12-4968-9a72-81c6ad3c001f
nicorfq/app_learning_widgets
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.998859
6.785645
26ec1786-6578-4e3e-b262-51dc366948aa
hzratali/DSA-Problems
Maximum Index - GFG/maximum-index.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int maxIndexDiff(int arr[], int n) { // code here int *left = new int[n]; int *right = new int[n]; left[0] = arr[0]; int maxi = -1; for(int i = 1; i<n;...
ALGO
0.999727
6.166675
77500f51-1c37-43ea-960b-8f6551c3a34e
akhilchoudhary2k/Solutions-CSES-Problem-Set
counting_divisors.cpp
#include<bits/stdc++.h> using namespace std; void test_case(){ int n; cin >> n; for(int i=0;i<n;i++){ int a; cin >> a; int cnt=0; for(int j=1;j*j<=a;j++){ if(a%j==0) { cnt+=2; if(j == a/j) cnt--; } } cout << cnt << endl; } } int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr)...
ALGO
0.999685
4.029757
dd5c9949-0d1d-43ea-ad78-681e679217dd
luisaur05/Competitive-Programming
UVA Uhunt/12239_Bingo.cpp
/* LUIS ANGEL ARREDONDO URIBE ---------DESCRIPCION-------- Descripciรณn: El codigo verifica si es posible llamar a todos los nmeros desde 0 hasta N, utilizndo las bolas que quedan en la bolsa. 1. Lee el nรบmero de casos. 2. Para cada caso: - Lee las bolas que quedan en la bolsa y se almacenan en un vector. - Se ...
ALGO
0.999902
5.09721
80bf4330-c581-4671-9862-77347f05ceab
Rexx0801/codeptit_c_cpp
soxuathiennhieunhat.cpp
#include<iostream> #include<map> #include<bits/stdc++.h> using namespace std; int arr[100005]; int n; int main() { int t; cin >> t; while (t--) { cin >> n; map<int, int> mp; for (int i = 0; i < n; i++) { cin >> arr[i]; mp[arr[i]]++; } int ans; int cnt = INT_MAX; int check = 0; for (auto v : mp) {...
ALGO
0.999983
4.791543
e5ea6a06-5582-4cc9-9eb9-2fc115a6bced
Alaxe/noi2-ranking
2017/solutions/B/DAC-Plovdiv/paint.cpp
//#include <iostream> #include <cstdio> using namespace std; #define MAXN 11384 short F[MAXN][MAXN]={}; long long area[MAXN]={}; int h, w, a[MAXN], b[MAXN], n, w1[MAXN], h1[MAXN], i, j, l, qx, qy, t, it; int main(){ //ios::sync_with_stdio(false); //cin.tie(NULL); scanf("%d %d", &w, &h); area[0]=w*h; ...
ALGO
0.999869
3.244837
46e73e8f-c588-4d37-b463-ce5418cb4ced
aufanam/Competitive-Programming
1183F.cpp
#include <bits/stdc++.h> #define int long long #define ll long long #define ld long double #define ull ...
ALGO
0.999984
4.193271
0e9b92f5-ea78-4c26-8acd-abe2c7126b16
efat1531/CP-Solutions
CodeForces/GNU C++17/160A | Twins/72939847.cpp
#include<bits/stdc++.h> #include<cmath> #include<string> #define ull unsigned long long int #define ll long long int using namespace std; int main() { int n,sum1=0,sum2=0,c=0; cin>>n; int a[n]; int j=n-1; for(int i=0;i<n;i++)cin>>a[i],sum1+=a[i]; sort(a,a+n); while(sum2<=sum1/2) { ...
ALGO
0.999866
3.430206
f4c5b2a7-a01a-4d8b-a222-76e828197668
GarvitKaushik123/DS_ALGO
dp_level2/lcs_type/lcs.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <random> #include <iostream> #inc...
ALGO
0.999989
5.545706
aca1a960-da98-4e34-bf2c-4dcd56d02602
seanbaxter/eigen
doc/snippets/Tutorial_solve_triangular.cpp
Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; Vector3f x = A.triangularView<Upper>().solve(b); cout << "The solution is:" << endl << x << endl;
ALGO
0.999865
3.055453
b45bab9d-6af1-4176-b2f5-35b3bedd0e02
Ryoga-itf/programming-challenges
week02/H-almostunionfind/main.cpp
#include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <set> #include <utility> #include <vector> using namespace std; using ll = long long; struct AlmostUnionFind { vector<set<ll>> entries; vector<ll> sums, indexes; AlmostUnionFind(const int n) : entries(n), sums(n), in...
ALGO
0.999691
4.563619
325fc675-4d9c-4ae9-8e7b-19aa026f27ff
SHREYASH96OG/CPlusPlus-Programming-Practice
28Jan/Program4.cpp
// Write a program which accept number from the user and return the addition digits. #include<iostream> using namespace std; int sum_digits(int num) { int sum = 0; while(num > 0) { int mod = num%10; sum += mod; num = num / 10; } return sum; } int main() { int num; cin >> num; cout << sum_d...
ALGO
0.999561
5.519443
ac6c4a6d-f99f-409d-9802-2a75c1d6f910
debugster/UVa
uva-10653.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int, int> int fx[] = {1, -1, 0, 0}; /// Direction array int fy[] = {0, 0, 1, -1}; /// Direction array int cell[1000][1000]; /// If cell[x][y] = -1, then there is a mine int dist[1000][1000]; bool visited[1000][1000]; int row; int col; void BFS(int sou...
ALGO
0.999604
4.39319
9b13844a-95d9-4331-bbaa-59a865d9d2c3
ishandutta2007/codeforces
wiwiho/normal/1296/A.cpp
//#define NDEBUG #include <bits/stdc++.h> #include <bits/extc++.h> #define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define iter(a) a.begin(), a.end() #define riter(a) a.rbegin(), a.rend() #define lsort(a) sort(iter(a)) #define gsort(a) sort(riter(a)) #define mp(a, b) make_pair(a, b)...
ALGO
0.999565
4.596859
a25960a2-7f37-460e-a625-8642805f6fa6
ainiranasalsabil/178_ConditionalStatement
projectkedua/projectkedua.cpp
#include <iostream> using namespace std; int main() { int nBilangan; string status; srand(time(0)); nBilangan = rand() % 10; if (nBilangan % 2 == 0) { status = "Genap"; } else { status = " Ganjil"; } cout << "Bilangan adalah =" << nBilangan << endl; cout << " sta...
ALGO
0.999322
3.681929
0cb0186f-2959-4678-894c-8705ad0d23b3
ishandutta2007/codeforces
tadijasebez/normal/835/F.cpp
#include <stdio.h> #include <vector> using namespace std; const int Max_N=200050; struct Edge { int v,w; Edge (int a, int b) { v=a; w=b; } }; struct Node { vector<Edge> edges; } Tree[Max_N]; int parent[Max_N],a[Max_N],b[Max_N],c[Max_N]; long long u1[Max_N],u2[Max_N],v1[Max_N],v2[Max_N],dp[Max_N]; bool OnCicle[...
ALGO
0.99996
4.038104
b068304e-abff-4734-9388-77a177b9822b
Clastocarnate/BCSE303P
Scheduling_Algorithms/ShortestJobFirst.cpp
#include <iostream> using namespace std; struct Process{ int PID; int AT; int BT; int CT; int TAT; int WT; }; void SJB(Process proc[], int n){ int remaining[n]; for (int i=0; i<n; i++){ remaining[i] = proc[i].BT; } int complete = 0; int currentTime = 0; int sho...
ALGO
0.99999
3.768598
49163287-a380-4a4e-bfc6-c617566f207d
JoelHernandez343/cryptography
P01/affine/src/affine.cpp
#include <iostream> #include <time.h> // I'm Thanos #include <cstdlib> // For rand #include <vector> #include <algorithm> #include <filesystem> #include <fstream> #include <tuple> #include <string> #include "../../include/cxxopts.hpp" #include "../../include/json.hpp" #include "../../include/utf8.hpp" #include "affin...
TOOL
0.963427
6.518672
d230ea85-a773-4de3-af69-246e2b54aa38
naseem12007571/Interview-Revison-dsa-
34. Find First and Last Position of Element in Sorted Array.cpp
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int s = 0; int e = nums.size() - 1; int ansLeft = -1; int ansRight = -1; // Binary search for the leftmost occurrence while (s <= e) { int mid = s + (e - s) / 2; ...
ALGO
0.999896
6.605934
cb93de18-0dd9-4670-bf83-66f9648546e6
blasbarbagelata/modelo-y-simulacion
TP2/atomics/continuous/nlfunction.cpp
#include "nlfunction.h" void nlfunction::init(double t,...) { //The 'parameters' variable contains the parameters transferred from the editor. va_list parameters; va_start(parameters,t); //To get a parameter: %Name% = va_arg(parameters,%Type%) //where: // %Name% is the parameter name // %Type% is the paramete...
TOOL
0.973779
3.836421
7978232c-f8da-4e6c-ab95-8b6abfabc699
Ebrar-Orhan/ProgramlamaDilleri
2-.cpp
#include <stdio.h> #include <math.h> //a*x^2+b*x+c=0 denkleminin kklerini hesaplayan program. int main(){ int x; int a; int b; int c; int denklem=a*x*x+b*x+c; int delta; int x1; int x2; printf("a:"); scanf("%d",&a); printf("b:"); scanf("%d",&b); printf("c:"); scanf("%d",&c); delta=b*b-(4*a*c); ...
ALGO
0.999527
3.556193
05f4242f-916d-45b2-95b1-2aaef6fff771
soundofautumn/RenderEngine
src/engine/core/fill.cpp
// // Created by Autumn Sound on 2024/9/20. // #include <deque> #include "engine.hpp" using namespace RenderCore; void RenderEngine::draw_fill(const Fill &fill) { fill_polygon_seedfill(fill); } void RenderEngine::fill_polygon_seedfill(const Fill &fill) { // ็งๅญๅกซๅ……็ฎ—ๆณ• std::deque<Point> queue; queue.push...
TOOL
0.960236
5.490016
13aee5a9-e046-4ab0-8fa9-6482bb59983e
opensource-hisense/SmartTV-SeriesVidaaU7_NT
oss/part1/boost/boost_1_73_0/libs/math/example/root_finding_multiprecision_example.cpp
// Note that this file contains Quickbook mark-up as well as code // and comments, don't change any of the special comment mark-ups! // Example of root finding using Boost.Multiprecision. #include <boost/math/tools/roots.hpp> //using boost::math::policies::policy; //using boost::math::tools::newton_raphson_iterate; /...
ALGO
0.999088
3.445365
f5e73699-57b4-418d-b358-3d69daf39a40
MiraiHattori/project-euler
Problem30-39/2_32_pandigital_products.cpp
#include <iostream> #include <array> bool isPandigital(int a_1, int a_2, int a_3, int a_4, int a_5, int a_6, int a_7, int a_8, int a_9) { std::array<int, 10> digits{0}; digits.at(a_1)++; digits.at(a_2)++; digits.at(a_3)++; digits.at(a_4)++; digits.at(a_5)++; digits.at(a_6)++; digits.at(...
ALGO
0.997859
5.751117
bebe3e7c-3633-42bf-be8f-cf6ad9ba7f78
SamarNegm/Problem-Solving
primal fear.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; #define ll long long long long vst [ 2000005 ],ans,x; vector<long long>vp; bool num(long long y) { while(y) { if(y%10==0) { return false; } else ...
ALGO
0.999783
3.553096
8e9c3a55-c043-40e4-b848-dd2e3e10f615
fadilcse5bu/LeetCode-Problems-Solution
1. Easy/Two Sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { map <int, int> mp; vector <int> v; for(int i = 0; i < nums.size(); i++) { if(mp[target - nums[i]] != 0) { v.push_back(mp[target - nums[i]] - 1); v.push_back(i); ...
ALGO
0.999904
6.35161
1ec5b546-5c4c-4f9b-82e4-a822a20d406b
shajunguang/Algorithm_competition
Dynamic_practice/P2044_bee.cpp
// // Created by liu on 19-9-17. // //#include <iostream> //using namespace std; // //const int MAXN = 50; //int dp[MAXN]; // //int main() //{ // int N,a,b; // while(cin>>N){ // dp[0]=1; // dp[1]=2; // for(int i=2;i<MAXN;i++) // dp[i]=dp[i-1]+dp[i-2]; // for(int i=0;i<N;i++)...
ALGO
0.999849
3.991839
73c023e7-c2e7-4c91-8293-a73cb59dfea0
mdbasil07/C-
op12.cpp
#include <iostream> using namespace std; int main() { int a, b; cout << "Enter two numbers: "; cin >> a >> b; cout << (a == b ? "Numbers are equal" : "Numbers are not equal") << endl; return 0; }
ALGO
0.997845
4.780043
2c1ba99c-7cf6-443d-ad67-a9bc9b8968af
Prathamesh1407/LeetCode
0389-find-the-difference/0389-find-the-difference.cpp
class Solution { public: char findTheDifference(string s, string t) { int XOR=0; for(int i=0;i<s.length();i++) { XOR^=s[i]; XOR^=t[i]; } XOR^=t[t.length()-1]; return (char)XOR; } };
ALGO
0.99992
6.26763
08bee228-e2c8-4e42-a33a-97b56bd87ace
VDEN5/IU9-DM
MaxComponent.cpp
#include <iostream> #include <vector> #include <algorithm> struct Vertex { int id; std::vector<int> edges; bool visited; bool isRed; }; struct Component { std::vector<int> vertexes; int edgesCount; }; struct Edges { int indA, indB; }; void dfs(Vertex* vertex, std::vector<Vertex>& graph, ...
ALGO
0.99965
5.410374
acb26e50-b639-41f9-9a02-6f1046fbe9d6
AlBovo/Olinfo-WriteUps
Olinfo/training/ois_quadrilateral.cpp
// Punti: 100.0 #include<bits/stdc++.h> using namespace std; int main(){ long long n; cin >> n; vector<long long>v(n); for(long long &i:v) cin >> i; sort(v.begin(), v.end()); for(long long i=3; i<n; i++){ if(v[i-3] + v[i-2] + v[i-1] > v[i]){ cout << v[i-3] << " " << v[i-2] << " ...
ALGO
0.99993
3.453333
2e5253db-981e-4cb8-b4cb-c172fd671eab
JHvisionchen/KCFDP-matlab
piotr_toolbox/toolbox/channels/private/convConst.cpp
#include "wrappers.hpp" #include <string.h> #include "sse.hpp" // convolve one column of I by a 2rx1 ones filter void convBoxY( float *I, float *O, int h, int r, int s ) { float t; int j, p=r+1, q=2*h-(r+1), h0=r+1, h1=h-r, h2=h; t=0; for(j=0; j<=r; j++) t+=I[j]; t=2*t-I[r]; j=0; if( s==1 ) { for(; j<h0; j++...
ALGO
0.992897
4.814725
f055abae-baa7-4d7b-8637-d231cedc0007
sargun4/leetcode
784-insert-into-a-binary-search-tree/insert-into-a-binary-search-tree.cpp
class Solution { public: TreeNode* insertIntoBST(TreeNode* root, int val) { if(root==NULL) return new TreeNode(val); if(root->val<val){//go right root->right=insertIntoBST(root->right,val); }else if(root->val>val){//go left root->left=insertIntoBST(root->left,val); ...
ALGO
0.999956
5.829707
12af4b97-5d07-47ef-873b-b403b3eee912
shantanu726/singly-linked
CommonInterPoint.cpp
// /*Intersection Point in Y Shaped Linked Lists // Given two singly linked lists of size N and M, write a program to get the point where two linked lists intersect each other. // Example 1: // Input: // LinkList1 = 3->6->9->common // LinkList2 = 10->common // common = 15->30->NULL // Linked List 1 = 4->1->common /...
ALGO
0.995427
3.711118
7b90b56b-f271-46fa-8e59-a3d3ae940c45
sixnationn/Computer-Graphics-Coursework
common/maths.cpp
#include <common/maths.hpp> #include <glm/gtc/matrix_transform.hpp> glm::mat4 Maths::translate(const glm::vec3& v) { glm::mat4 translate(1.0f); translate[3][0] = v.x, translate[3][1] = v.y, translate[3][2] = v.z; return translate; } glm::mat4 Maths::scale(const glm::vec3& v) { glm::mat4 scale(1.0f); ...
TOOL
0.862556
7.343949
7638bfc9-cb96-4392-9e62-c175947e278e
ThisIsATest369/SensorsCalibration
lidar2camera/joint_calib/3rdparty/eigen3/doc/examples/class_CwiseUnaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template unary functor template<typename Scalar> struct CwiseClampOp { CwiseClampOp(const Scalar& inf, const Scalar& sup) : m_inf(inf), m_sup(sup) {} const Scalar operator()(const Scalar& x) const { return x<m_...
ALGO
0.958741
6.417363
a6a2da07-cec2-4ded-843b-030fbf6ce792
sainadth/codeforces
contest/DIV3-998/C.cpp
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #include <bits/stdc++.h> using namespace std; /* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_stat...
ALGO
0.999789
4.437976
a797b408-92aa-4adf-b9b2-f92e66434625
neonmicky/frameworks_av
media/libstagefright/codecs/amrnb/dec/src/bgnscd.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/bgnscd.c Functions: Bgn_scd_reset Bgn_scd ------------------------------------------------------------------------------ MODULE DESCRIPTION Background noise source characteristi...
ALGO
0.96763
6.9677
f0819a0d-8aff-4973-98ba-b4e6d6a93769
BaoTrung37/PTIT_Sources
SPOJ/P162PROG - ROUND 2G.cpp
/** * authur: Bao Trung (Koi` Cute) **/ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define all(x) (x).begin(), (x).end() #define set_arr(a,n); int a[n+5]; for(int i=0;i<n;i++)cin>>a[i]; #define set_vect(a,n); vector<int>a(n); for(auto &z : a)cin>>z; const int mod ...
ALGO
0.999923
5.31527
3fd35f46-1ea9-47a1-aefa-4c2a842733ce
smart-make/boost
libs/intrusive/test/external_value_traits_test.cpp
using namespace boost::intrusive; class MyClass { public: int int_; MyClass(int i = 0) : int_(i) {} friend bool operator > (const MyClass &l, const MyClass &r) { return l.int_ > r.int_; } friend bool operator == (const MyClass &l, const MyClass &r) { return l.int_ == r.int_; } frie...
TOOL
0.871033
4.814094
a6623fb2-6876-4ce9-a6e8-fd8d38ebc6ef
codewithaditya07/C_plusplus
REV.CPP
// Return type parametre revese number #include <iostream> using namespace std; class abc { public: int rev(int x) // Reserve { int t = 0, r; while (x > 0) { r = x % 10; t = t * 10 + r; x = x / 10; } return t; } }; int main() { ...
ALGO
0.999501
4.172203
3fac97c8-722a-4301-a20c-ccd66bb0c0ad
Munaat/University-stuff
ะกะ˜ะะžะ”(5.2-3).cpp
#include <iostream> #include <fstream> #include <string> #include <set> #include <random> #include <chrono> #include <vector> #include <algorithm> using namespace std; string dir = "C:/Users/munaat/CLionProjects/SAPD1/"; struct Product { char name[6]; int code; }; struct IndexEntry { int code; stream...
DATA
0.947139
6.555679
439b91c2-d3ff-4603-8cb7-28efb01dc10b
HarshitC-27/ESO-207-Assignment-Solutions
Assignment 1/1.cpp
#include <iostream> using namespace std; int main() { // #ifndef ONLINE_JUDGE // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); // #endif int t; cin >> t; while(t--) { int n; cin >> n; long long pre_sum[n]; long long max_...
ALGO
0.999849
3.892402
d464cfee-e9bb-4fa2-9652-02735269da2b
ishandutta2007/codeforces
wzyyn/normal/1382/C1.cpp
#include<bits/stdc++.h> #define ll long long #define uint unsigned #define ull unsigned ll #define pii pair<int,int> #define pll pair<ll,ll> #define PB push_back #define fi first #define se second #define For(i,j,k) for (int i=(int)(j);i<=(int)(k);i++) #define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--) #define CLR...
ALGO
0.999987
3.661864
76656179-a8bd-47e2-ac6a-f4a664f949a8
rakibunateed/Problem-Solving
A_Twice.cpp
#include <bits/stdc++.h> using namespace std; #define mod 1e9 + 7 typedef long long int ll; const ll mx = 2e5 + 123; void solution() { ll n; cin >> n; vector<ll> v(n); ll cnt = 0; for (ll i = 0; i < n; i++) cin >> v[i]; sort(v.begin(), v.end()); for (ll i = 0; i < n - 1; i++) { if (v[i] == v[i + 1]) {...
ALGO
0.999822
5.257362
fb275e14-5b84-4625-b13e-530adeda3755
browndeer/lammps-ocl
src/compute_centro_atom.cpp
/* ---------------------------------------------------------------------- Contributing author: Michel Perez (U Lyon) for non-fcc lattices ------------------------------------------------------------------------- */ #include "string.h" #include "stdlib.h" #include "compute_centro_atom.h" #include "atom.h" #include "...
ALGO
0.999433
6.638329
438221ca-fe7b-4203-8d4f-df156b2b7689
ishandutta2007/codeforces
davoth/normal/1696/D.cpp
/*#pragma GCC optimize("Ofast,unroll-loops") #pragma comment(linker, "/stack:200000000") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma,tune=native")*/ /*#pragma GCC optimize("O2") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx,avx2,sse,sse2,fma")*/ #include <bits/stdc++.h> using...
ALGO
0.999827
5.014498
2d23eb73-f92b-41e7-94a8-59f89ae53e29
ishandutta2007/codeforces
poopi/normal/281/A.cpp
/* in the name of Allah */ #include <iostream> #include <algorithm> #include <string> #include <vector> #include <ctime> #include <set> using namespace std; #define int64 long long #define P pair<int, int> int n, cnt; int arr[200]; int gcd(int a, int b){ return (b == 0 ? a : gcd(b, a ...
ALGO
0.999753
3.651422
c6abe134-7652-46ae-8675-ce68410b7d0e
Michaltbk/P3_33104_MW
P3_33104_MW-Projekt3/zad4.cpp
#include <cstdio> #include <cstdlib> #include <time.h> #include <thread> #include <chrono> #define SIZE 100 #define THREADS 10 #define CHUNK (SIZE / THREADS) void add(int id, int* a, int* b, int* c) { int start = id * CHUNK; int end = start + CHUNK; for (int i = start; i < end; i++) { c[i] = a[i] ...
ALGO
0.992018
4.402089
fa65f4c1-56c0-4cf4-bc19-9995016fa2c3
Zielon/3DScanning
Project/Tracker/external-libs/Eigen/doc/examples/Tutorial_ArrayClass_accessors.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXXf m(2,2); // assign some values coefficient by coefficient m(0,0) = 1.0; m(0,1) = 2.0; m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0); // print values to standard output cout << m << endl << endl; ...
ALGO
0.95816
3.536336
104db358-62a9-4f6c-819e-712a2d525df4
arundeegutla/Programming-Team
Practices/2023/3/JV/a.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<ll>; using vvi = vector<vi>; using vvvi = vector<vvi>; #define all(x) begin(x), end(x) void solve() { string s; getline(cin, s); ll sum = 0; for(auto c : s){ sum += (int)c; } cout << (char) (sum/s.siz...
ALGO
0.997697
4.553101
65750ec2-4cb9-4e2a-8c16-2f7b7fc21c96
muaadh-hasan/FCAI_CairoUniversity_Assignments-Year2Term2
Assigments_FCI-CU_Level 2_TIRM2_CairoUniversity/DataStracture_Assigments/A2_DataStracture_20170411/A2_P4_20170411/main.cpp
#include <iostream> #include <vector> using namespace std; bool non_degenerate(vector<int> & v,int Size) { for(int i=0;i<Size-2;i++){ for(int j=i+1;j<Size-1;j++){ for(int k=j+1;k<Size;k++){ if( (v[i]+v[j])>v[k] && (v[i]+v[k])>v[j] && (v[k]+v[j])>v[i] ){ ...
ALGO
0.999598
4.683087
d25d7d9f-fd80-4d53-a3ca-7e8a560edb52
Prathmesh311/CompitativeProgramming
Backtracking/(leetcode)N-Queens.cpp
class Solution { public: vector<vector<string>> solveNQueens(int n) { vector<vector<string>> ans; vector<string> temp; //Making initital matrix for(int i=0; i < n; i++){ temp.push_back("."); for(int j=1; j < n; j++){ temp[i] = temp[i] ...
ALGO
0.999778
6.018707
fe8dbae4-516c-4ff7-9149-c30d045f61ad
iampranjaldangwal/Leetcode
1894-find-the-student-that-will-replace-the-chalk/1894-find-the-student-that-will-replace-the-chalk.cpp
class Solution { public: int chalkReplacer(vector<int>& chalk, int initialChalkPieces) { long long totalChalkNeeded = 0; for (int studentChalkUse : chalk) { totalChalkNeeded += studentChalkUse; } int remainingChalk = initialChalkPieces % totalChalkNeeded; ...
ALGO
0.999829
5.199553
1dc63bcd-0e4d-4927-8952-9a59c5103640
Prithviraj2118/Leetcode_Problems
0746-min-cost-climbing-stairs/0746-min-cost-climbing-stairs.cpp
class Solution { public: int solve(vector<int> &dp, vector<int> &cost, int i){ if(i>=cost.size()) return 0; if(dp[i] != -1) return dp[i]; int a = cost[i] + solve(dp, cost, i+1); //1 step int b = cost[i] + solve(dp, cost, i+2); //2 steps return dp[i] = min(a,...
ALGO
0.999951
5.985464
ac8e510d-2108-4cc3-960f-2999cc8c6993
shindo/TeamNotebook
src/simplex.cpp
// maximize c^T x // Ax <= b // x >= 0 struct LPSolver { int m, n; ve<int> B, N; ve< ve<double> > D; LPSolver(const ve< ve<double> > &A, const ve<double> &b, const ve<double> &c) : m(b.size()), n(c.size()), N(n+1), B(m), D(m+2, ve<double>(n+2)) { REP(i, 0, m) REP(j, 0, n) D[i][j] = A[i][j]; REP(i, 0, m) {...
ALGO
0.999767
4.976697
19d90785-f637-4583-92a4-da4a0d25fea8
Tama4649/18gou
source/book/makebook2021.cpp
#include "../types.h" #if defined (ENABLE_MAKEBOOK_CMD) && defined(YANEURAOU_ENGINE_DEEP) // ใ„ใพใฎใจใ“ใ‚ใ€ใตใ‹ใ†ใ‚‰็Ž‹ใฎใฟๅฏพๅฟœใ€‚ // ๆŽข็ดขใ•ใ›ใŸๅฑ€้ขใฎใ™ในใฆใฎๆŒ‡ใ—ๆ‰‹ใฎ่จชๅ•ๅ›žๆ•ฐ(โ‰’่ฉ•ไพกๅ€ค)ใŒๆฌฒใ—ใ„ใฎใงใ€ใ“ใฎๅฎš่ทก็”ŸๆˆใƒซใƒผใƒใƒณใฏNNUEใจใฏ็›ธๆ€ง่‰ฏใใชใ„ใ€‚ // ------------------------------ // ใ‚นใƒผใƒ‘ใƒผใƒ†ใƒฉใ‚ทใƒงใƒƒใ‚ฏๅฎš่ทกๆ‰‹ๆณ• // ------------------------------ /* ใ‚นใƒผใƒ‘ใƒผใƒ†ใƒฉใ‚ทใƒงใƒƒใ‚ฏๅฎš่ทกใ‚ณใƒžใƒณใƒ‰ // ใตใ‹ใ†ใ‚‰็Ž‹ใฎใฟไฝฟใˆใ‚‹ใ‚ณใƒžใƒณใƒ‰ใ€‚ > makebook s_te...
ALGO
0.975286
3.977248
bc74e6d5-19e6-4419-ae9c-125ad55aa9b4
201311113/BaekjoonCode
๊ตฌํ˜„/์„คํƒ•๋ฐฐ๋‹ฌ_2839.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<cstring> #include<string> #include<cstdio> #include<stack> #include<algorithm> #include<cmath> #include<vector> #include<queue> #include<ctime> #include<set> #include<sstream> using namespace std; typedef long long ll; int main() { int n; cin >> n; int ans ...
ALGO
0.999923
3.643604
1b204fcc-8e63-4c87-9a06-131c0ac4a8bc
rapidlua/barebone-c
llvmorg/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp
#include "CriticalAntiDepBreaker.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeG...
ALGO
0.986326
6.380022
1e6af526-63e7-4aa8-9b23-bca5864d304f
rsummers11/CADLab
LymphNodeRFCNNPipeline/nifty_reg-1.3.9/nifty_reg/reg-lib/_reg_maths.cpp
#ifndef _REG_MATHS_CPP #define _REG_MATHS_CPP #include "_reg_maths.h" #include "_reg_tools.h" #define mat(i,j,dim) mat[i*dim+j] /* *************************************************************** */ #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) static double maxarg1,maxarg2; #define FMAX(a,b) (maxarg1=(a),maxa...
ALGO
0.999237
5.8192
e20a7ccd-1e00-43db-b467-d0969e10c7d5
hunkarlule/Cpp_Studies
Cpp_EssentilaTraining/08-solution.cpp
// 08-solution.cpp by Bill Weinman [bw.org] // updated 2022-06-04 #include <format> #include <iostream> using std::format; using std::cout; // non-recursive factorial template template<typename T> T factorial(T n) { auto result = n; while(n > 1) { result *= --n; } return result; } int main() ...
ALGO
0.994848
6.40683
2f547219-32df-4e13-8f06-f15d8a4adfa8
norshtein/train
poj3440/main.cpp
#include <iostream> #include<algorithm> #include<vector> #include<set> #include<string> #include<cmath> #include<cstdio> using namespace std; const char* prefix[] = {"","Probability of covering 1 tile = ","Probability of covering 2 tiles = ","Probability of covering 3 tiles = ","Probability of covering 4 tiles = "};...
ALGO
0.997481
3.820009
5708e284-8540-42df-a443-bfd8f67ed6ea
sharc-lab/RealProbe
llvm-project/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
// <forward_list> // template <class Predicate> void remove_if(Predicate pred); #include <forward_list> #include <iterator> #include <cassert> #include <cstddef> #include "min_allocator.h" #include "counting_predicates.hpp" bool g(int i) { return i < 3; } int main() { { typedef int T; typed...
TEST
0.930084
6.508732
b9846d79-108e-4394-a9ac-f1d9f0c0e9a3
Ganpatsingh05/Leetcode-Solutions
8993-5297-151-reverse-words-in-a-string/8993-5297-151-reverse-words-in-a-string.cpp
class Solution { public: string reverseWords(string s) { int n = s.length(); int i = n-1; string arr; while(i >= 0){ while( i>=0 && s[i] == ' '){ i--; } if(i<0){ break; } int j = i; ...
ALGO
0.99998
6.020727
72f64998-b50e-4b23-a667-ebb3e2d0328d
Henrik-Yao/NEUQ-ACM-Solution
week3/ๅพๅญๆฏ…/ๅŒๅ‘จ่ต›/7-8.cpp
#include <iostream> using namespace std; int minnu; void Find(int a[],int f,int front,int end){ if(front==end) { minnu=min(minnu,end); } else{ int mid=(front+end)/2; if(a[mid]>=f) Find(a,f,front,mid); else if(a[mid]<f) Find(a,f,mid+1,end); } } int main(){ int Nu,fi; scanf("%d %d",&Nu...
ALGO
0.999978
3.767718
cd3a3a8b-57f2-4ed6-9a8a-88f56791d63b
tronglacnhue/Leetcode
DP/houseRobber2.cpp
class Solution { public: int rob(vector<int> &nums) { int n = nums.size(); if (n == 1) { return nums[0]; } int range1 = robber(nums, 0, n - 2); int range2 = robber(nums, 1, n - 1); return max(range1, range2); } private: int robber(vector<int> &nums, int start, int end) { ...
ALGO
0.99993
6.057973
3f21f7c9-95fc-4a02-a8ca-ba177f3886cd
longcong1611/Ky_thuat_lap_trinh_C-
RECURSIVE008.cpp
// Tรญnh tแป•ng cรกc sแป‘ nguyรชn tแป‘ trong khoแบฃng cho trฦฐแป›c #include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; bool check(int n) { if (n < 2) return 0; else { for (int i = 2; sqrt(n) >= i; i++) { if (n % i == 0) { return 0; ...
ALGO
0.999941
4.871754
70838fcf-f55d-48e5-aa9b-d32cc82c1c48
Popotanu/sandbox_kyopro
abc058/B/main.cpp
#include <bits/stdc++.h> using namespace std; /* -------------ACL--------------- */ // #include <atcoder/fenwicktree> // #include <atcoder/segtree> // #include <atcoder/lazysegtree> // #include <atcoder/string> // // #include <atcoder/math> // #include <atcoder/convolution> // #include <atcoder/modint> // // #include...
ALGO
0.99987
4.083292
cf6208bc-5578-4dfe-8e02-0056fa9a7753
sakurmoti/atcoder
ABC/313C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int N; cin >> N; vector<ll> A(N); for(auto &v : A) cin >> v; //ๆ“ไฝœใ‚’่กŒใฃใฆใ‚‚็ทๅ’Œใฏๅค‰ใ‚ใ‚‰ใชใ„ //ๆœ€็ต‚็š„ใซใฏๅ…จใฆใฎๅ€คใŒๅนณๅ‡ใซใชใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ ll sum = 0; for(int i = 0; i < N; i++){ sum += A[i]; } ll avg = sum/N; //ไฝ™ใ‚ŠใŒๅ‡บใ‚‹ใชใ‚‰ๅˆ‡ใ‚Šๆจใฆใชใฎใงใ€ๆœ€็ต‚็š„...
ALGO
0.999897
4.013777
d6dcffd2-f567-4699-9ac0-a80df24ec1de
xXNembiXx/ScriptDev2_333
scripts/outland/nagrand.cpp
/* ScriptData SDName: Nagrand SD%Complete: 90 SDComment: Quest support: 9849, 9868, 9874, 9918, 9991, 10044, 10085, 10107, 10108, 10172, 10646. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) SDCategory: Nagrand EndScriptData */ /* ContentData mob_shattered_rumbler mob_lump mob_sunspring_vil...
TOOL
0.940869
4.288225
b391f1d8-dd89-4e15-af87-cdf3a3dfef48
nazmulnnb/Solved-Problems
LightOJ/LightOJ 1045 - Digits of Factorial.cpp
#include <bits/stdc++.h> using namespace std; double dp[1000005]; int main() { dp[0]=0.0; dp[1]=0.0; for(int i=2;i<1000002;i++) dp[i]=log(i)+dp[i-1]; int tt; cin>>tt; for(int t=1;t<=tt;t++) { int a,b; cin>>a>>b; long long int ans=(long long int)(dp[a]/log(b)...
ALGO
0.999007
4.499201
33f13a3c-32ad-40da-817b-4682c6e2c565
KijoHassen/Cpp-upload
Learning/Pointer/const_p.cpp
#include <iostream> int main(){ //ๅธธ้‡ๆŒ‡้’ˆ int a = 10; int b = 20; const int *p = &a; //*p = 30; ๅธธ้‡ๆŒ‡้’ˆๆŒ‡ๅ‘็š„ๅ€ผไธๅฏไปฅๆ”น p = &b; //ๆŒ‡้’ˆๆŒ‡ๅ‘ๅฏไปฅๆ”น //ๆŒ‡้’ˆๅธธ้‡ int *const q = &a; *q = 30;//ๆŒ‡้’ˆๆŒ‡ๅ‘็š„ๅ€ผๅฏไปฅๆ”น //q = &b;//ๆŒ‡้’ˆๆŒ‡ๅ‘ไธๅฏไปฅๆ”น // const int *const r = &a; //ๆŒ‡้’ˆๆŒ‡ๅ‘ๅ’ŒๆŒ‡้’ˆๆŒ‡ๅ‘็š„ๅ€ผ้ƒฝไธๅฏไปฅๆ”น system ("pause"); ...
TOOL
0.975308
3.049543
909f4cb0-fd25-49cd-87bd-799b455e8e1a
KrisKStoyanov/cpp_challenges
challenge_d/challenge_d/ConsoleApplication5uni.cpp
//References: //Source: 210CT - Week 3 Advanced task code //Author: Kristiyan Stoyanov //Source: 210CT - Week 4 Lecture slides: Quick Sort pseudo-code //Author: Diana Hintea #include "stdafx.h" #include <iostream> #include <string> #include <algorithm> #include <vector> #include <random> #include <functional> using n...
ALGO
0.998617
4.360716
1a8c41aa-87f9-4092-bccb-1af84755ac21
zhangbowen-jpg/Code--Practice
C++็ผ–็จ‹่ฏญ่จ€/vector.cpp
/************************************************************************* > File Name: vector.cpp > Author: zhangbowen > Mail: > Created Time: 2020ๅนด03ๆœˆ03ๆ—ฅ ๆ˜ŸๆœŸไบŒ 13ๆ—ถ37ๅˆ†57็ง’ ************************************************************************/ #include<iostream> #include<stdio.h> #include<string.h> #include<stdli...
TOOL
0.888579
3.918097