uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
17b5efa5-a4ec-4471-8398-1b3d36d2ff92
SabrinaNadhrah/FruitShooting
SaliniTry/main.cpp
#include <iostream> #include <cstdlib> #include <ctime> #include <graphics.h> #include "fruit1.h" #include "fruit1.cpp" void initializeFruits(Fruit* fruits[]) { for (int i = 0; i < numFruits; i++) { int randomSize = rand() % 3 + 1; // Randomly assign size 1, 2, or 3 switch (randomSize) { ...
TOOL
0.944511
5.034742
7edcdc2e-0da4-4224-92f9-127200ed9562
sankar-2002/QuestionsOfBitManip
sieveOfEratosthenus/smallestprimefactor.cpp
#include <iostream> using namespace std; void primeFactor(int n) { int spf[n+1] = {0}; //declaring an array and initializing it with zero... for(int i=2; i<=n; i++) { //then from 2-->n initializing it with it's own value as every number is factor of it's own spf[i]=i; } for(int i=2;i<=n;i+...
ALGO
0.999982
4.18552
0b61e9ce-e904-4bc7-b29d-87d756593007
Saie12/DSA_C-CPP
06-Functions/Advanced functions problems/sumNaturalno.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int sum(int n) { int ans = 0; for (int i = 1; i <= n; i++) { ans += i; } return ans; } int32_t main() { int n; cin >> n; cout << sum(n) << endl; }
ALGO
0.999462
5.679042
1a8b334a-dc7c-4caa-8eb4-c68f7643977c
MarioFengW/SFML-Project
BubbleSort.cpp
#include "BubbleSort.h" #include <thread> #include <chrono> #include <iomanip> using namespace std; using namespace sf; // Function to visualize and perform Bubble Sort void BubbleSort(vector<int> &arr, RenderWindow &window, Text &text, bool &sorting, Font &font) { int n = arr.size(); sorting = true; tex...
ALGO
0.986337
5.459287
91f12b0f-275d-4723-be0c-339f68b2dc6d
sarvex/leetcode-beef
solution/2100-2199/2158.Amount of New Area Painted Each Day/Solution.cpp
class Node { public: Node* left; Node* right; int l; int r; int mid; int v; int add; Node(int l, int r) { this->l = l; this->r = r; this->mid = (l + r) >> 1; this->left = this->right = nullptr; v = add = 0; } }; class SegmentTree { private: ...
ALGO
0.999959
6.029727
2410d7fd-6ca4-4e1f-a7e0-c2d3663f6b2d
Mahesh7741/C-CPP-Codes
DSA/bitManipution/findParity.cpp
#include <bits/stdc++.h> using namespace std; string findPrity(int n){ int cnt=0; while(n){ n=n&(n-1); cnt++; } if(cnt&1==0) return {"even"}; return {"odd"}; } int main(){ int n=7; cout<<findPrity(n)<<endl; return 0; }
ALGO
0.99974
4.540285
6f0eedcb-b8c0-44e5-8ae6-8770da3b18eb
AbdallahMedo/Chem-Tech
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.998733
6.76775
2a88f3f2-4b68-4aa7-8efa-8dd7a8d82d3d
Hritiksum/data_structure
Linkedlist.cpp
#include<bits/stdc++.h> using namespace std; //linkedlist node class node{ public: int data; node* next; node(int d):data(d),next(NULL){} }; //lenght of LL int Lenghtll(node* head){ if(head==NULL){ return 0; } int lenght=0; node* temp=head; while(temp){ temp=temp->next;...
ALGO
0.999869
3.79898
c0b23256-4d19-4fa6-8a57-a6ab47720a32
qNumezz71/tapi
clang/lib/Analysis/ThreadSafetyTIL.cpp
#include "clang/Analysis/Analyses/ThreadSafetyTIL.h" #include "clang/Basic/LLVM.h" #include "llvm/Support/Casting.h" #include <cassert> #include <cstddef> using namespace clang; using namespace threadSafety; using namespace til; StringRef til::getUnaryOpcodeString(TIL_UnaryOpcode Op) { switch (Op) { case UOP_Mi...
ALGO
0.987188
4.640091
9b361b5f-ccf5-41ad-9b1f-86bd059d63f6
haiguanplayer/ACM-ICPC
51nod/51nod-1350.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; ll f[105] = {0,1,1},w[1005] = {0,1,1}; void Init() { for(int i = 3;i <= 84;i++) { f[i] = f[i-1] + f[i-2]; w[i] = w[i-1] + w[i-2] + f[i-2]; } } ll p(int i,ll j) { if(j ==...
ALGO
0.99998
3.562648
bae2f7d0-8e41-46d6-a3e6-b488e507f787
21Shadow10/DSA
GeeksForGeeks/Trees/001. Count Leaves in a Binary Tree/code.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; }; Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; temp->right = NULL; return temp; } Node* buildTree(string str...
ALGO
0.999559
6.665504
db8d9329-eb57-465e-beec-2f5c365c7c2d
BogdanPecheritsa/Lab4algoritms
task3.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define MAXOP 100 #define NUMBER '0' int getop(char[]); void push(double); double pop(void); int main() { int type; double op2; char s[MAXOP]; while ((type = getop(s)) != EOF) { switch (type) { case NUMBER: push(atof(s)); break; ...
ALGO
0.999275
3.682633
57a3e483-91dd-44c2-bce4-58d285704c9f
anhvvcs/corana
libs/z3/src/tactic/core/collect_occs.cpp
#include "ast/ast.h" #include "tactic/goal.h" #include "util/hashtable.h" #include "tactic/core/collect_occs.h" bool collect_occs::visit(expr * t) { if (m_visited.is_marked(t)) { if (is_uninterp_const(t)) m_more_than_once.mark(t); return true; } m_visited.mark(t); if (is_uni...
ALGO
0.991046
5.953178
d38eab2b-e389-45dd-9921-754ec38ccf09
sgc109/leetcode-solutions
word-search/word-search.cpp
class Solution { int N, M; bool inRange(int row, int col) { return 0 <= row && row < N && 0 <= col && col < M; } int toHash(int row, int col) { return row * 10 + col; } bool solve( int row, int col, int po...
ALGO
0.999795
6.341435
aba351a9-0e85-4941-8103-7a9ad2b837be
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/DSA/STL/DistinctPairs_20200629135702.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #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 printVect(vect,dataStruc...
ALGO
0.999974
3.307152
93613001-84c1-4bb5-bea4-1c2174567191
VitamintK/AlgorithmProblems
hackerrank/week_of_code_20/B_nondivisible_subset.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ //4 am to 4:21 am long long n; int k; long long as[100001]; long long mods[100] = {0}; ci...
ALGO
0.999938
3.471931
bb861bb4-7f0c-4330-bd3d-e7aafdb9c692
simbody/simbody
Simbody/tests/adhoc/CompliantBlockImpact.cpp
/* This adhoc test is for use in comparing compliant contact impact with higher-performance approximations such as the PLUS method. The system is a single block with contact spheres at each corner. The intent here is to extract a lot of detailed information from the simulation during the evolution of the impact so we'l...
ALGO
0.941096
6.524334
bbe9a987-ed9c-4794-89d8-d6b2025dad5c
PauwayHu/2023c
Week13/week13-4a.cpp
#include <stdio.h> int main() { int n; scanf("%d",&n); int leap=0; if(n%400==0) leap=1; else if(n%100==0) leap=0; else if(n%4==0) leap=1; else leap=0; if(leap==1) printf("%d is a leap year.\n",n); else printf("%d is not a leap year.\n",n); } //J褸y~AP_y~O_|~
ALGO
0.999971
3.183311
faaa27c3-678d-4574-83ab-1419e8b07dc9
huzaifa9999/leetcode-practice
0005-longest-palindromic-substring/0005-longest-palindromic-substring.cpp
class Solution { public: string pfromcenter( int i,int j,string s) { while(i>=0&&j<s.length()&&s[i]==s[j]) { i--;j++; } return s.substr(i+1,j-i-1); } string longestPalindrome(string s) { if(s.length()==0) return ""; ...
ALGO
0.999985
6.03169
ca6ef77c-a8a9-47ab-99b6-20a1b5f9a502
dsstest/Mojo-Tec-Skyfire-4.0.6a-
src/server/scripts/Archived_Scripts/ZulGurub/boss_thekal.cpp
/* ScriptData SDName: Boss_Thekal SD%Complete: 95 SDComment: Almost finished. SDCategory: Zul'Gurub EndScriptData */ #include "ScriptPCH.h" #include "zulgurub.h" #define SAY_AGGRO -1309009 #define SAY_DEATH -1309010 enum eSpells { SPELL_MORTALCLEAVE = 22859, SPELL_SILENCE ...
TOOL
0.969572
6.926561
2d0db81d-ae7b-4d5c-90e7-914280cf3f18
satyamahinsa/codeforces-solution
158A - Next Round/next_round.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0);cin.tie(0); int n, k, ans = 0; cin >> n >> k; int a[101]; for (int i = 1; i <= n; i++) { cin >> a[i]; } if (n >= k) { for (int i = 1; i <= n; i++) { if (a[i] ...
ALGO
0.999974
3.894708
0c90c7da-be8b-46e2-9b2c-8a19bc8daf5b
alvadorn/MiniGPortugol
src/lexanalyzer/states.cpp
#include "states.h" #include "../symbols/tokentype.h" #include <algorithm> /*std::map<uint8_t, std::map<Symbol, uint8_t> MiniGPortugol::States::states = { { 0, { NUMBER, 1 }, { APOSTROPHE, 4 }, { D_SLASH, 7 }, { LETTER, 9 ...
ALGO
0.972651
4.527974
b8db768a-c43f-4499-ae19-5a1ca1753fd7
Daek-You/Algorithm
C++/BOJ/단계별로 풀어보기/14. 집합과 맵/[BOJ_10815] 숫자 카드.cpp
#include <iostream> #include <set> using namespace std; int main(void) { cin.tie(NULL); ios_base::sync_with_stdio(false); int N; cin >> N; set<int> myCards; for (int i = 0; i < N; i++) { int cardNum; cin >> cardNum; myCards.insert(cardNum); } int M; cin >> M; for (int i = 0; i < M; i++) { int ca...
ALGO
0.999898
4.243346
5517e22b-a5fb-42f6-98da-89fe502ccbf1
lunar0724/source-sdk-2013-multiplayer-fixes
mp/src/game/shared/achievements_hlx.cpp
#include "cbase.h" #ifdef GAME_DLL // this gets compiled in for HL2 + Ep(X) only #if ( defined( HL2_DLL ) || defined( HL2_EPISODIC ) ) && ( !defined ( PORTAL ) ) #include "baseachievement.h" #include "prop_combine_ball.h" #include "combine_mine.h" #include "basegrenade_shared.h" #include "basehlcombatweapon_shared.h...
ALGO
0.866285
6.098289
ace9ef28-8321-4a2a-86d6-98b984494a6b
LucSam/mrtrix3-deep-atropos
cpp/cmd/tck2fixel.cpp
#include "algo/loop.h" #include "command.h" #include "image.h" #include "progressbar.h" #include "fixel/fixel.h" #include "fixel/helpers.h" #include "fixel/loop.h" #include "dwi/tractography/mapping/loader.h" #include "dwi/tractography/mapping/mapper.h" #include "dwi/tractography/mapping/writer.h" using namespace MR...
DATA
0.887699
6.285989
7325a585-8104-49a5-99fa-8d09602774cc
ZhenshengLee/AI-EXPRESS
source/solution_zoo/xstream/methods/vehicle_plate_match_method/src/match_strategy/parse_config_from_json.cpp
/* * Copyright (c) 2019 Horizon Robotics. All rights reserved * @Author jianglei.huang * @version 0.0.1 * @date 2019.10.22 */ #include "match_strategy/parse_config_from_json.hpp" namespace hobot { namespace vehicle_match_strategy { void ParseJsonMatch::DoParsing(std::ifstream &ifs) { Json::Value config; J...
CONFIG
0.867933
5.366876
18fc3675-2a66-4eb6-a46d-e06b98336009
sarvex/leetcode-vala
solution/1300-1399/1315.Sum of Nodes with Even-Valued Grandparent/Solution.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.999691
5.870495
c31d7511-c094-44bc-9dad-88ec0df375fd
GUDHI/gudhi-devel
src/Alpha_complex/utilities/alpha_complex_persistence.cpp
#include <boost/program_options.hpp> #include <CGAL/Epick_d.h> #include <CGAL/Epeck_d.h> #include <gudhi/Alpha_complex.h> #include <gudhi/Persistent_cohomology.h> // to construct a simplex_tree from alpha complex #include <gudhi/Simplex_tree.h> #include <gudhi/Points_off_io.h> #include <iostream> #include <string> #...
ALGO
0.989406
6.917639
0a271b35-1d6c-4d66-9bd1-08eda2fe68b9
darxharsh373/DSA_C-
Array_3/tempCodeRunnerFile.cpp
void reverseArray(vector<int> &v) { // int n=v.size(); // vector<int> temp(n); // for(int i=0;i<n;i++){ // temp[i]=v[n-i-1]; // } // for(int i=0;i<n;i++){ // v[i]=temp[i]; // } // }
ALGO
0.997269
4.713075
6f0dbd87-ee1f-4477-9178-3d03a2fd45c3
tokotoko9981/AtCoder
ABC/ABC319/A.cpp
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vii = vector<vector<int>>; using vc = vector<char>; using vcc = vector<vector<char>>; using vs = vector<string>; using ll = long long; #define rep(i, n) for (ll i = 0; i < (n); i++) #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(),...
ALGO
0.992545
3.258411
03892039-0ca4-4ec3-a4c8-115b94f709bc
project-rig/old-rig_routing_tables
desktop/ordered_covering.cpp
#include <ctime> #include <iostream> #include <fstream> #include <stdio.h> #include <stdlib.h> #include "ordered_covering.h" #include "default_routes.h" int main(int argc, char* argv[]) { // We expect two arguments; an input routing table file and an output routing // table file. An optional 4th argument is the ta...
ALGO
0.977636
5.771145
7539f70f-9d42-43ef-9219-702fed5c8b14
CodeWithDevesh/LeetCode
0053-maximum-subarray/0053-maximum-subarray.cpp
class Solution { public: int maxSubArray(vector<int>& nums) { int sum = nums[0]; int k = 0; for(int i = 0; i < nums.size(); i++){ k += nums[i]; k = max(nums[i], k); sum = max(sum, k); } return sum; } };
ALGO
0.999945
6.235713
0ff2bf63-d8f0-4ec4-b389-17da39855346
Liuyi-Wang/LeetCode
src/1057_Campus_Bike.cpp
class Solution { public: struct Dwb { int distance; int worker; int bike; Dwb(int d, int w, int b) : distance(d), worker(w), bike(b) {} }; struct less_than { inline bool operator() (const Dwb& dwb1, const Dwb& dwb2) { if (dwb1.distance != dwb2.dis...
ALGO
0.999977
5.630322
bdb826af-9097-4370-87d8-d3f536b914b6
Sumant3086/LeetCode-Solution
9.Palindrome Number.cpp
// 9. Palindrome Number // Solved // Easy // Topics // Companies // Hint // Given an integer x, return true if x is a // palindrome // , and false otherwise. // Example 1: // Input: x = 121 // Output: true // Explanation: 121 reads as 121 from left to right and from right to left. // Example 2: // Input: x = -121 /...
ALGO
0.999597
5.637591
0904aba7-d1e3-425e-9ace-74ce87506398
iampiyush/Algorithms_interview
windowofKsize.cpp
#include<iostream> #include<cstdio> #include<ctime> #include<cstring> #include<unistd.h> #include<algorithm> #include<stack> #include<deque> using namespace std; int iterSum(int a[],int size,int iter) { int i,j; int sum=0; if(iter>size-1) { cout<<"Invalid Input...\n"; return 0; } int n; n=size-1; ...
ALGO
0.999759
3.189328
563768e4-148b-44b8-8904-0cf6f349d51f
HenryNoh/Coding-Test
2021line intern/2_효율성x.cpp
#include <string> #include <vector> using namespace std; vector<int> solution(vector<int> array) { vector<int> answer; int temp; for (int i = 0; i < array.size(); i++) { temp = -1; for (int j = i - 1; j >= 0; j--) { if (array[j] > array[i]) { ...
ALGO
0.999974
4.893164
8f6a8f4b-f5e4-47cc-8c83-aade518d36f6
Nayassyl/pp1
lab66/r.cpp
#include <iostream> using namespace std; char upp( char s){ if ( s >= 'a' && s <= 'z') return int (s - 32); else return s; } int main (){ char s; cin >> s; cout << upp(s); }
ALGO
0.997143
4.134603
832379d5-b004-4a7c-8d5e-6b9eae1e8f3e
atulbunkar/leetcode
768-max-chunks-to-make-sorted-ii/768-max-chunks-to-make-sorted-ii.cpp
class Solution { public: int maxChunksToSorted(vector<int>& arr) { int ans = arr.size(); int n = arr.size(); stack<int> st; for(int i = 0 ; i < n ; i++){ int curmax = st.empty()?arr[i]: max(st.top(),arr[i]); while(!st.empty() and arr[i] < st....
ALGO
0.999981
5.767748
80b3022d-3a62-448a-b00b-f118521a5ada
ishandutta2007/codeforces
ae04071/normal/1214/B.cpp
#include <bits/stdc++.h> using namespace std; int a,b,n; int main() { scanf("%d%d%d",&a,&b,&n); int ans=0; for(int i = min(n, b); n-i <= a && i>=0; i--) ans++; printf("%d\n",ans); return 0; }
ALGO
0.99972
3.192391
81cc779e-17e2-41e5-bdc1-96d28ace406a
cypghost/competitive-programming
Rotate_Arrays.cpp
class Solution { public: void rotate(vector<int>& nums, int k) { k = k % nums.size(); int l = 0, r= nums.size() - 1; while (l< r) { swap(nums[l],nums[r]); l++; r--; } l = 0; r = k-1; while(l< r) { swap(nums[l], nums[r]); l++; r--; } ...
ALGO
0.999971
5.794046
b2629d19-8300-4e80-8876-6f851ec48312
Miguelitocaf/KP3S-TFT35-LGVL
Marlin/src/lcd/menu/game/maze.cpp
#include "../../../inc/MarlinConfigPre.h" #if ENABLED(MARLIN_MAZE) #include "game.h" int8_t move_dir, last_move_dir, // NESW0 prizex, prizey, prize_cnt, old_encoder; fixed_t playerx, playery; // Up to 50 lines, then you win! typedef struct { int8_t x, y; } pos_t; uint8_t head_ind; pos_t maze_walls[50] = { ...
ALGO
0.935654
5.045292
3440a4fe-6585-48f6-8751-510252921f77
sarthakgarg123/C-Codes
chefWay.cpp
#include <bits/stdc++.h> #define pp pair<int,int> #define MOD 1000000007 using namespace std; int n,k; void print(vector<vector<pp> > &graph) { for (int i = 1; i <=n; ++i) { cout<<i<<"\t"; for (int j = 0; j < graph[i].size(); ++j) { cout<<graph[i][j].first<<" "; } cout<<endl; } } void dijkstra(vector<ve...
ALGO
0.999922
3.454135
9f9e2389-d44d-4630-abd2-fc09e9a3a8cb
ZaharyN/SoftUni-C-Development-Path
Advanced/04. Map and Set - Exercise/Maps and Sets - Exercise/07. Miners/07. Miners.cpp
#include <iostream> #include <string> #include <sstream> #include <map> #include <vector> #include <algorithm> #include <cctype> #include <cmath> using namespace std; int main() { map<string, int> resources; vector<string> appearance; string resource; int quantity; while (true) { cin >> resource; if (resou...
TOOL
0.97895
3.796985
f1b5bff5-805d-40ab-badc-e409aab89ea4
alisabir16767/DSA
recursion/checkEvenOdd.cpp
#include<iostream> using namespace std; int check(int n){ if(n==1) return 1; return check(n/2); } int main(){ int n; cout<<"Enter the number : "<<endl; cin>>n; check(n); cout<<check(n)<<endl; return 0; }
ALGO
0.99992
4.423068
c89af7a2-b317-4f33-ae13-87a27f183fa5
vnalla55/Mark-Up-Any-Fare
atseintl-master/Taxes/AtpcoTaxes/Rules/TaxPointLoc2StopoverTagApplicator.cpp
#include "Common/LocationUtil.h" #include "Common/OCUtil.h" #include "DomainDataObjects/FlightUsage.h" #include "DomainDataObjects/Itin.h" #include "Rules/PaymentDetail.h" #include "Rules/TaxPointFinder.h" #include "Rules/TaxPointLoc2StopoverTagRule.h" #include "Rules/TimeStopoverChecker.h" #include "Rules/TurnaroundCa...
TOOL
0.921247
6.959805
e7ff8b71-b8bf-446f-8587-435b9938075d
tbielak/AoC_cpp
sources/2023/2023_16.cpp
#include "2023_16.h" namespace Day16_2023 { Point::Point(int y, int x) : y(y), x(x) { } bool Point::operator < (const Point& rhs) const { return (y == rhs.y) ? x < rhs.x : y < rhs.y; } bool Point::operator == (const Point& rhs) const { return y == rhs.y && x == rhs.x; } Beam::Beam(const Point& p, in...
ALGO
0.998572
5.358853
344bb591-6917-47b2-bdce-d1330839bfa6
ramadhanhadiatmaa/learn_flutter_qr_code
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
34b7abe0-91e1-4aea-903a-3fdb32cbb369
khoivux/CodePTIT
CodePTIT_DSA/DSA05012. TỔ HỢP C(n, k).cpp
#include <bits/stdc++.h> #define ll long long #define ii pair<int, int> using namespace std; int mod = 1e9 + 7; main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int t; cin >> t; while(t--) { int n, k; cin >> n >> k; int C[k + 1][n + 1]; ...
ALGO
0.99997
4.52514
b2aed4e7-5be8-4bf9-b5d7-e04aedab3562
openhpc/ohpc
tests/apps/hpcg/src/SetupHalo_ref.cpp
//@HEADER // *************************************************** // // HPCG: High Performance Conjugate Gradient Benchmark // // Contact: // Michael A. Heroux ( <EMAIL>) // Jack Dongarra (<EMAIL>) // Piotr Luszczek (<EMAIL>) // // *************************************************** //@HEADER /*! @file SetupHa...
ALGO
0.974718
5.690111
2bd7bc54-2fa8-4ccf-96fe-8783e957caac
shashwat001/my-codes
sport_prog/long_may18/dbfb.cpp
#include <cstdio> #include <vector> #include <algorithm> using namespace std; #define MOD 1000000007 void multiply(long long int F[2][2], long long int M[2][2]) { long long int x = ((long long int)F[0][0]*M[0][0] + F[0][1]*M[1][0]) % MOD; long long int y = ((long long int)F[0][0]*M[0][1] + F[0][1]*M[1][1]) % M...
ALGO
0.999981
3.674441
54f2ba31-4f8f-4d48-b24d-4b58bbab12aa
Rojina0803/Data-serialization
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.998799
6.776823
542d4b53-885d-4ac3-b33c-051253ae292e
davitk/levelUpCourseHomeWork
task5.cpp
#include <iostream> using namespace std; int binarySearch(const int nums[], int n, int target) { int low = 0, high = n - 1; while (low <= high) { int mid = (low + high)/2; if (target == nums[mid]) { return mid; } else if (target < nums[mid]) { high...
ALGO
0.998946
6.481309
4b39aeac-a65c-4386-b514-d40f065e9b84
liuhuoer/AlgorithmNotes
PAT/1905/5/A1059.cpp
# include <cstdio> # include <cmath> # include <vector> using namespace std; const int MAXN = 100005; int prime[MAXN] = {0}; bool isPrime(int n) { if(n <= 1) return false; int sqr = sqrt(n); for(int i = 2; i <= sqr; ++i) { if(n % i == 0) return false; } return true;...
ALGO
0.999956
4.45165
6cf73680-73fc-4a02-95c3-472eaed0e839
Afool4U/CSP_STUDY
刷题/算法竞赛书/第4章 搜索技术/BFS/hdu 1312 红与黑 (自己写的原版代码).cpp
/** * @Author hjl * @Date 2021年8月25日05:39:43 */ #include <bits/stdc++.h> #define Swap(a,b) {int t=a;a=b;b=t;} #define endl '\n' #define ll long long #define sstream stringstream using namespace std; const double eps = 1e-7; const auto FAST = (ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)); int Wx, Hy, num = 0;...
ALGO
0.999848
4.572648
5e35965f-017d-41ba-b7df-2e157439e40e
i-pu/riscv-llvm-target
llvm-project/clang/test/SemaTemplate/instantiate-declref-ice.cpp
// RUN: %clang_cc1 -fsyntax-only -verify %s // expected-no-diagnostics template<int i> struct x { static const int j = i; x<j>* y; }; template<int i> const int x<i>::j; int array0[x<2>::j]; template<typename T> struct X0 { static const unsigned value = sizeof(T); }; template<typename T> const unsigned X0<T>::...
ALGO
0.878582
5.590412
0df7768f-8b79-4cd2-af50-b7d618ad8e0a
lasjg72/CompetetiveProgramming
program/Atcoder/ARC/ARC123/B.cpp
#include <iostream> #include <algorithm> #include <tuple> #include <vector> #include <string> #include <queue> #include <cmath> #include <set> #include <map> #include <cassert> using namespace std; using ll = long long; int main() { int n; cin >> n; vector<int> a(n), b(n), c(n); for(int i = 0; i < n; ...
ALGO
0.999971
4.128711
1694e668-d3f4-4a0f-89e4-959cbf686f67
Git-Abhi72/DSA
1056-capacity-to-ship-packages-within-d-days/capacity-to-ship-packages-within-d-days.cpp
class Solution { public: bool check(int mid, vector<int>& weights, int days) { int n = weights.size(); int m = mid; int count = 1; for(int i = 0; i < n; i++) { if(m >= weights[i]) { // corrected from 'weight[i]' to 'weights[i]' m -= weights[i]; ...
ALGO
0.999995
5.952116
904b3dfa-ff0c-494b-95af-235bba2c4efe
raincross7/code-similarity
codes/train_code/problem245/problem245_420.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define Rep(i,s,n) for(int i=s;i<n;i++) #define per(i,s,n) for(int i=n-1;i>=s;i--) #define fi first #define se second #define all(c) c.begin(),c.end() typedef long long int ll; typedef pair<int, int> P; typedef long double ld; voi...
ALGO
0.999983
3.248446
a36eeaa1-8c95-43b2-836e-d4ee72a85f89
MoyiHP/LeetCode
HashTable/T202 快乐数.cpp
#include <unordered_set> #include <iostream> using namespace std; class Solution { private: // N任Ϊλõƽ int transform(int n) { int ans = 0; while (n != 0) { int i = n % 10; ans += i * i; n /= 10; } return ans; } public: bool ...
ALGO
0.999969
5.471425
7fae9c5e-9cf7-499c-95db-7e0a8cad68f4
AllisonLee0507/BOJProblem
BOJProblem/p3.cpp
#define _CRT_SECURE_NO_WARNINGS #if 0 #include <stdio.h> int main(){ char N[10]; int result, i; result = 0; scanf("%s", &N); for(i = 0; i<9; i++){ result = (N[i] - '0' )+ result; } printf("%d", result); } #endif
ALGO
0.999124
3.284986
cd810268-4896-4c6c-b080-86a1d7bfac77
shaival141/Practice_Old
Arrays/Array_Rearrangement/MaximumLengthBitonicSubarray.cpp
// C program to find length of the longest bitonic subarray #include<stdio.h> #include<stdlib.h> int bitonic(int arr[], int n) { int inc[n],dec[n],max; inc[0]=1; dec[n-1]=1; for(int i=1;i<n;i++) { inc[i] = (arr[i]>arr[i-1]?inc[i-1]+1:1); } for(int i=n-2;i>=0;i--) { dec[...
ALGO
0.998901
5.527886
d9fd8dae-1fe0-4d4e-aba8-63800e0b964e
KchaiI/AtCoder
B_Done/Theater.cpp
#include <bits/stdc++.h> using namespace std; int main() { int group; cin >> group; int num = 0; for (int i = 0; i < group; i++) { int seat_from, seat_to; cin >> seat_from >> seat_to; num += + seat_to - seat_from + 1; } cout << num << endl; }
ALGO
0.999171
3.636225
b294d0dd-b675-4ec6-a02f-591eaf69dab8
muhammad-umar-9/2nd_semester-OOPs-Coding
Pointers/Pointer arithmetic/Post increment first case.cpp
#include<iostream> using namespace std; int main() { int arr[2]={1,3}; int *ptr= &arr[0]; cout<<ptr<<" "<<*ptr<<endl<<"\n"; cout<<*ptr++<<endl<<"\n"; //first it return old value and then it will increment adress not value cout<<arr[0]<<" "<<arr[1]<<endl<<"\n"; cout<<ptr<<" "<<*ptr<<endl; //as here it gi...
ALGO
0.998626
3.451691
629797ce-f5fe-47ae-8f8a-ae2c687f0f50
AyushMaheshwari2002/LeetCode
1979. Find Greatest Common Divisor of Array.cpp
/* Given an integer array nums, return the greatest common divisor of the smallest number and largest number in nums. The greatest common divisor of two numbers is the largest positive integer that evenly divides both numbers. Example 1: Input: nums = [2,5,6,9,10] O...
ALGO
0.999958
6.170584
ae6ff9d2-2b6f-46a0-845e-e97395c1ab40
Gigahawk/craps
Project5/Source.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <time.h> #define MIN_BET 5 //prototypes int getWallet(void); int makeBet(int wallet); bool playRound(void); bool doAgain(void); void goodbye(int wallet); bool rollForPoint(int point); int rollDice(void); int rollDie(...
TOOL
0.996157
4.745301
e4ebf21f-f92a-4a2b-803a-6ee9e8bfaf2f
ohac/tn_fnds
src/star.cpp
//tn_fnds v0.0.4 2012/3/10 //ljĂRgɂ͌肪邩܂B #include "world.h" #include <stdio.h> // for debug #include <stdlib.h> void starGeneralBody(double *x, int xLen, int fs, double f0, double t, int fftl, double * sliceSTAR); // TvOgKvFFTvZ // {͍̍ŒF0Kvǖ int getFFTLengthForStar(int fs) { return (int)pow(2.0, 1.0+(int)(lo...
ALGO
0.995705
3.849287
cebcf4d2-7a6e-4682-8658-41c7a4558430
olivkoch/omni3d
src/framework/mask.cpp
#include "main.h" // compute the edge mask corresponding to a a set of 3D lines // due to distortion, one line may give rise to several masks // void MyGlWindow::computeMask (edgeVector lines, int edge_step) { _camera->clearMasks(); int i,j; // compute mask from reprojected lines for (i=0;i<lines.size();i++) ...
ALGO
0.985244
3.960319
272bd87d-d8a1-4b61-9632-6920a07bbcfe
ih-shahi/Uni-Flutter-A1
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.998733
6.76775
0ea15806-664c-4fdc-810e-4d9d1448a0b5
aryav-hash/data-structures
strings/WordSearchImp.cpp
#include <bits/stdc++.h> using namespace std; // Function to compute the LPS array for the given word. void computeLPS(const string& word, int* lps) { int m = word.length(); lps[0] = 0; // The LPS value for the first character is always 0 for (int i = 1; i < m; i++) { int j = lps[i - 1]; // Previo...
ALGO
0.999989
6.569059
8e39ca20-8306-48a0-8387-1ef7d9448efe
javacruft/percona-xtradb-cluster-5.6
extra/yassl/taocrypt/src/blowfish.cpp
/* C++ code based on Wei Dai's blowfish.cpp from CryptoPP */ /* x86 asm is original */ #if defined(TAOCRYPT_KERNEL_MODE) #define DO_TAOCRYPT_KERNEL_MODE #endif // only some modules now support this #include "runtime.hpp" #include "blowfish.hpp" namespace TaoCrypt { #if defined(D...
ALGO
0.998271
6.74122
3314780e-8dbb-4680-a790-93e61448c2fd
Wind134/CppLearn
刷力扣/树与二叉树/114-二叉树转为链表-原地修改.cpp
/* 题目: - 给你二叉树的根结点root,请你将它展开为一个单链表: - 展开后的单链表应该同样使用TreeNode,其中right子指针指向链表中下一个结点,而左子指针始终为null。 - 展开后的单链表应该与二叉树先序遍历顺序相同。 思路:不借用栈的做法: - 如果基于树本身原地做修改,我们观察树可以发现,本质上对于任何一个根节点,都是对 - 根节点的左子树最右结点与根的右子树的第一个右孩子做连接 - 同时观察每一个没有左孩子或者右孩子的结点,我们都可以利用起这个"虚拟指针",先将根节点左子树的最右结点与右子树最先的那个结点相连接 - 这样可以通过循环一步一步串接到最后一个结点 */ #include "....
ALGO
0.999999
5.581988
74c1601c-088c-4281-b239-24a0de12ba9c
OualidOuaquad/competitive-programming
KICK_START/KS20/B/B1/B1.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array void solve(){ int N, H[100], ans =0 ; cin >> N; for (int i = 0; i < N; ++i) { cin >> H[i]; } for (int i = 1; i < N-1; ++i) { if (H[i]>H[i-1] && H[i]>H[i+1]) { ans ++; } } cout << ans << "\n"; } int main() { ...
ALGO
0.999436
4.130506
e9993f34-ca25-45c0-873a-a67d03775266
tonytech83/cpp
02-cpp-fundamentals/02-functions/01-lab/03-smallest-of-three-numbers.cpp
// // Created by tonytech on 5/4/25. // #include <iostream> using namespace std; int getMinOfThree(int a, int b, int c); int main() { int a, b, c; cin >> a >> b >> c; cout << getMinOfThree(a, b, c) << endl; return 0; } int getMinOfThree(const int a, const int b, const int c) { int smallest = a...
ALGO
0.999689
5.359473
9204ea78-db82-4d51-9b19-4985e4b354ab
Rana53/Competitive-Programming
Data Structure/Binary Search Tree.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int value; class node *left, *right; node(){ left = NULL ;right = NULL; cout << "new node is created" << endl; } node(int v){ left = NULL ;right = NULL; value = v; } }; node *createNewNode(int va...
ALGO
0.997503
3.639096
b4c75ced-106f-461c-8e9b-cd5f067f490c
kysub99/BOJ
1149.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int arr[1000][3]; int dp[1000][3]; int n; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n; for (int i = 0;i < n;i++) { for (int j = 0;j < 3;j++) { cin >> arr[i][j]; } } for (int j = 0;j < 3...
ALGO
0.999752
3.851736
ee0d2490-e502-4f31-91e0-ed15bbe818ed
mashiro222/Graphics-Assignment-Llg
Homeworks/5_ARAP/code/code/68_吴汶政/src/Engine/Material/BSDF_CookTorrance.cpp
#include <Basic/Math.h> using namespace Ubpa; using namespace std; float BSDF_CookTorrance::NDF(const normalf & h) { cout << "WARNING::BSDF_CookTorrance:" << endl << "\t" << "not implemented" << endl; return 0.f; } float BSDF_CookTorrance::Fr(const normalf & wi, const normalf & h) { cout << "WARNING::BSDF_Cook...
ALGO
0.987461
3.862376
3835a9ed-5b9d-4497-8081-ab801e9713e6
Rakesh2908/Leetcode
1029-vertical-order-traversal-of-a-binary-tree/vertical-order-traversal-of-a-binary-tree.cpp
class Solution { public: vector<vector<int>> verticalTraversal(TreeNode* root) { map<int, map<int, multiset<int>>> nodes; // x, y, set of nodes queue<pair<TreeNode*, pair<int, int>>> todo; // node, x, y todo.push({root, {0, 0}}); // push root node with (x, y) position while (!t...
ALGO
0.999998
6.536032
270224ec-22a4-4551-b3b9-b1eb8c5df9a9
95LightningMcQueen/Labs-2sm
sum and product of max rows and min cols/main.cpp
// #include <iostream> #include <random> int main() { int32_t rows{}, cols{}; std::cout << "Input rows, cols: "; std::cin >> rows >> cols; int32_t** mtr = new int32_t * [rows]; for (size_t i = 0; i < rows; ++i) { mtr[i] = new int32_t[cols]; } for (size_t i = 0; i < rows; ++i) { for (size_t ...
ALGO
0.997336
4.354873
7c83be0f-b1df-4cdd-9e9c-6353bbb68edb
labote/BaekJOON-Problems-
CodingTest/BaekJOON/Problem10769.cpp
#include <iostream> #include <vector> using namespace std; int hCnt; int sCnt; vector<int> makePi(string expression){ long int exSize=expression.size(); vector<int> Pi(exSize,0); int j=0; for(int i=1;i<exSize;i++){ while(j>0 && expression[i]!=expression[j]){ j=Pi[j-1]; } ...
ALGO
0.999926
4.824853
bc8d9290-7898-424e-9120-4757ce6fb295
JoydeepMallick/CODEFORCES
25.2.25 Codeforces Round 1006 (Div. 3)/C.cpp
/* _________________________ | Written by silent_Joy | ---------~u~--------- */ #include"bits/stdc++.h" #include <bitset> #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("bmi,bmi2,lzcnt,popcnt") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") //intel pentium processors released post 2020 supp...
ALGO
0.999976
4.335322
5481c87f-1922-4d1d-8c45-ba03e414f54c
Dizww/Games101-HW
pa8/assignment8/CGL/src/matrix3x3.cpp
#include "matrix3x3.h" #include <iostream> #include <cmath> using namespace std; namespace CGL { double& Matrix3x3::operator()( int i, int j ) { return entries[j][i]; } const double& Matrix3x3::operator()( int i, int j ) const { return entries[j][i]; } Vector3D& Matrix3x3::operator[]( int j ) { ...
TOOL
0.894791
6.917807
99c29081-b7b8-4c1e-a954-076871baa3df
madeinserver/lithtech
tools/DEdit/Dlgs/ObjectSelFilterDlg.cpp
#include "bdefs.h" #include "dedit.h" #include "editobjects.h" #include "resource.h" #include "objectselfilterdlg.h" #include "edithelpers.h" #include "editprojectmgr.h" #include "stringdlg.h" #define PREFAB_CLASS_NAME "Prefab" //-------------------------------------------------------------------- // Preset parsing u...
TOOL
0.881971
6.21909
2e95bb99-4a19-49d6-9c2f-f4bb3bb0d472
EvannaZhang/wasm
TestData/multi.cpp
int add(int m1, int m2, int m3){ return m1+m2+m3; } int minus(int q1, int q2, int q3){ return q1-q2-q3; } int com(int w1, int w2){ if(w1>w2){ return w1; }else{ return w2; } } int main() { int a = add(2, 5, 7); int b = minus(1093, 234, 45); int c = com(com(35, 345), com...
ALGO
0.999697
3.431235
53fbb8b3-df21-43bf-ab8e-ce0fb4e38062
ashtoshkumar0897/Leetcode-Problem-s
1197-parsing-a-boolean-expression/1197-parsing-a-boolean-expression.cpp
/*Intuition and approach create stack of char and traverse throw the expression string and do below :- expression ==> (!(&('t', 'f', 't'))) step1 :- if current Char ch = '(' or ',' ==> continue step2 :- if char ch = any operator(&, !, |) ==> push to stack step3 :- if char ch = ')' ==> we should now eval expression. s...
ALGO
0.999905
6.57663
9fdcdb13-ff13-4d9d-94e5-6338ccdf243e
nz0001na/programing_practice
Source13_06.cpp
#include <iostream> #include <deque> using namespace std; void main() { int a[] = { 23,12,9,6,15,90,33 }; int n = sizeof(a) / sizeof(a[0]); int i; deque<int> d; for (i = 0; i < n; i++)d.push_front(a[i]); for (i = 0; i < d.size(); i++)cout << " " << d[i]; cout << endl; int sum = 0; deque<int>::iterator it; ...
ALGO
0.999777
4.291783
549ad8ed-c295-4139-9196-78a67c92fea6
Emerax/AdventOfCode2020
day16/day16.cpp
#include <iostream> #include <fstream> #include <vector> #include <stdlib.h> #include "day16.h" #include <algorithm> #include <sstream> using namespace std; bool follows_rule(int value, rule rule) { return (rule.lower_low <= value && value <= rule.lower_high) || (rule.higher_low <= value && value <= rule.high...
ALGO
0.997848
5.657575
a2cf9eb9-8a86-4583-a747-4388db53da08
fujicoin/fujicoin-v0.17.1
src/crypto/chacha20.cpp
// Based on the public domain implementation 'merged' by D. J. Bernstein // See https://cr.yp.to/chacha.html. #include <crypto/common.h> #include <crypto/chacha20.h> #include <string.h> constexpr static inline uint32_t rotl32(uint32_t v, int c) { return (v << c) | (v >> (32 - c)); } #define QUARTERROUND(a,b,c,d) \ ...
ALGO
0.999348
6.849812
da612758-d34c-4acc-834a-e67e28d162cd
Catnip0709/CodeStudy
剑指offer/不用加减乘除做加法.cpp
/* Author: Catnip Date: 2020/02/16 From: 剑指offer Link: https://www.nowcoder.com/practice/59ac416b4b944300b617d4f7f111b215?tpId=13&tqId=11201&tPage=3&rp=3&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking */ /* Q 写一个函数,求两个整数之和,要求在函数体内不得使用+、-、*、/四则运算符号。 */ /* A 以5 + 7 = 12为例 【十进制】三步走 第一步:相加各位的值,不算进位,得到...
ALGO
0.999927
4.957489
7d6b8e78-d3c6-4da3-a7d9-d40031712b1b
AmosDoan/provlemSolving
cpp-solving/acmicpc/basic/prob11723.cpp
// // Created by Amos on 2020/02/22. // #include <iostream> #include <string> #include <set> using namespace std; int M; set<int> space; // Clion에서 마지막에 엔터를 왜 쳐주어야하지? int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> M; for (int i = 0; i < M; i++) { string command; cin >>...
ALGO
0.991579
5.310445
ec2fe555-692b-4178-947c-f1cb22b02e2b
sukam09/algorithm
BOJ/랜덤디펜스/3687.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int num[9] = {0, 0, 1, 7, 4, 2, 0, 8, 10}; // num[i]: i개의 성냥개비로 만들 수 있는 가장 작은 수 ll d[105]; void solve(int n) { string mx; int k; if (n % 2 == 0) { k = n / 2; } else { k = (n - 3) / 2; mx = "7"; } while (k--) mx = mx + "1"; c...
ALGO
0.99973
4.802933
10ba34b8-f7b4-4817-989e-10a72f2f02b4
TusharPatil31/CPP_DSA
binarySearch.cpp
#include<iostream> using namespace std; int BinSearch(int *arr_ptr, int n, int key) { int st = 0, end = n-1; while(st <= end){ int mid = (st+end)/2; if(arr_ptr[mid]==key) { return mid; }else if(arr_ptr[mid]< key) { st = mid+1; }else ...
ALGO
0.999924
5.259124
0e486b68-268f-4308-a9b2-bd37734419db
Fezaan/Leetcode
2406-decode-the-message/2406-decode-the-message.cpp
class Solution { public: string decodeMessage(string key, string message) { unordered_map<char,char> mp; char ch='a'; for(auto it: key){ if(it==' ') continue; if(mp.find(it)!=mp.end()) continue; mp[it]=ch++; } for(auto it: mp){ ...
ALGO
0.999985
5.140479
904011fe-43ed-4712-bab7-cb5a02b77edf
tenick/cp
Codeforces/Div3/923/f.cpp
#include <iomanip> #include <iostream> #include <vector> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <cmath> #include <stack> #include <queue> using namespace std; typedef long long ll; typedef un...
ALGO
0.999962
5.158995
aa79f450-8dbc-41a2-a876-30f9e11d6ac5
basnetsoyuj/competitive-programming
codeforces/problem_set/231A - Teams/main.cpp
#include <iostream> int main() { int n, a, b, c, counter(0); std::cin >> n; for (int i = 0; i < n; i++) { std::cin >> a; std::cin >> b; std::cin >> c; if (a + b + c > 1) counter++; } std::cout << counter << std::endl; return 0; }
ALGO
0.999006
4.802331
0b8dd3d7-5841-4e7f-bb9d-717f2d61ba11
AGorkiewicz/ICPC-library
lib/graphs/two_sat.cpp
struct twosat { /* 0-indexed */ int n, cnt; vector <vector <int> > G, R; vector <int> order, comp, ans; vector <bool> vis; twosat(int _n) : n(_n) { G.resize(n + n); R.resize(n + n); comp.resize(n + n); vis.resize(n + n); ans.resize(n); order.reserve(n + n); } void add_edge(int u, int...
ALGO
0.999722
4.904985
c7c79078-ae02-4fb8-9700-516e57bb266e
xc826/cpp-learning-journey
类和对象/对象模型、this指针和友元/this指针应用.cpp
#include <iostream> using namespace std; class person { public: person(int a) { age = a; } void compareAge(person* thisPtr) { if (thisPtr->age > this->age) { cout << "thisPtr is older than this" << endl; } else if (thisPtr->age < this->age) { cout << "this is older than thisPtr" << endl; } e...
ALGO
0.997389
4.023033
d732b587-bd93-49ad-89da-7ebf833f9f58
MCKG-L/codes
课程实验及作业/C++语言课/作业/ch3/2212080115_孙利伟_3.26.cpp
/* 姓名:孙利伟 学号:2212080115 班级:二班 */ #include <iostream> #include <cmath> using namespace std; int main() { double x1,y1,r1,x2,y2,r2; cout << "Enter circle1's center x-, y-coordinates, and radius: "; cin >> x1 >> y1 >> r1; cout << "Enter circle2's center x-, y-coordinates, and radius: "; cin >> x2 >> ...
ALGO
0.999549
3.988514
41d9ee47-e21b-44aa-aff5-dd20f2a1e3d0
mkgursoy/Codeforces
Round 899/a.cpp
/* Author:Matkap(prefixsumenjoyer23) */ #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #pragma GCC optimize("O3,fast-math,inline") #include <bits/stdc++.h> using namespace std; #define fr freopen("in.txt","r",stdin);freopen("out.txt","w",stdout); #define int long lon...
ALGO
0.999495
5.320714
e6e78254-616c-4368-bfd3-52efe24555ed
kmjp/procon
gcj/gcj11/2_b.cpp
#include <cstdlib> #include <cstring> #include <memory> #include <cstdio> #include <fstream> #include <iostream> #include <cmath> #include <string> #include <sstream> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <algorithm> using namespace std; #include <stdio.h> #include ...
ALGO
0.999093
3.752609
d49f0720-2c20-4604-9a3a-27e3eeff7405
prateek27/Coding-Problems
Strings/4. To Implement strtok (string tokenizer) function.cpp
#include<iostream> using namespace std; /* On a first call, the function expects a C string as argument for str, whose first character is used as the starting location to scan for tokens. In subsequent calls, the function expects a null pointer and uses the position right after the end of the last token as the new sta...
ALGO
0.987229
3.767442