uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
4bf89a4e-68ce-4817-a660-9d1a65e0aa68
mikeyhodl/rev2
Pattern Questions in C++/rectangle.cpp
#include<iostream> using namespace std; int main() { int row, col; cout<<"Enter number of rows and columns: "; cin>>row>>col; for(int i=0; i<row; i++){ cout<<endl; for(int j=0; j<col; j++){ cout<<"* "; } } return 0; }
ALGO
0.957063
3.884713
a3471fe6-8a7b-4445-a3b9-c9780daa528f
ralitsa-d/Parallel-Processing-Systems
APFLOAT/mprint.cpp
#include <iostream> #include <sstream> #include <ctime> #include "ap.h" using namespace std; int main (int argc, char *argv[]) { unsigned long p; int base = 10; time_t b; if (argc < 2) { cerr << "USAGE: mprint p [base] [perfect]" << endl; cerr << " Outputs 2^p-1 in base base...
ALGO
0.984879
5.342816
1c9c7cf5-cd95-4a3e-8288-dce5449319af
roman012285/cpp---harutz
lesson3b/class_ex2.cpp
/* lesson3b exercise 2 Created by roman Gilgor Email : <EMAIL> */ #include <iostream> using namespace std; int main() { int i, j; int n; cout << "Please enter number of rows: " << endl; cin >> n; //responsible for row number for (i = 1; i <= n; i++) { // Loop responsible for printing 1-s in a singl...
ALGO
0.997517
4.042184
b645893c-d404-4404-99fe-7dece1bc2705
Arpit045-boop/LeetCode_PBC
1029-two-city-scheduling/1029-two-city-scheduling.cpp
class Solution { public: int twoCitySchedCost(vector<vector<int>>& costs) { vector<int> refund; int n=costs.size()/2; int minCost=0; for(auto arr:costs){ minCost+=arr[0]; refund.push_back(arr[1]-arr[0]); } sort(refund.begin(),refund.end()); ...
ALGO
0.99999
6.099283
8d3868f4-7b25-4a5d-9a73-3a63abc1954f
LIZA1608/leetcode-in-java
Assignment 5/Rod Cutting Problem.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int prices[n]; for(int i=0; i<n; i++){ cin >> prices[i]; } int rodLength; cin >> rodLength; int dp[rodLength+1] = {0}; // Initialize all elements of dp to 0 for(int i=1; i<=rodLength; i++){ fo...
ALGO
0.999651
4.216771
a0f97431-0d7b-48af-8b92-39dd28cc4671
ulpashk/ADS_22B030552
lab1/F.cpp
#include <iostream> #include <cmath> using namespace std; bool isPrime(int num) { if (num < 2) { return false; } for (int i = 2; i<=sqrt(num); i++) { if (num % i == 0) { return false; } } return true; } int nthPrime(int n) { int count = 0; int num = 2; ...
ALGO
0.999807
5.033789
853da769-9da6-46b7-ab7b-29fba46422e6
Noorius/pp1
Final_preparation/lab6 Functions/ReverseArray.cpp
#include <bits/stdc++.h> using namespace std; void Rev(int a[],const int& n){ for(int i=0,j=n-1; i<j; i++, j--){ int t = a[i]; a[i]=a[j]; a[j]=t; } } void Fill(int a[],const int& n){ for(int i=0; i<n; i++) cin>>a[i]; } void Print(int a[],const int& n){ for(int i=0; i<n...
ALGO
0.999705
3.805483
bbf9b7b3-4c5a-4570-9f53-6ccf2d7738b7
vaibhavkashyap230/Binary-Trees-and-Binary-Search-Trees
finding minimum & maximum element in BST.cpp
#include<stdio.h> #include<iostream> using namespace std; class node { public: int data; node *left; node *right; }; node* new_node(int x) { node *temp=new node(); temp->data=x; temp->left=NULL; temp->right=NULL; return temp; } node* insert(node* temp,int x) { if(temp==NULL) { temp=new_node(x); } else...
ALGO
0.999941
4.027134
f4bf93e8-6283-43d1-ac36-99d382699ace
iRobot42/Deitels-Cpp-11e
06 - Arrays, Vectors, Ranges/33 - Find the Minimum Value in an array/ex_06_33.cpp
// ex_06_33.cpp // Find the Minimum Value in an array #include <array> #include <iostream> constexpr size_t size{ 5 }; int recursiveMinimum( const std::array< int, size >&, size_t, size_t ); int main() { const std::array< int, ::size > test{ 42, 0, 365, -1, 1024 }; std::cout << "Smallest number is " <...
ALGO
0.999857
6.398375
2b47a303-f971-41c5-841a-9d3ff2c3ea81
Shitakami/AtCoder_SolveProblems
AtCoder/PracticeProblems/CodeFestival2014決勝_D_パスカルの三角形/prog.cpp
#include <iostream> using namespace std; using ull = unsigned long long; int main() { ull n; cin >> n; if(n == 1) { cout << 1 << " " << 1 << endl; } else { cout << n + 1 << " " << 2 << endl; } return 0; }
ALGO
0.999694
4.188779
a2ac3bc2-3379-4705-a2d8-5252bce30eae
vaios84/Exercises
UVa/10010 - Where's Waldorf?.cpp
#include "stdafx.h" #include <bits/stdc++.h> using namespace std; int m, n, sz; string grid[51], word; const int row[] = { -1, -1, -1, 0, 0, 1, 1, 1 }; const int col[] = { -1, 0, 1, -1, 1, -1, 0, 1 }; inline bool isOut(int r, int c) { return ( (r < 0) || (r >= m) || (c < 0) || (c >= n) ); } inline bool comp(ch...
ALGO
0.999848
3.885074
9f0dd39f-b650-464e-b172-87757d46bead
maxs-im/DFA_algorithms
src/automaton/utils/representation.cpp
#include "utils/representation.hpp" #include "automates/buchi.hpp" #include <iostream> namespace utils::representation { using namespace automates; /// \namespace Anonymous namespace. Helpers with reading automaton parts namespace { /// \brief Read final states in format: sets num, {in_set_num, {num}x(in_set_num)}x...
TOOL
0.885786
6.311169
0b27094f-5a93-4e91-a8ad-2e74d626f7f3
HarjeetSingh-13/cpp_oops_dsa
dsa/Trees/BST_search_delete.cpp
#include<iostream> using namespace std; class Node{ public: int data; int key; Node* left; Node* right; Node(int val){ data = val; left = NULL; right = NULL; } }; Node* insertBST(Node* root, int val){ if(root == NULL) return new Node(val); if(val > root->da...
ALGO
0.999988
4.094903
3fd06c3f-f8d5-4dca-ae58-f4b9a0c9ae08
dag625/AdventOfCode
2017/day21.cpp
// // Created by Dan on 12/13/2024. // #include "registration.h" #include <doctest/doctest.h> #include <fmt/core.h> #include <vector> #include <iostream> #include "utilities.h" #include "grid_combine.h" namespace fs = std::filesystem; namespace { using namespace aoc; /* See https://adventofcode.com...
ALGO
0.993427
6.89666
d743dfd5-bbcd-4836-9842-d6dbdfbc496e
skull-ops/dirplayer-flutter
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
062ba805-7c6d-456a-83e9-00f8b098415a
Priyanshsoniii/DSA
203-remove-linked-list-elements/remove-linked-list-elements.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.999939
5.74444
29fd4c68-3c13-4eac-9c64-71c134d09f51
tyedwards37/LeetCode
LeetCode75/12.cpp
/* LeetCode Day 10: Find the Difference of Two Arrays (Easy) 12/75 * by Tyler Edwards | November 2nd, 2023 * Desc: Given two 0-indexed integer arrays nums1 and nums2, return a list answer of size 2 where: * - answer[0] is a list of all distinct integers in nums1 which are not present in nums2. * - answer[1] is a ...
ALGO
0.999615
5.960993
2a2c01ad-24f5-4e2a-bc9c-360c1283bafd
ishandutta2007/codeforces
felerius/normal/1569/C.cpp
// Jury Meeting (https://codeforces.com/contest/1569/problem/C) #pragma GCC optimize("fast-math") // begin "cp-lib/prelude.hpp" #include <bits/stdc++.h> #ifdef LOCAL # include <dbg.h> #else # define dbg(...) do {} while (0) #endif #define cp_lib_4th(_1, _2, _3, x, ...) x #define cp_lib_rep(i, l, r) for ...
ALGO
0.999725
4.411757
8f06ea14-51f2-4c4e-a39d-1ece313dbe5d
wildcat-rocketry/llvm
flang/runtime/findloc.cpp
// Implements FINDLOC for all required operand types and shapes and result // integer kinds. #include "character.h" #include "reduction-templates.h" #include "reduction.h" #include "flang/Common/long-double.h" #include <cinttypes> #include <complex> namespace Fortran::runtime { template <TypeCategory CAT1, int KIND1...
ALGO
0.949961
3.902795
c5b76c79-88d6-46e8-abda-348b39cfe000
leeco-devs/android_frameworks_av
media/libstagefright/codecs/amrnb/enc/src/cbsearch.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/cbsearch.c Functions: D_plsf_3 Date: 01/31/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: (1) Removed "count.h" and "basic_op...
ALGO
0.999987
6.045815
81549c5d-41ba-413a-8607-4b2bc29af2ba
svanegas/programming_solutions
Entrenamientos RPC/2013/Entrenamiento VI/L - Tongues/tongues.cpp
#include <algorithm> #include <iostream> #include <iterator> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <queue> #include <deque> #include <stack> #include <list> #includ...
ALGO
0.999903
5.406876
5cf84abd-0080-4da6-89a5-22eacc76fa43
PrashantChoudhary13579/Data-Structure-
10th september/linkedlist1.cpp
// In this program we are making a singly linked list program and applying all the insertion program upon it // 1. It may be insertion at the beginning // 2. It may be insertion at the given position // 3. It may be insertion at the specific position // 4. It may be insertion at the end of the linked list #include <i...
ALGO
0.999723
4.279454
751884e2-d5f3-4506-985a-fa89c2fdd6e4
kmjp/procon
yuki/2201-2300/2287.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999771
3.611149
cc71ec1c-f667-46e7-8ca5-4a827617df38
MarshallVielmetti/rob530-final-project
Pangolin/src/utils/file_utils.cpp
#include <pangolin/platform.h> #include <pangolin/utils/file_utils.h> #ifdef _WIN_ # define WIN32_LEAN_AND_MEAN # include <Windows.h> # include <Shlobj.h> #else # include <dirent.h> # include <sys/types.h> # include <sys/stat.h> # include <sys/signal.h> # include <stdio.h> # include <string.h> # include <un...
TOOL
0.993124
5.984853
089320ea-c9ce-4e2b-a899-c82af398508c
Amishk599/Data-Structure-Algorithm
Strings/Reverse Words/reversewords.cpp
#include <bits/stdc++.h> #include <sstream> using namespace std; string reverseWord(string word) { string rev = ""; int n = word.length(); for (int i = n - 1; i >= 0; i--) rev += word[i]; return rev; } int main() { string str = "The quick fox jumped over the fence", reverse; cout << str ...
ALGO
0.999931
5.289899
c2cc33aa-8366-4abe-a2ce-0f354893fb01
aliostad/deep-learning-lang-detection
data/test/cpp/1112f904d6f5c4f10e525fa80307b1d2df483161solution219.cpp
#include "solution219.h" Solution219::Solution219() { } bool Solution219::containsNearbyDuplicate(vector<int> &nums, int k) { map<int,int> dump; vector<int>::iterator it; int len = nums.size(); for(int i=0;i<len;++i) { if(dump.count(nums[i])) { if((i - dump[nums[i]]) <=k...
ALGO
0.999739
5.86696
ac8f4cec-c059-4b4f-9617-0975e50446fa
TarunSaini063/Coding
DataStructure/codeforces/637_2.cpp
#include <bits/stdc++.h> using namespace std; #define ld double #define ll long long #define pb emplace_back #define mk make_pair #define mod 1000000007 #define ff first #define ss second #define FIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define all(x) x.begin(),x.end() ll power(ll a, ll b){l...
ALGO
0.999933
3.814669
51d1c168-1b19-4664-bc5a-be7261a4d446
yangjufo/LeetCode
2021/1935. Maximum Number of Words You Can Type.cpp
class Solution { public: int canBeTypedWords(string text, string brokenLetters) { vector<bool> broken(26, false); for (char c : brokenLetters) { broken[c - 'a'] = true; } int count = 0; bool type = true; for (char c : text) { if (c == ' ') { ...
ALGO
0.999259
5.490235
e4c53ace-c05a-41aa-99c0-bfeeb2182ec4
juanmabaracat/tp-taller-dkt
src/librerias/include/Box2D/Collision/b2CollideEdge.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/Shapes/b2CircleShape.h> #include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h> // Compute contact points for edge versus circle. // This accounts for edge connectivity. void b2CollideEdgeAndCircle(b2Manifold*...
ALGO
0.999803
7.537114
ad6c42ef-f769-4d36-852b-0d71c4008759
neuebot/NeueBot
joint_trajectory_controller_hollow/motion_through_points_linear_spline/motion_through_points_trajectory_generator.cpp
#include "motion_through_points_trajectory_generator.hpp" #include <cmath> #include <iostream> #include <fstream> using namespace std; MotionThroughPointsTrajectoryGenerator::MotionThroughPointsTrajectoryGenerator(const unsigned int &n_joints, const double &cycle_time, const double &max_vel, const double &max_acc) : ...
ALGO
0.983275
3.95562
bf64e38b-4268-4839-abc1-4ca68adfad60
mirrionna/ProyectoTT1
src/sign_.cpp
// $Source$ //---------------------------------------------------------------------- // sign_ //---------------------------------------------------------------------- // Proyecto TT1 // /**@file sign_.cpp * @brief Cálculo del valor absoluto de un número con el signo de otro. * * @author Miguel Río Navarro * @bug No kn...
TOOL
0.99876
4.880562
50852a21-446b-488a-a268-7d5fa49b8444
OpenHUTB/engine_bak
Engine/Source/ThirdParty/ICU/icu4c-53_1/source/i18n/search.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION #include "unicode/brkiter.h" #include "unicode/schriter.h" #include "unicode/search.h" #include "usrchimp.h" #include "cmemory.h" // public constructors and destructors ----------------------------------- U_NAMESPACE_BEGIN SearchIt...
TOOL
0.886725
4.234629
1fdf900f-be70-42a5-9efb-f81fcef5be4e
saikiranboga/Coding
Ajay_UsefulCodes/PrimeGenerator.cpp
/* Using these generated primes, u can further check for new primes or create prime factor of a given number. */ #include<iostream> #include<cmath> using namespace std; void generatePrime(int n) { int* numbers = new int[n+1]; for(int i=1; i<=n; i++) numbers[i] = i; int limit = sqrt(n); ...
ALGO
0.996944
4.150466
e727cb9e-2b15-4320-ae6e-334431639b46
UHeeJoon/C-study2
BaekJoon2/30007번.cpp
#include<bits/stdc++.h> using namespace std; #define FAST_IO ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr) int main() { FAST_IO; int tc; cin >> tc; while (tc--) { int a, b, x; cin >> a >> b >> x; cout << a * (x - 1) + b << '\n'; } return 0; }
ALGO
0.999896
4.055691
468f2a3a-7a2b-48ef-83c8-7d5c6764134a
kkrath/PracticeProblems
Arrays/uniqueElement.cpp
/*Leetcode Problem#1 - Given an array where all elemnts appear twice except for one, find that element in linear time and without using an extra space Time Complexity: O(n) Space Complexity: O(1) */ #include<iostream> #include<unordered_map> #include<vector> using namespace std; int findUniqueElement(vector<int>& a...
ALGO
0.9996
5.773582
052754db-7c77-43f2-85b6-77c395dcebde
ITOpIvsu/Test-Driver
Mathematics/LogExp.cpp
#include "LogExp.h" #include "Parser.h" #include "SolChain.h" #include "Algebra.h" #include "MathTool.h" #include "Factors.h" #include <functional> extern int s_DegPoly; extern bool s_ShowDiviMessages; bool s_ExpControl = false; bool s_FirstCalculation; bool CheckUnknownInExp( const MathExpr& ex, const QByteArray& V...
ALGO
0.998556
3.684364
c32cea9e-04c6-4d3b-8e71-12622efafba9
yixiaoxiao/ndnSIM
examples/ndn-grid-topo-plugin-loss.cpp
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // ndn-grid-topo-plugin-loss.cpp #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/ndnSIM-module.h" namespace ns3 { /** * This scenario simulates a grid topology (using topology reader module) * * (consumer) -- ( ) ----- (...
TEST
0.954076
5.807741
82745bb3-a0ba-484c-8c5e-483e64b22ea5
Zahid1734/CP-Algorithms
Range Query Algorithms/segment_tree_lazy.cpp
struct seg_tree { public: seg_tree(int n) { ans.resize(4 * n + 1); } void build (int low, int high, int id, vector<int> &a) { if (low == high) { ans[id] = a[low]; return ; } int mid = low + (high - low) / 2; build(low, mid , 2 * id + 1, a); build(mid +1, high, 2 * id + 2, a...
ALGO
0.999909
4.800338
822fb29b-39cd-41ee-a706-c8a8087fce8a
aerimforest/Algorithm-Study
Baekjoon/hyeonyoung/이상한 술집.cpp
// 221123_BOJ_13702 #include <iostream> using namespace std; int N, K, mak[10001]; int answer = 0; int l = 1, r = 0x7fffffff; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> N >> K; for (int i = 0; i < N; ++i) { cin >> mak[i]; } while (l <= r) { int mid = (l...
ALGO
0.999989
4.342214
55341ff7-7606-48c5-b313-9e28ebd08a52
prp-e/JabirOS-source
src/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp
#define DEBUG_TYPE "loop-rotate" #include "llvm/Transforms/Scalar.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/CodeMetrics.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/TargetTransformInfo.h" #includ...
ALGO
0.980977
5.679351
458de075-fd97-438e-a98f-fed9ef82eda4
aspen-otr/sneep-rewrite
src/bitboard.cpp
#include "bitboard.h" #include "types.h" Bitboard BETWEEN_BB[64][64] = {}; Bitboard LINE_BB[64][64] = {}; int DIST[64][64] = {}; Bitboard PAWN_ATTS[64][2] = {}; Bitboard KNIGHT_ATTS[64] = {}; Bitboard KING_ATTS[64] = {}; Bitboard RAYS[64][8] = {}; template <Color C> constexpr Bitboard pawn_attacks(Square s) { retu...
CONFIG
0.994455
5.806041
dc3fd2d2-d5f0-4558-91f7-79c7f8582eb3
rhythm-28/Data-Structures-and-Algorithms
Questions/Two Pointer Algo (difference).cpp
// Two Pointer Algorithm /* To find which two elements in the array differ to provide the given difference */ #include <iostream> #include <algorithm> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int i, j, n, diff, a[100]; cin >> n; for ...
ALGO
0.99999
4.375219
ab249e2b-666a-47a7-a54e-8bbc0a708ba2
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_797_13.cpp
#include <bits/stdc++.h> using namespace std; template <typename T, typename U> inline void smin(T &a, U b) { if (a > b) a = b; } template <typename T, typename U> inline void smax(T &a, U b) { if (a < b) a = b; } template <class T> inline void gn(T &first) { char c, sg = 0; while (c = getchar(), (c > '9' || c ...
ALGO
0.999991
3.895024
77aa13bd-f352-4dfd-9534-9e512c32c272
Ishan-Chauhan/dsa-questions
1926-nearest-exit-from-entrance-in-maze/1926-nearest-exit-from-entrance-in-maze.cpp
class Solution { public: int nearestExit(vector<vector<char>>& maze, vector<int>& entrance) { int x = entrance[0]; int y = entrance[1]; int n = maze.size(); int m = maze[0].size(); int a,b,c=0; queue<vector<int>> q; vector<int> dir{0,1,0,-1,0}; q.push(...
ALGO
0.999978
5.75399
ebe39665-f779-47c4-8985-ee2bd68d2319
ShujieHu/Coding
FindSubstringInString.cpp
class Solution { public: int strStr(string haystack, string needle) { // the following is for the constructing of the table for the needle int m = needle.size(); if (m <= 0) { return 0; } vector<int> lps(m, 0); constructTable(needle, m, lps); int n...
ALGO
0.999937
5.799383
7c13cd58-9ef0-448a-9447-5d68aefcf628
Matheusota2k/Atividades
C++/Atividade 2 c++.cpp
#include <stdio.h> int main() { int num_int; printf("Digite um numero inteiro:"); scanf("%d",&num_int); if (num_int %2 == 0) printf("O numero %d e par\n", num_int); else printf("O numero %d e impar\n", num_int); }
ALGO
0.996689
3.0882
a118a617-7add-4f72-8fb9-bd5770fe9d26
iAbhayRajput/DSA
C++/210-220/212.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: long subarrayXor(vector<int> &arr, int k) { int xor_=0,ans=0; unordered_map<int,int>mm; for(int x:arr){ xor_^=x; if(xor_==k)ans++; ans+=mm[xor_^k]; mm[xor_]++; } return ans; } }; int ma...
ALGO
0.998786
5.616772
a29cd6ac-2b96-4593-9a69-a925fff5b09e
sultancodess/leetcode-
C++/incremental-memory-leak.cpp
// Time: O(1) // Space: O(1) // Same problem from https://codingcompetitions.withgoogle.com/codejam/round/000000000019ffb9/00000000003384ea class Solution { public: vector<int> memLeak(int memory1, int memory2) { bool is_swapped = false; if (memory1 < memory2) { swap(memory1, memory2);...
ALGO
0.999049
5.646703
502e03ec-e9d5-48a0-a294-de15bc59523f
AhmadShodikinn/Learn-Mobile-Programming
praktikum2/container_propertypadding/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.99828
6.763549
3a925251-895c-4fc6-a107-d476f2e17689
zixfy/cpp-leetcode
[345]反转字符串中的元音字母.cpp
// 给你一个字符串 s ,仅反转字符串中的所有元音字母,并返回结果字符串。 // // 元音字母包括 'a'、'e'、'i'、'o'、'u',且可能以大小写两种形式出现不止一次。 // // // // 示例 1: // // // 输入:s = "hello" // 输出:"holle" // // // 示例 2: // // // 输入:s = "leetcode" // 输出:"leotcede" // // // // 提示: // // // 1 <= s.length <= 3 * 10⁵ // s 由 可打印的 ASCII 字符组成 // // // Related Topics 双指针 字符串 👍...
ALGO
0.999546
6.412133
1804a8d2-9296-45cb-a68b-6d7dcd8d85a4
Aks2812/Porto_Repo
Project Simple Program/Algorithm Series/Simple Problem Solving/Shopping_Problem_C_2.cpp
#include <stdio.h> int main() { int N,X,Y; float disc,tax,total; scanf("%d %d %d", &N, &X, &Y);getchar(); disc = N - (N*X/100); tax = Y * disc / 100; total = tax + disc; printf("%.2f\n",disc); return 0; }
ALGO
0.999301
3.174757
dba993b3-3280-45b5-8d2e-a2e320c5cfc2
ofithcheallaigh/python_projects
pythonCode/Computer Vision/opencv-master/modules/dnn/src/layers/normalize_bbox_layer.cpp
#include "../precomp.hpp" #include "layers_common.hpp" #include "../op_cuda.hpp" #include "../op_inf_engine.hpp" #include "../ie_ngraph.hpp" #ifdef HAVE_CUDA #include "../cuda4dnn/primitives/normalize_bbox.hpp" using namespace cv::dnn::cuda4dnn; #endif namespace cv { namespace dnn { class NormalizeBBoxLayerImpl CV_F...
ALGO
0.876979
6.994373
e0593a93-ecaa-402d-85ca-ab2bbbc00f09
connieya/cpp_algorithm
solved/gold2/12906.cpp
#include "bits/stdc++.h" using namespace std; int hanoi[3]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); vector<string> stick(3, ""); vector<string> finish(3, ""); for (int i = 0; i < 3; ++i) { int cnt; cin >> cnt; string str = ""; if (cnt...
ALGO
0.9997
4.054209
69b232ce-4b06-45c9-9807-e6d1be9a18e2
TeamCinco/Poker_Analysis
hands/src/analysis/dynamic_monte_carlo_analyzer.cpp
#include "dynamic_monte_carlo_analyzer.hpp" #include <iostream> #include <fstream> #include <filesystem> #include <iomanip> #include <chrono> #include <algorithm> #include <sstream> #include <set> #include <mutex> namespace poker { // ===== DiscoveredStrategy Implementation ===== std::string DiscoveredStrategy::get_...
ALGO
0.991918
7.89455
5e1f1da7-11d9-4ed9-8588-f8ed8732270a
dangnguyen03/IT002-Object-oriented-programming
Exercises/Ex-day2/Answer/21520683-BT1.1-Câu 1b.cpp
#include "Header.h" int main() { Phanso a, b; a.Nhap(); b.Nhap(); b.PSMax(a, b); b.output(); }
ALGO
0.917453
3.353072
c8b3cbc3-67ac-4c47-bb71-d8e520694be3
lucelujiaming/mySoxTest
RaytraceGroundUp/Chapter24.7.3/Chapter24.7.3/Torus.cpp
#include "stdafx.h" #include "Maths.h" // for SolveQuartic #include "Torus.h" // ---------------------------------------------------------------- default constructor Torus::Torus (void) : GeometricObject(), a(2.0), b(0.5), bbox(-a - b, a + b, -b, b, -a - b, a + b) {} /...
ALGO
0.994189
5.337088
8ddc090d-c7f7-4231-802a-3948b022523b
ishandutta2007/codeforces
alexandr_ts/normal/268/A.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int a[101]; int b[101]; for(int i = 0; i < n; i++) cin >> a[i] >> b[i]; int qua = 0; for(int i = 0; i < n; i++) for(int j = 0; j < n; j++) if(a[i] == b[j]) qua++; cout << ...
ALGO
0.99953
3.393578
1edd2c7d-7335-48fb-99b0-ed573785ef86
AhmedRaihanAlif/All-Codes-of-CP
CodeForces/432A.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int x,y,k=0;; cin>>x>>y; int arr[x]; for(int i=0;i<x;i++){ cin>>arr[i]; } sort(arr,arr+x); for(int i=0;i<x;i++){ if(5-arr[i]>=y){ k++; } } cout<<k/3; }
ALGO
0.999932
3.671653
bbc3189e-3abb-4591-9550-236b11acd4e1
redeff/cmp
training-camp/2019/03/L/fuzz/gen.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n = 7; int m = 20; cout << n << " " << m << endl; srand(14579278); vector<pair<int, int>> edges; for(int i = 0; i < m; ++i) { int a = rand() % n + 1; int b = rand() % (n-1) + 1; if(b == a) ++b; cout << a << " " << b << endl; edges.push_ba...
TOOL
0.930298
3.360385
f16ca148-cd4a-4eb6-be2a-0e7fbf60e492
ishandutta2007/codeforces
bluediamond/normal/1586/F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int relu(int a) {return max(a, 0);} const int N = 1000 + 7; int n, k, edge[N][N], mx; void split(int l, int r, int cur) { if (l >= r) { return; } mx += relu(cur - mx); int len = r - l + 1; vector<int> lens(k);...
ALGO
0.999897
3.649986
f2c4028a-966f-4b8b-b815-1adccbbc304b
ransaraw98/en3240-cmp
cpp/test/twobittest.cpp
// Example program #include <iostream> #include <string> #include <vector> #include <bitset> // COUNT THE SET BITS OF AN INTEGER unsigned int countSetBits(unsigned int n) { unsigned int count = 0; while (n) { count += n & 1; n >>=1; } return count; } int twoBitPosition(unsigned int n){...
ALGO
0.995162
5.62736
532834fe-8f06-4361-99fc-d70966904c78
W0nee/Coding_Test
Baekjoon/Greedy/1744-수 묶기/B1744.cpp
#include <stdio.h> #include <iostream> #include <queue> #include <map> #include <string> #include <algorithm> using namespace std; int N; vector<int> Plus; vector<int> Minus; vector<int> Zero; int Max; int main(void) { // freopen("B1744_input.txt", "r", stdin); cin >> N; for(int i = 1; i <= N; i++) { int inp...
ALGO
0.99998
3.986642
1011f597-4d46-4414-8de2-fd9d619c9d22
ayushgoyal415/CPP
My Questions/Array Questions/8) Perfect Peak/main.cpp
#include <limits.h> #include <iostream> #include <vector> using namespace std; int find_peak_number(vector<int> &A) { int n = A.size(); vector<int> left_max(n), right_min(n); int l_max = A[0], r_min = A[n - 1]; for (int i = 0; i < n; i++) { if (A[i] > l_max) l_max = A[i]; left_max[i]...
ALGO
0.999892
4.539314
4c43dbed-ae5e-4b7a-b98b-9ed3ba480d94
sarthak621/BINARY-TREES
11155-747-110-balanced-binary-tree/11155-747-110-balanced-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999956
6.644614
15cc9bc0-62d6-4ddf-aeef-cd85216c9e4c
ikhsanmuhamad22/flutter-chat_app
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.998756
6.772262
54dcdcb7-5492-4d36-95b1-0269443cd44d
makankosappoh/Leetcode-soln
0001-two-sum/0001-two-sum.cpp
class Solution { public: // muuch easy approach by hashmap vector<int> twoSum(vector<int>& nums, int target) { if (nums.empty()) return {}; // if empty return nothing unordered_map<int, int> map; for (int i = 0; i < nums.size(); i++) { // calculate complement of nums[...
ALGO
0.999858
6.185894
4b536fc0-41d0-45eb-965c-0e306c460fe3
CGCL-codes/LoomIO
src/boost/libs/numeric/odeint/examples/bind_member_functions.cpp
#include <iostream> #include <boost/numeric/odeint.hpp> namespace odeint = boost::numeric::odeint; typedef boost::array< double , 3 > state_type; //[ ode_wrapper template< class Obj , class Mem > class ode_wrapper { Obj m_obj; Mem m_mem; public: ode_wrapper( Obj obj , Mem mem ) : m_obj( obj ) , m_mem(...
ALGO
0.973627
7.561692
0d5a44a7-b77b-40d1-8a72-4163cfb6419b
kenta2/Stockfish1
src/evaluate.cpp
#include <cassert> #include <iomanip> #include <sstream> #include <algorithm> #include "bitcount.h" #include "evaluate.h" #include "material.h" #include "pawns.h" #include "thread.h" #include "ucioption.h" namespace { // Struct EvalInfo contains various information computed and collected // by the evaluation fun...
ALGO
0.998684
7.396685
1dcd6403-0792-4039-9e30-8ba50b974c33
cylfsbm/leetcode
leetcode0419/LongestSubstring.cpp
/* * LongestSubstring.cpp * * Created on: 2019419 * Author: Administrator */ #include<iostream> #include<set> using namespace std; class Solution { public: /** * ҵĽⷨ */ int lengthOfLongestSubstring(string s) { int count = 0, max = 0; for (int p = 0; p < s.length(); p++) { if (max > (s.length() ...
ALGO
0.999786
4.856046
5f395cb2-a085-479a-bdcb-6f20fb334e5e
huyenpham99/PhamHuyen
bai 8_3.cpp
//tim hang co tong gia tri lon nhat trong ma tran 4x4 #include<stdio.h> void nhap(int a[][4],int m ,int n){ for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ printf("nhap phan tu a[%d][%d]", i,j); scanf("%d", &a[i][j]); } } } void xuat( int a[][4],int m, int n){ for(int i=0;i<4; i++){ for(int j=0; j<4;j++)...
ALGO
0.999697
3.441888
dab5ad45-07ff-4f25-b7eb-329242169a1c
GAUTHAMPANDALA/Problem-Solving
Mathematics/SubsetofSet.cpp
// Given an array of eleesnts as set print all subsets // // Given a[]={1,2,3} => [1],[2],[3],[1,2],[1,3],[1,2,3],[2,3] => for n=3 we have (2^3)-1 = 7 // #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a[n]; for(int i=0;i<n;i++) { cin>>a[i]; } int N=pow(2,n); for(...
ALGO
0.999922
4.169941
98237bdf-edf5-4c47-9bb8-bc5164a1b7ce
Pirate-Emperor/CP_ALGO
Bitmask/bitManipulation.cpp
#include<bits/stdc++.h> #define getbit(x,i) ((x&(1<<i))!=0) #define setbit(x,i) (x|(1<<i)) //set 1 #define clearbit(x,i) (x&(~(1<<i))) //set 0 #define powerOfTwo(x) (x&(x-1)) //check if 'a' is 2^(something) #define bpop(x) __builtin_popcountll(x) using namespace std; //to use function ...
ALGO
0.999024
3.752499
718ad672-1df0-47d0-be3f-ec8cd477a47f
ishandutta2007/codeforces
zbsnb/normal/1263/B.cpp
#include<iostream> #include<algorithm> #include<set> #include<map> #include<queue> #include<vector> using namespace std; #define ll long long signed main(){ int t;cin>>t; while(t--){ int cnt[10000]={}; int a[100]; int n;cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; ...
ALGO
0.999875
4.695192
f258a226-8679-4feb-9196-4bf993d1c07c
anshul-garg27/Placement-prepration
Linked List/reverse_linked_list.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; class LinkedList { public: int len = 0; Node *head = NULL; void insertAtHead(int data) { if (head == NULL) ...
ALGO
0.999949
5.038399
67c8b636-d874-4785-a3a3-3b02d2511941
alexandraback/datacollection
solutions_2755486_0/C++/LSC/c.cpp
#include <cstdio> #include <cstring> using namespace std; int n; int day[1010], att[1010], l[1010], r[1010], str[1010], dd[1010], dp[1010], ds[1010]; int h[2000000], nh[2000000]; int main() { int T; scanf("%d", &T); for(int t=1; t<=T; t++) { scanf("%d", &n); for(int i=0; i<n; i++) scanf("%d%d%d%d%d%d%d%d",...
ALGO
0.999124
3.085374
d2b5cdb8-2ca1-4a98-828e-a7102682080a
redjasm/FYS3150
project3/src/PenningTrap.cpp
#include "PenningTrap.hpp" #include <cmath> #include <random> PenningTrap::PenningTrap(double B0_in, double V0_in, double d_in) : B0(B0_in), V0(V0_in), d(d_in), coulomb_interaction(true), f(0), w_V(0) {} void PenningTrap::add_particle(Particle p_in) { particles.push_back(p_in); } arma::vec PenningTrap::exter...
ALGO
0.999829
5.843255
91ec9385-97ba-4bfa-b1ed-f3bca1ff69d6
RajatDogra222/Stacks
questions/smallNumPatt.cpp
#include<bits/stdc++.h> using namespace std; // void smallNum(string s) { // stack<int> st; // stack<int> st2; // int count = 1; // for (int i = 0; i < s.size(); i++) { // if (st.empty() && s[i] == 'd') { // st.push(count++); // st.push(count++); // } // else if (st.empty() && s[i] == 'i') { // st.p...
ALGO
0.99988
4.599679
57d4b3ea-f9c7-48de-8133-363fcb14844b
thiradonTH/MobileApp-Course-204311
cs311hw03/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.998123
6.785645
b2d42b0f-71f5-4180-85cf-af294afab2cb
iammarajul/competitive_programming
Codechef/ENCODING.cpp
#include<bits/stdc++.h> using namespace std; int sc1(){int x; scanf("%d",&x); return x;} long long sc2(){long long x;scanf("%lld",&x);return x;} #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*b)/gcd(a,b) #define Int sc1() #define LL sc2() #define For(n) for...
ALGO
0.999861
3.276693
65da9190-5d04-4a72-8278-7046ba3638fe
avinashw50w/practice_problems
ACM ICPC/new questions/Maths - Ryotsu loves primes.cpp
/*To test Ryotsu's knowledge of primes, his father gave him a simple task. The task is to find the sum of every Kth prime numbers in given list of numbers. He's having trouble solving it, being an elementary school student. Help him accomplish the task. Input Format: The first line of the input contains an integer T d...
ALGO
0.999671
3.525155
d1123e0f-3000-46e2-83f6-470268c64e35
ikeman32/vetcoin
src/qt/guiutil.cpp
#include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #if QT_VERSION >= 0x050000 #include <QUrlQuery> #else #inclu...
TOOL
0.892635
6.99186
39086c11-650d-43ed-a267-b59f21087761
sparrow84001/oneAPI
oneapi-essentials-training/08_DPCPP_Reduction/lab/reduction_custom_operator.cpp
using namespace sycl; static constexpr size_t N = 256; // global size static constexpr size_t B = 64; // work-group size template <typename T, typename I> struct pair { bool operator<(const pair& o) const { return val <= o.val || (val == o.val && idx <= o.idx); } T val; I idx; }; int main() { //# setup...
ALGO
0.999832
4.608022
06c11d45-47db-4383-b1c1-57d7139221fc
NianShaoSix/studycode
c++/c++_algorithm_problemset/luguB2091.cpp
// #include <iostream> // using namespace std; // int n; // int a[1010]; // int b[1010]; // int main(){ // cin >> n; // for(int i = 1;i <= n;i++){ // cin >> a[i]; // } // for(int i = 1; i <= n; i++){ // cin >> b[i]; // } // int res = 0; // for(int i = 1; i <= n;i++){ // ...
ALGO
0.999789
3.9366
bdc3926c-f6d3-4ddc-819e-8ee7422f9cfb
Alikhizar142/Data-Strcutures
circularlinklist.cpp
#include <iostream> using namespace std; class node { public: int data; node *next; node(int val = 0) { data = val; next = nullptr; } }; class circularlinklist { node *head; int length; public: circularlinklist() { head = NULL; length = 0; } ...
ALGO
0.999552
3.996229
b17d1bdf-6eea-42ba-8611-ada2caa2d1c6
GuilhermeGabriel/competitive-programming
cses/2205.cpp
#include "bits/stdc++.h" using namespace std; vector<string> codes; void generate(int n,string s){ if(n==0){ string gc;gc+=s[0]; for(int i=1;i<(int)s.size();i++){ if(s[i]!=s[i-1])gc+='1'; else gc+='0'; } codes.push_back(gc); }else{ generate(n-1,s+'0'); generate(n-1,s+'1'); } ...
ALGO
0.999985
3.922922
2fbaf677-9aff-4e5f-93e4-537130cb9553
h076/sortVisualiser
bubbleSort.cpp
#include <iostream> #include <vector> #include <SDL2/SDL.h> using namespace std; #define SCREEN_WIDTH 800 #define SCREEN_HEIGHT 800 void populateArr(vector<int> *, int); void printVector(vector<int> *); void bubbleSort(vector<int> *, SDL_Renderer *); bool checkSort(vector<int> *, SDL_Renderer *); void drawState(vect...
ALGO
0.990305
5.298889
0f6c2c6c-68c9-4289-ad43-6294ebe22fe2
khiemdayne/ros2-mecanum-control
mecanum_controller/src/odometry.cpp
#include "mecanum_controller/odometry.hpp" #include "mecanum_controller/mecanum_controller.hpp" namespace mecanum_controller { Odometry::Odometry(size_t velocity_rolling_window_size) : _timestamp(0.0), _x(0.0), _y(0.0), _heading(0.0), _linear_x(0.0), _linear_y(0.0), _angular(0.0), _wheel...
TOOL
0.940651
6.53818
26078d8d-9f43-4948-bf48-19fbc6254378
Phantom-liu/algorithm-studying
图/AOE网和关键路径.cpp
#include<bits/stdc++.h> using namespace std; int A[51][51], W[51][51]; //邻接点 邻接矩阵 int cd[51], rd[51]; //出度和入度 int start, ed; int topo[51], cnt=0; int ve[51], vl[51]; //事件(点)最早最晚时间 int ae[51], al[51]; //活动(边)最早最晚时间 int B[51][51]; //关键路径顶点的邻接点 int path[51], cd2[51]; //关键路径顶点 出度 int N, M; void print(int,int); /* 1 2 ...
ALGO
0.999991
3.891906
9a8d47bf-ecc9-416a-9f03-e3b4202dc60b
Shipu/OnlineJudgeProblemSolutionWithCPlusPlus
uva/111/111.cpp
/*********************************************************** ******************* Team : BUBT_HIDDEN ********************* ************************************************************ ***** ☺ ☺ ☺ ********** Shipu Ahamed *****...
ALGO
0.999715
3.346563
2d8ca8a3-92c1-4900-b2d9-e7c08d2cd74a
sadhana8/c-program
lab-20-odd.cpp
//write a program in C to display the pattern like pyramid using asterisk and each row contain an odd number of astericks. /* * * * * * * * * * */ #include<stdio.h> int main(){ int i,j,spc,n,k; printf("Input number of Rows for the pattern:"); scanf("%d",&n); spc=n+3-2; for(i=0;i<=n; i+...
ALGO
0.999057
4.057338
bc8ca434-4ffe-4230-9817-50f772477686
sizhuo-zhang/boost_1_62_0
libs/compute/perf/perf_stl_partial_sum.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); } int main(int argc, char *argv[]) { using boost::compute::int_; perf_parse_args(argc, argv...
ALGO
0.993041
5.875501
9aa784c8-1f19-4c04-9e0f-22262044e7d7
liuxueyang/cpp
leetcode/contest/377/b.cpp
// Date: Sun Dec 24 10:52:53 2023 #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <climits> #include <iostream> #include <iomanip> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <algorithm> #include <uti...
ALGO
0.999862
4.564087
f92127f8-f8ca-42d8-b05b-45ff4935c10c
MahinAshraful/CodeWatch_Data
sample-data/p00003/s654854303.cpp
#include <iostream> #include <algorithm> using namespace std; int main(){ int N,a[3]; cin >> N; for(int i = 0 ; i < N ; i++){ for(int j = 0 ; j < 3 ; j++){ cin >> a[j]; } sort(a, a+3); cout << (a[0]*a[0]+a[1]*a[1] == a[2]*a[2] ? "YES" : "NO") << endl; } return 0; }
ALGO
0.999801
3.932786
b65214b2-e310-4f8b-abcb-ba1fed23e47a
ayushreeshende/MKPITS_DotNet_July_2023_Ayushree_Shende
c++/operator.cpp
#include<iostream> using namespace std; int main() { int n1,n2,sum=0; char op; cout<<"enter 2 numbers"; cin>>n1>>n2; cout<<"enter op(+,-,*,/)"; cin>>op; if(op=='+') { sum=n1+n2; } else if(op=='-') { sum=n1-n2; } else if(op='*') { sum=n1*n2; } else if(op='/') { sum=n1/n2; } cout<<"result="<<su...
ALGO
0.993795
3.025734
50892a19-ed11-4000-bdaf-ceb8cb5b2069
jdsom/C---Programs
Exercises/finding_character.cpp
#include <iostream> #include <string> int main(){ std::string mainString = "Hello C++ World."; std::string subString = "C++"; auto mysubstringfound = mainString.find(subString); if (mysubstringfound != std::string::npos){ std::cout << "The substring of the main string is " << subString << "\...
TOOL
0.949037
4.11483
39b119d2-f453-419a-96a9-f217b14b903c
evaratke/oop
Новая папка (2)/стэк/df.cpp
/*#include <iostream> using namespace std; //Сделать стек динамическим class Stack { int* st_; int top_; int size_; public: Stack() : Stack(10){}; Stack(int size) : size_(size){ st_ = new int[size_]; Clear(); } ~Stack(){delete[] st_;} void Clear(){top_ = -1;} bool IsFull(){return top_ == siz...
ALGO
0.972653
3.555016
1840377a-d88e-4b10-ad37-dfab51b97680
parthpurwar/CP-
sakurakoandkosuke.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; #define lld long double; #define f(i,a,b) for(int i = a; i < b; i++); #define fe(i,a,b) for(int i = a; i >= b; i--); #define vll vector<ll>; #define pb push_back; #define pii pair<int, int>; #define si set<int>; #define sc set<char>; #define mii map...
ALGO
0.994197
3.622375
f5e7fb1f-21d2-438e-a4c8-48523d6f983e
sekia/sskkm
eigen-3.1.4/bench/sparse_randomsetter.cpp
#define NOGMM #define NOMTL #include <map> #include <ext/hash_map> #include <google/dense_hash_map> #include <google/sparse_hash_map> #ifndef SIZE #define SIZE 10000 #endif #ifndef DENSITY #define DENSITY 0.01 #endif #ifndef REPEAT #define REPEAT 1 #endif #include "BenchSparseUtil.h" #ifndef MINDENSITY #define M...
TOOL
0.895965
4.487392
9ee9a89f-d44d-4af1-9af4-0580998bf9f0
longqt321/Math_for_CS
31.3.2025/B_Expensive_Number.cpp
#include <iostream> #include <vector> #include <algorithm> #include <math.h> #include <queue> #include <stack> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <functional> #include <string> #include <bitset> using namespace std; #define ll long long #define ld long double #defi...
ALGO
0.999888
4.573634
6324dab9-6540-4b85-bbb1-d0a5dfc467ca
WOPH96/Hardwork_Luck
baekjoon/greedy/greedy-11501/C++/greedy-11501.cpp
// #include <bits/stdc++.h> #include <iostream> #include <vector> using namespace std; typedef long long ll; // 입력변수생성 int t; // 다른 변수 생성 // 입력, 테스트 출력 void print(); void sol(vector<int> &stocks) { // 쌀 대 사서 비쌀 때 팔면 되잖어 ;; // 역순으로 고고ㅓ int max = -1; ll sum = 0; // for (auto &elem : stocks) ...
ALGO
0.999706
5.158505