uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
29c90441-c420-4679-9646-60b5105a778c
Merisho/comprog
codeforces/round-651-div-2/d.cpp
#include <bits/stdc++.h> using namespace std; vector<int> a; int subsequence(int n, int m, int p) { int c = 0; for (int i = 0; i < n; ++i) { int cnr = (c + 1) % 2; if (cnr == p && a[i] <= m || cnr != p) { ++c; } } return c; } int main() { int n, k; cin >> n >> k; a = vector<int>(n); for (int i =...
ALGO
0.999982
4.826149
2c6d77a1-9496-4046-871f-de1c6371f129
PrinceInScripts/Leetcode-Question
4. Jun 2024/Problem 48 {Sum in Matrix}/Question.cpp
/* # 4. Sum in a matrix */ /* You are given a 0-indexed 2D integer array nums. Initially, your score is 0. Perform the following operations until the matrix becomes empty: From each row in the matrix, select the largest number and remove it. In the case of a tie, it does not matter which number is chosen. Identify t...
ALGO
0.999995
6.143443
7e020376-c6a2-424b-b7e1-dd6c882d1136
Desmond123-arch/printf_simple_version
convert.cpp
#include "main.h" /** * unsigned_number_tostring - converts a number to a particular base and stores it in buffer * @buffer: stores the numbers converted (possibility of buffer overflow) or not check line 66 * @buf: array for stroing the numbers converted temporarly * */ void unsigned_number_tostring(uint64_t number, i...
ALGO
0.964993
4.76665
80514666-d649-4f45-ae44-59e128e58375
666-shit/sort
基数排序.cpp
// // Created by c1533 on 2022/10/11. // /**基数排序 * 对n个数字的序列(以三位数以下的数字为例) * 首先按照个位(0~9)大小分配,分配到10个不同的组中,按照初始序列分,然后将每一组按从大到小,从上到下的顺序收集 * 形成新序列,此序列的个位数按照从大到小排列的序列 * 第二次按照十位分配收集,第三次按照百位分配收集 * 由于从小的位数开始,可以保证低位大的先入队,则出的时候大的在小的前面 * * 得到递减序列的过程: * 初始化:设置r个空队列,分别对应r中取值 * 按照各个关键字位权重递增的次序(个位数对关键字整体影响最小,其次十位,最后百位),对d个关键字位...
ALGO
0.999374
4.362441
9ed34dee-5b66-449f-9a21-2593f6a7396d
ishandutta2007/codeforces
hank55663/normal/1000/C.cpp
#include<bits/stdc++.h> #define mp(a,b) make_pair((a),(b)) #define pii pair<int,int> #define pll pair<LL,LL> #define pb push_back #define x first #define y second #define sqr(x) ((x)*(x)) #define EPS 1e-6 #define MEM(x) memset(x,0,sizeof(x)) #define MEMS(x) memset(x,-1,sizeof(x)) #define pi acos(-1) #define index Index...
ALGO
0.999954
3.182549
824bc008-eb8d-42c5-9e48-ad583abab90b
ishandutta2007/codeforces
black_horse2014/normal/914/D.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1<<20; int d[N], a[N]; void build(int u, int l, int r) { if (l == r) { d[u] = a[l]; return; } int mid = l + r >> 1; build(u + u, l, mid); build(u + u + 1, mid + 1, r); d[u] = __gcd(d[u + u], d[u + u + 1]); } void update(int u, int l, int r, int p...
ALGO
0.999923
4.576886
b3224edf-0438-4060-9e7d-bf899454a565
jordan72738/Indices
SHA_algorithm.cpp
// sha256.cpp #include <iostream> #include <string> #include <vector> #include <array> #include <bitset> class SHA256 { public: static std::string hash(const std::string& data) { std::vector<unsigned int> K = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, // Add all other constan...
ALGO
0.999905
7.253525
e3e008a8-0a99-4a1c-8fb5-c16d04aba8c7
mihaimoga/XMLSitemap
boost/libs/range/test/algorithm_test/search_n.cpp
#include <boost/test/test_tools.hpp> #include <boost/test/unit_test.hpp> #include <boost/assign.hpp> #include <algorithm> #include <list> #include <set> #include <vector> namespace { template<typename ForwardIterator, typename Integer, typename Value> inline ForwardIterator reference_search_n(ForwardItera...
TEST
0.95123
7.53285
d34933ef-b3ff-41c5-b90e-6c6476be4114
ishandutta2007/codeforces
nweeks/normal/939/B.cpp
#include <bits/stdc++.h> #define FOR(i, j, n) for (int i(j); i < n; ++i) #define FORR(v, c) for (auto &v : c) #define F first #define S second #define SQ(x) (x)*(x) #define pb push_back #define all(c) (c).begin(), (c).end() #define dbg(x) std::cerr<<#x<<" = " << (x) << std::endl #define pnl(x) std::cout << x << '\n' #...
ALGO
0.999967
3.997896
69e74433-9051-4d81-8ed1-2b895b804a80
adimuntoiu/subiecte-atestat-c-
3/main.cpp
#include <iostream> #include <fstream> using namespace std; ifstream fin("vector.txt"); ofstream fout("solutie.out"); int n,v[1001],numar; bool perfect(int n){ int sumaDiv=0; for (int i=1; i<=n/2; i++){ if (n%i==0) sumaDiv+=i; } if (n==sumaDiv) return true; return false; } int main() { f...
ALGO
0.999175
4.172005
7af89afe-8d58-41e1-9728-d2a912e5774a
af-orozcog/miscellaneous
MUA/04/E.cpp
// Is love even real? #include<bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ll long long #define ss second #define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); } void err(istr...
ALGO
0.999984
3.030757
4e84cec3-fd67-43c4-8f5f-0ff6f6d4cc04
RishabhBoop/info2_projects
MCTS_checkers/mcts_algorithm.cpp
#include "mcts_algorithm.hpp" using namespace std; MCTS_leaf *select_best_child(MCTS_leaf *root_node) { if (root_node == nullptr || root_node->children.size() == 0) { return root_node; } // maximize for the current player, so we need to check the current player int current_player = root_no...
ALGO
0.999907
5.503225
59e7156a-bc7b-4d60-97f3-23e7dab1c6e9
abhijitjawale09/CODE-FORCE
0688-B-Lovely Palindromes/0688-B-Lovely Palindromes.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ull unsigned long long #define vi vector<int> #define vll vector<long long> #define pii pair<int, int> #define pll pair<long long, long long> #define all(x) x.begin(), x.end() #define pb push_back #define ff first #define ...
ALGO
0.999858
4.704402
fe2177bb-5511-4f9a-88cd-5916831c93ed
luckyspacetraveller/ChromaticAberrationKernel
ChromaticAberrationKernel_v05.cpp
// ChromaticAberrationKernel v1.0 // by Lukas Schwabe - Mackevision - 01-2019 // fbm_Noise_blink_kernel v1.0 by Johannes Saam - Nukepedia kernel ChromaticAberrationKernel : ImageComputationKernel<ePixelWise> { Image<eRead, eAccessRanged2D, eEdgeClamped> src; Image<eWrite> dst; param: bool smear; ...
TOOL
0.875168
5.378268
bce58251-9c7d-4b69-a5d5-4d045203c3d9
keshish-kumar/CPP
0235-lowest-common-ancestor-of-a-binary-search-tree/0235-lowest-common-ancestor-of-a-binary-search-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) { if(root == ...
ALGO
0.999985
6.128789
488ece0f-4d02-496f-a436-1dbde481bec9
alowu/Numerical-methods-v6
Lab_1/main.cpp
#include "../functions/common.h" /* * --!tests!-- 21.547 -95.520 -96.121 -49.930 10.223 -91.065 -7.343 -12.465 51.218 12.264 86.457 60.812 2.30 5.70 -0.80 -6.49 3.50 -2.70 5.30 19.20 1.70 2.30 -1.80 -5.09 21.547 -95.510 -96.121 -49.930 10.223 -91.065 -7.343 -12.465 51.218 12.264 86.457 60.812 2.21 3.65 1.69 6....
ALGO
0.999142
3.347762
f64d62ce-02b8-4e58-bfd5-84df57632fc3
edisonhello/OnlineJudge
UVa/536.cpp
#include <iostream> #include <string> using namespace std; void solve(string, string); int main() { string preOrder, inOrder; while (cin >> preOrder >> inOrder) { solve(preOrder, inOrder); cout << endl; } return 0; } int index(string s, int x) { for (int i = 0; i < s.size(); ++i) { if (s[i] == x) re...
ALGO
0.999992
4.387741
39bf6e2a-447d-4dbe-8696-d7db7fee4ea7
leticialopesms/MC621
Contest11/A.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> // #include <algorithms.h> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; typedef long long l...
ALGO
0.99684
4.513664
0cc73ec5-3942-41d1-a681-4f2c659d43b5
darkshuige/codecode
c code/5084.cpp
#include<bits/stdc++.h> using namespace std; char a[100005]; int main() { while(cin>>a) { int l=0,r=strlen(a)-1; int cnt=0; while(l<=r) { if(a[l]!=a[r]) cnt++; l++; r--; } cout<<cnt<<endl; } return 0; }
ALGO
0.999747
3.459138
f2d2eb84-5f97-47ba-bd96-27a3104cb008
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10018_9.cpp
#include <bits/stdc++.h> using namespace std; const long long N = 2051; const long long INF = 1e18 + 230; long long dp[N][N]; long long pmax[N + 1]; long long c[2 * N]; void add_person(long long L, long long S) { for (long long alr = N - 1; alr >= 0; alr--) { if (alr == 0) { dp[L][alr] = max(dp[L][alr], *ma...
ALGO
0.999704
3.084452
50384c2a-2fb6-459e-b366-683316ed2e4c
Deepdive543443/verify
lib/Nanop.cpp
#include <iostream> #include "Nanop.h" #include "cpu.h" static inline float intersection_area(const Object& a, const Object& b) { cv::Rect_<float> inter = a.rect & b.rect; return inter.area(); } static void nms_sorted_bboxes(const std::vector<Object>& faceobjects, std::vector<int>& picked, float nms_threshol...
ALGO
0.998688
7.151147
a995dc42-5ef0-4838-82c6-d58abb8c1168
ishandutta2007/codeforces
jaroslavurban/normal/1321/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; int main(){ ll n; cin >> n; ll vals[1000000] = {}; for (ll i = 0; i < n; ++i){ ll val; cin >> val; vals[val - i + 500000] += val; } ll max = 0; for (ll i = 0; i < 1000000; ++i){ if (vals[i] > max) max = vals[i]...
ALGO
0.999872
3.647867
80a4b11c-bc5f-44da-af75-e1f432441b7a
tar3q-az1z/Codeforces-solutions
118A.cpp
#define _USE_MATH_DEFINES #include<iostream> #include<vector> #include<string> #include<cstring> #include<stack> #include<queue> #include<cstdio> #include<set> #include<unordered_set> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<utility> #include<cstdlib> using namespace std; typ...
ALGO
0.999222
3.328395
4b23c773-0d74-451d-9dfc-b4d1980900f4
harwHarw03/cp
Fun/Untitled3.cpp
#include <iostream> using namespace std; int main (){ int a; cin>>a; int data[a]; for(int i = 0; i < a; i++){ cout<<"Data "<<i<<" : ";cin>>data[i]; } int tmp = 0; for(int i = 0; i < a-2; i++){ for(int j = a-1; j < i+1; j--){ if(data[j-1] > data[j]){ tmp = data[j-1]; data[j-1] = data[j]; data...
ALGO
0.999928
3.399747
4a46b13f-bc78-43cb-84c5-a23198cdb8d8
falcaoanderson/CompetitiveProgramming
codcad/SUBS INGLES/Work of the Pope/148938.cpp
// 01/08/19 // 3:27 PM // #include <iostream> #include <algorithm> using namespace std; #define MAXN 1010 #define INF 0x3f3f3f3f struct Caixa{ int peso, resistencia; }; int n; Caixa caixas[MAXN]; int memo[MAXN][MAXN]; bool ordCaixa(Caixa a, Caixa b){ return (a.resistencia > b.resistencia || (a.resistenci...
ALGO
0.999956
4.6164
7a665c83-2138-446f-8246-eff890ad7e66
ishandutta2007/codeforces
rniya/normal/377/E.cpp
#define LOCAL #include <bits/stdc++.h> using namespace std; #pragma region Macros typedef long long ll; typedef __int128_t i128; typedef unsigned int uint; typedef unsigned long long ull; #define ALL(x) (x).begin(), (x).end() template <typename T> istream& operator>>(istream& is, vector<T>& v) { for (T& x : v) is ...
ALGO
0.999925
4.977099
c583d75f-5221-4849-b7ab-e51c3fb217c8
jjhwan-h/algorithm
CPP/2589.cpp
/** * @file 2589.cpp * @author jang jeonghwan (<EMAIL>) * @brief BOJ/2589/보물섬 * @version 0.1 * @date 2024-07-04 * * @copyright Copyright (c) 2024 * */ #include<iostream> #include<vector> #include<string> #include<queue> using namespace std; struct el{ int x; int y; int cnt; }; vector<int> map[...
ALGO
0.999778
4.759177
99d12045-db3d-4d8a-a619-18c706d937e5
Pixel-Pirate/LibDev
src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
/* ScriptData SDName: Boss_Morogrim_Tidewalker SD%Complete: 90 SDComment: Water globules don't explode properly, remove hacks SDCategory: Coilfang Resevoir, Serpent Shrine Cavern EndScriptData */ #include "ScriptPCH.h" #include "serpent_shrine.h" enum eEnums { // Yell SAY_AGGRO = -1548030, SAY_SUMMON1 = -...
TOOL
0.929953
3.032738
24e1a3b7-3d4b-43d5-885c-49d3a07f6e8b
Pralhad322/hyperscan-with-rule-filtering
src/nfagraph/ng_literal_decorated.cpp
/** \file * \brief Analysis for literals decorated by leading/trailing assertions or * character classes. */ #include "ng_literal_decorated.h" #include "nfagraph/ng_holder.h" #include "nfagraph/ng_util.h" #include "rose/rose_build.h" #include "rose/rose_in_graph.h" #include "rose/rose_in_util.h" #include "util/comp...
ALGO
0.93949
7.204133
8c774043-ba07-4556-b112-fab938fd703c
interactivevislab/TrianglePlugin-UE5
TrianglePlugin/Source/libigl-static/include/copyleft/cgal/delaunay_triangulation.cpp
#include "delaunay_triangulation.h" #include "../../delaunay_triangulation.h" #include "orient2D.h" #include "incircle.h" template< typename DerivedV, typename DerivedF> IGL_INLINE void igl::copyleft::cgal::delaunay_triangulation( const Eigen::MatrixBase<DerivedV>& V, Eigen::PlainObjectBase<DerivedF>& F) {...
ALGO
0.997367
7.02047
227ddf24-d675-4266-aa1b-0f86c465e274
siddofficial13/DSA-251-codes
Merge K Sorted Arrays.cpp
#include <bits/stdc++.h> vector<int> mergeKSortedArrays(vector<vector<int>>&kArrays, int k) { // Write your code here. priority_queue<int,vector<int>,greater<int>>minHeap; for(int i=0;i<k;i++){ for(int j=0;j<kArrays[i].size();j++){ minHeap.push(kArrays[i][j]); } } vecto...
ALGO
0.999982
5.250422
a9b0b7b4-74c1-4eaa-af42-dbc83837886f
rakibul0026/Numerical-Analysis
Interpolation/5.2x+1 forward difference.cpp
#include<iostream> using namespace std; int main() { float x[20], y[20][20]; int i,j, n; cout << "Enter number of data? " << endl; cin >> n; cout << "Enter data: " << endl; for(i = 0; i < n ; i++) { cout << "x[" << i << "] = "; cin >> x[i]; y[i][0]=2*x[i]+1; } for(i = 1; i < n; i++) { for(j = 0; ...
ALGO
0.999725
3.096885
35c23e83-a1b9-40b3-be92-3b616b2194a3
faizan346/Ds-Algo-Cplusplus
random/tree.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: Node* left; Node* right; int data; Node(int value) { data = value; } }; class BinarySearchTree { Node* root; public: BinarySearchTree() { root = NULL; } // void insertHelper(Node* &root, int ...
ALGO
0.999943
5.191036
6dc41015-85ea-48a7-af0e-1aede0be7577
Acka1357/ProblemSolving
Codeforces/RegularRound/R508_D2/D.cpp
#include <stdio.h> #include <algorithm> #include <vector> #include <queue> #include <functional> #include <memory.h> #include <string.h> using namespace std; long long a[500001], tree[1 << 20], NN = 1; long long absx(long long x){ return x < 0? -x : x; } int rmq_idx(int ql, int qr, int l = 1, int r = NN, int idx = ...
ALGO
0.999919
3.908855
c616b22d-9e96-4912-b168-0443d1cacade
moorscheln/Phase2
GPT.cpp
#include <iostream> using namespace std; #include "RBTreeGPT.cpp" int main() { string K[10] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "K"}; int V[10] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; RBTree<string, int> T1(K, V, 10); RBTree<string, int> T2; for (int i = 0; i < 10; i++) T2.insert(K...
ALGO
0.989393
4.347993
cd496000-019a-4bea-8ef0-3d707dee5619
meetanupam/Leetcode-Problem-Solutions
1672. Richest Customer Wealth.cpp
class Solution { public: int maximumWealth(vector<vector<int>>& accounts) { int i,j,m=accounts.size(),n=accounts[0].size(),maxw=0; for(i=0;i<m;i++) { int w=0; for(j=0;j<n;j++) { w+=accounts[i][j]; } maxw=max(maxw,w);...
ALGO
0.99968
5.832765
e6e4c513-6e5e-47e1-9726-265350b84db8
aire233/leetcode
Elementary_algo/23_7_31/1.cpp
// https://leetcode.cn/leetbook/read/top-interview-questions-easy/x2f9gg/ class Solution { public: int removeDuplicates(vector<int> &nums) { if (nums.size() < 2) return nums.size(); int p1 = 0, p2 = 1; for (; p2 < nums.size();p2++) { if (nums[p1] != nums[p...
ALGO
0.999892
6.263132
4c6e7d96-6577-4976-ba76-ba13257af73e
wannabeyourfriend/THU-CST-FOP-2024fall
PA/2493.cpp
#include <iostream> #include <algorithm> #include <cctype> #include <vector> #include <map> #include <string> #include <sstream> using namespace std; string password(map<string, int> &word2num, vector<string> input){ vector<int> res; for (const auto& element : input) { int num = word2num[element]; ...
ALGO
0.999432
5.606541
a64350b1-b7d8-41f8-8d80-a6f6846dfed4
Hariprashad-Ravikumar/nEDM_Lattice_QCD_CHROMA
src-20240121/eigen-3.3.9/bench/eig33.cpp
#include <iostream> #include <Eigen/Core> #include <Eigen/Eigenvalues> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; template<typename Matrix, typename Roots> inline void computeRoots(const Matrix& m, Roots& roots) { typedef typename Matrix::Scalar Scalar; con...
ALGO
0.999467
5.583963
087313dc-3299-426a-9c17-bab611dbce80
walkccc/LeetCode
solutions/3229. Minimum Operations to Make Array Equal to Target/3229.cpp
class Solution { public: // Similar to 1526. Minimum Number of Increments on Subarrays to Form a Target // Array long long minimumOperations(vector<int>& nums, vector<int>& target) { long ans = abs(nums[0] - target[0]); for (int i = 1; i < nums.size(); ++i) { const int currDiff = target[i] - nums[...
ALGO
0.999955
6.639084
2fa5e653-6285-44db-ad3b-6d859fe3070a
Taruun/cp
900/A. Ilya and Bank Account.CPP
// 12345 // n / 100 = 123 removes last 2 digits // * 10 = 1230 // + n % 10 = 1235 adds last number #include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int n; cin >> n; if(n >= 0) cout << n << endl; else { int a = n / 10 int b = n / 100 * 10 + n % 10; ...
ALGO
0.996917
4.518887
f4e1c551-4490-4784-8bb0-758879c2da3e
Legion-zialot/s-xray16
Externals/cryptopp/ecp.cpp
// ecp.cpp - originally written and placed in the public domain by Wei Dai #include "pch.h" #ifndef CRYPTOPP_IMPORTS #include "ecp.h" #include "asn.h" #include "integer.h" #include "nbtheory.h" #include "modarith.h" #include "filters.h" #include "algebra.cpp" NAMESPACE_BEGIN(CryptoPP) ANONYMOUS_NAMESPACE_BEGIN sta...
ALGO
0.976763
6.418405
5dbbf838-b928-4dc3-b48a-176341e09dda
singlarohan/leetcode_sol
0718-maximum-length-of-repeated-subarray/2022-09-20 10.26.05 - Accepted - runtime 1536ms - memory 109.2MB.cpp
class Solution { public: vector<vector<int>> dp; int solve(int i, int j, vector<int> &num1, vector<int> &num2){ if(i >= num1.size() || j >= num2.size()) return 0; int a = 0; if(dp[i][j] != -1) return dp[i][j]; if(num1[i] != num2[j]) return...
ALGO
0.999986
5.926174
e1e52c4e-2d03-4222-b8f8-fb19cdcc34ac
revng/llvm-project
llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp
#include "llvm/Transforms/Utils/CanonicalizeFreezeInLoops.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/IVDescriptors.h" #include "llvm/Analysis/LoopAnalysisManager.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvo...
ALGO
0.979528
7.814071
a0b1e464-ca95-4e8e-8fb7-e28aaaa9c231
rlt5/LeetCode
0451 - Sort Characters By Frequency/frequencySort.cpp
// 451. Sort Characters By Frequency // Given a string, sort it in decreasing order based on the frequency of characters. // Example 1: // Input: // "tree" // Output: // "eert" // Explanation: // 'e' appears twice while 'r' and 't' both appear once. // So 'e' must appear before both 'r' and 't'. Therefore "eetr" is...
ALGO
0.999943
6.209413
4f43bdb6-987f-421d-be44-c3a668857b61
JeanV0/hackerrank-code
30_days_of_code/5.loops.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); int main() { string n_temp; getline(cin, n_temp); int n = stoi(ltrim(rtrim(n_temp))); int math = 0; while(math++ < 10){ cout << n << " x " << math << " = " << n*math << endl; };...
ALGO
0.998882
4.252986
3a418893-351e-4112-acb4-81bc48d679ab
ShuoWangZJU/Two-Componet-Macrophage-Model
code/USER-OMP/pair_coul_debye_omp.cpp
/* ---------------------------------------------------------------------- Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include <math.h> #include "pair_coul_debye_omp.h" #include "atom.h" #include "comm.h" #include "force.h" #include "ne...
ALGO
0.999742
6.418544
c9018895-4404-49f9-8e93-e58789806f51
chahatnagar/StriversChallengeSDESheet
KadaneAlgorithm.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int maxSubArray(vector<int>& nums) { int max_ans = nums[0], curr_sum = 0; for(int i = 0; i < nums.size(); i++) { curr_sum += nums[i]; max_ans = max(max_ans, curr_sum); if(curr_sum<0) ...
ALGO
0.99987
5.654329
feccbfbb-40dd-4338-92b5-12d0ebca99b5
andrei1902/cpp-tutorials
asessments/multiples_of_19.cpp
#include <iostream> void multiples_of_19(); int main() { multiples_of_19(); return 0; } void multiples_of_19() { const size_t COUNT{1000}; size_t i{0}; for (size_t i = 100; i < COUNT; i++) { size_t multiple_of_19{0}; if (i % 19 == 0) { multiple_of_19 = i; std::cout << multiple_of_19 << " "; } }...
TOOL
0.965712
4.326921
9f3a40db-f7d7-4af4-ab56-fd70cdc9040e
Harshsngh07/DataStructures_and_Algorithms
leetcode/BinarySearch/smallestGreaterElement.cpp
class Solution { public: char nextGreatestLetter(vector<char> &letters, char target) { int n = letters.size(); if (n == 1 || target < letters[0] || target >= letters[n - 1]) return letters[0]; if (n == 2 && target > letters[0] && target < letters[1]) return l...
ALGO
0.999503
5.215115
5c8bbca3-0acf-4112-be0f-c50b9b4e2508
Seungcode/Algorithm
프로그래머스/2/131701. 연속 부분 수열 합의 개수/연속 부분 수열 합의 개수.cpp
#include <string> #include <vector> #include <map> using namespace std; //배열 선언 int mk_sum[1001][2001] = {0, }; map <int, int> cnt; int solution(vector<int> elements) { int answer = 0; //하나로 이뤄진 경우 카운트 for(int i = 0; i<elements.size(); i++){ if(cnt[elements[i]] == 0){ answer++; ...
ALGO
0.999473
5.032964
ec232242-014e-4553-bb07-b67f169935a7
sarvex/leetcode-checked-c
solution/1800-1899/1826.Faulty Sensor/Solution.cpp
class Solution { public: int badSensor(vector<int>& sensor1, vector<int>& sensor2) { int i = 0; int n = sensor1.size(); for (; i < n - 1 && sensor1[i] == sensor2[i]; ++i) {} for (; i < n - 1; ++i) { if (sensor1[i + 1] != sensor2[i]) return 1; if (sensor1[i] !=...
ALGO
0.99992
5.205287
6f62bf9e-4c7e-4097-b2ea-7f1389f8c698
valida-xyz/valida-compiler
libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // <algorithm> // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2, // weakly_incrementable O, class Comp = ranges::less, // class Proj1 = identity, class Proj2 = identity> // requires mergeable<I1, I2, O, Comp, Proj...
TEST
0.938112
7.453716
4c69a594-b301-4308-9aca-0d54207db067
Yaro2709/AlgoProblems
14/1496B.cpp
#include<iostream> #include<set> using namespace std; int main() { int t; cin >> t; while (t--) { int n, k; cin >> n >> k; set<int> s; for (int i = 0; i < n; i++) { int x; cin >> x; s.insert(x); } int mex = -1, max; max = *s.rbegin(); int i = 0; for (int x : s) { if (x != i) { me...
ALGO
0.999903
4.057824
6e15a73c-f272-4362-80e7-5d25210029ac
xf519ffi77/donghedd
20250128/一个简单的整数问题2.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; typedef long long LL; const int N = 100010; int n, m; int a[N]; LL t1[N], t2[N]; // t1[i]维护b[i]的前缀和,t2[i]维护i*b[i]的前缀和 int lowbit(int x) { return x & -x; } void add(int x, LL c) { for (int i = x; i <= n; i += lowbit(i)) t1[i] += c, t2[i] += x * c; } LL s...
ALGO
0.99999
4.204799
7cfea1e3-696d-4392-86a0-f41dbe4f7b2e
glykov/cpp-backend
sprint1/problems/sum/solution/main.cpp
#include <iostream> int main() { int x, y; std::cin >> x >> y; std::cout << x + y << std::endl; }
ALGO
0.921549
4.473537
689f3766-31a1-40c8-8c9b-719fce3dc49d
Pritanjan/LeetCode-2.0
Max Sum without Adjacents - GFG/max-sum-without-adjacents.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ // class Solution{ // public: // // calculate the maximum sum with out adjacent // int findMaxSum(int *arr, int n) { // // code here // } // }; class Solution { public: int findMax...
ALGO
0.999892
6.105012
bbdeba65-f2a7-4777-b926-5e8a88b7d753
yasir18/ncrwork
CPP_Assignments/Assignment1/p3-complex.cpp
#include<iostream> using namespace std; class Complex{ int real,img; public: Complex(){ real=img=0; } Complex(int x){ real=img=x; } Complex(int x,int y){ real=x;img=y; } void add(Complex &c1,Complex &c2){ real=c1.real+c2.real; img=c1.img+c2.img; } friend Complex multiply(Complex &,C...
ALGO
0.951026
4.470375
fd4c9c09-360b-43a3-871c-1d4089043713
AprajitKatiyar/APS-Code-Library
E [Sleeping Schedule].cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define mod 1000000007 int n,h,l,r; vector<int>v; int dp[2005][2005]; int solve(int pos,int curr){ //base curr%=h; if(pos==n) return 0; if(dp[pos][curr]!=...
ALGO
0.999917
3.137783
70027211-340b-4a51-a4cf-fb7739c0734a
sparsh2002/Placement-Course-cpp
codeforces/RANDOM_PROBLEMS/1400/14_Dominant_Character.cpp
// author: sparsh #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> v...
ALGO
0.999446
4.574408
a8c27e0b-472c-41bd-86e2-8e1c7e984575
sagar1024/mycppjourney
CP/Codeforces/1. Codeforces contest/61. Prefiquence.cpp
// B. Prefiquence // time limit per test2 seconds // memory limit per test256 megabytes // inputstandard input // outputstandard output // You are given two binary strings a and b. A binary string is a string consisting of the characters '0' and '1'. Your task is to determine the maximum possible number k such that a...
ALGO
0.999901
5.677021
04cf12b3-7f09-4444-9cb7-c2214f84b573
JuanDavidX/Ejercicios-de-C--
Ejercicio 49/Ejercicio 49/src/main.cpp
#include <Arduino.h> char cadena[50]; int a = 0, e = 0, i = 0, o = 0, u = 0; int contador = 0; void setup() { Serial.begin(9600); Serial.println("Ingrese una oración (Max. 50 caracteres): "); } void loop() { if (Serial.available() > 0) { contador = 0; a = e = i = o = u = 0; Serial.readBytesUntil('\...
TOOL
0.866877
4.065412
8fc6a1fc-3033-4d2c-86b8-5a1075bbf97d
Zahid-Abbas-Ali-Baig/quiz_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.9988
6.76073
18e80ae8-8b68-4014-966e-b024f80c5b4e
zuse1425/DSA-Assignment
LAB 6/QueueUse.cpp
#include <iostream> #include "QueueUsingArrays.cpp" // Include the definition of QueueUsingArrays using namespace std; int main() { int choice, size; cout << "Enter the size of the queue: "; cin >> size; QueueUsingArrays<int> queue(size); // Creating a queue object of integer type do { c...
ALGO
0.97478
6.057035
ee2120dc-a67c-4a70-8ebe-2f922d2307f3
DimitarBakardzhiev/NBU-Classwork-and-Homework
Programming C++/Problem 01 - Find number - recursion/main.cpp
#include <iostream> using namespace std; bool isValidNumber(unsigned number, int sum, int difference) { unsigned rightDigit = number % 10; unsigned leftDigit = (number / 10) % 10; unsigned reversedNumber = rightDigit * 10 + leftDigit; bool sumCondition = rightDigit + leftDigit == sum; bool diffe...
ALGO
0.999477
5.516689
34dd73e3-ae83-4940-b462-d852c8907348
solareenlo/atcoder
05_AtCoder-Beginner-Contest/abc005/B/main.cpp
#include <iostream> #include <set> #define REP(i, n) for (int i = 0; i < (n); i++) using namespace std; // 出力 void print() { std::cout << '\n'; } template <class T>void print(const T &x) {std::cout << x <<'\n';} template <class T, class... Args>void print(const T &x, const Args &... args) {std::cout << x << " ";print(...
ALGO
0.999598
3.624306
12fff128-b608-44e2-b35c-4e9435d2ea60
ishandutta2007/codeforces
l0tus/normal/1250/N.cpp
#include <bits/stdc++.h> #define va firsst #define vb second using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<int,pii> pip; const int INF = 1e9; const int MN = 1e5+5; int N,M,A[MN],B[MN],I[MN],num[MN],par[MN],dis[1000][1000],ans; vector<int> T[MN]; int fnd(int x) { return par[x]==...
ALGO
0.99993
3.946565
7c6576a9-7305-46d9-96d7-00177e6ab373
sheiwangwo/stca_weekly_code
Week32/938.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { int ans; int LL, RR; public: void sum(TreeNode* root){ if(root){ sum(root->...
ALGO
0.999991
6.691153
4ad4f44d-e192-461d-b87a-d316aefff7c0
shivang16/software-interview-preparation
dsa/arrays/powXN.cpp
class Solution { public: double myPow(double x, int n) { double ans = 1.0; long long nn = n; if (nn < 0) nn = -1 * nn; while (nn) { if (nn % 2) { ans = ans * x; nn = nn - 1; } else { x = x * x; nn = nn / 2; } } if (n < 0) ans = (double)(1.0) / (double)(ans); r...
ALGO
0.999844
6.08574
f9f25c97-f436-4163-813c-f63a90a2bec2
Shrutigupta03/Leetcode-questions
2126-destroying-asteroids/2126-destroying-asteroids.cpp
class Solution { public: bool asteroidsDestroyed(int mass, vector<int>& asteroids) { long long x = mass; sort(asteroids.begin(), asteroids.end()); int n = asteroids.size(); for (int i=0;i<n;i++) { if (asteroids[i]<=x) x+=asteroids[i]; e...
ALGO
0.99985
5.834552
153de464-fde3-491d-9783-e0512ad7ed90
Armando-Lara/catalogo_peliculas
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.998776
6.763923
b44f81dc-48e3-4234-aa4e-27542dad6308
hhiep00/CTDL
gapdoidayso.cpp
#include<iostream> #include<cmath> using namespace std; int re(int n,long long k){ if(k%2==1) return 1; if(k%4==2) return 2; long long x=pow(2,n-1); if(k==x) return n; if(k>x) return re(n-1,x*2-k); return re(n-1,k); } int main(){ cin.tie(0); ios_base::sync_with_stdio(false); int t; cin>>t; while(t--){ int n;...
ALGO
0.999827
4.540499
1c6c6678-dfbf-46cd-ac67-c3f4a40212dc
xixu-me/Some-Cpp-Files
Miscellaneous/nowcoder_beginner_Monthly_competition_60_C.cpp
// 你通过观察发现他房间内有 n 个可用于制成绳子的物品,第 i 个的长度为 ai。当你使用第 i 个物品制作绳子时,其右侧的 k 个物品(不含第i个物品)就无法再被用于制作绳子 。最终,小竹用选择的物品制成绳子,绳子的长度是所选择物品的长度之和。小竹想知道,他能制作的绳子长度最长为多少? #include <bits/stdc++.h> using namespace std; int max(int a, int b) { return a > b ? a : b; } int main(int argc, char **argv) { int n, k; scanf("%d %d", &n, &k); int...
ALGO
0.999977
3.476203
293f1254-7da2-43c6-ab1d-5b41ea196adc
SeacenLiu/ACM
1045/main.cpp
/** Problem Fire Net Problem Description: Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall. A blockhouse is a small castle that has four openings through which to shoot. The four openings are fac...
ALGO
0.999797
5.022692
1d07463e-d595-4c09-883b-7fece48a0e6d
logicallaw/lecture_data_structure
Day13/P1_E.cpp
#include <iostream> #include <string> #include <vector> using namespace std; class Vertex{ public: int ele; }; class Edge{ public: string str; }; class Graph{ private: Edge*** matrix; vector<Vertex*> v; int N = 2001; int n = 0; int m = 0; public: Graph() { matrix = new Edge**[N];...
ALGO
0.999553
3.999077
408269ab-75a9-4df8-b7c3-77ef115bebcc
chahk0129/Blink-hash
index/blink-hash-str/lib/hash.cpp
#include "hash.h" namespace BLINK_HASH{ inline size_t standard(const void* _ptr, size_t _len, size_t _seed){ return std::_Hash_bytes(_ptr, _len, _seed); } // JENKINS HASH FUNCTION inline size_t jenkins(const void* _ptr, size_t _len, size_t _seed){ size_t i = 0; size_t hash = 0; const char* key = stati...
ALGO
0.97192
6.19043
ad446ee1-d206-498a-9525-4ef95b134385
mt8695/android_frameworks_av
media/libeffects/lvm/lib/Common/src/BQ_1I_D16F32C14_TRC_WRA_01.cpp
#include "BIQUAD.h" #include "BQ_1I_D16F32Css_TRC_WRA_01_Private.h" #include "LVM_Macros.h" /************************************************************************** ASSUMPTIONS: COEFS- pBiquadState->coefs[0] is A2, pBiquadState->coefs[1] is A1 pBiquadState->coefs[2] is A0, pBiquadState->coefs[3] is -B2 pBiquad...
ALGO
0.982272
4.334455
8d7b08ab-60ce-44a4-9336-bc35edf4e159
dukee27/cpp-repo
codeforces/1972B.cpp
#include <iostream> using namespace std; int main(){ int n {}; cin >> n; for(int i {}; i < n ; i++){ int m {}; string s; cin >> m; cin >> s; int countD {}; int countU {}; for(int j { } ; j < m ; j++){ if(s[j] == 'U'){ cou...
ALGO
0.999786
5.184872
80bc3668-4692-4460-a02f-eaca0ddf5ab4
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_6912_14.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, char** argv) { int N; cin >> N; string A; cin >> A; int count = 0; for (int i = 0; i < ((int)(A).size()); i += N) { if (i >= 3) { if (A[i - 1] == A[i - 2] && A[i - 2] == A[i - 1]) count++; } } cout << count << endl; return ...
ALGO
0.999952
4.43387
c91b8193-00a5-4291-954f-0dbaaf9b7579
ishandutta2007/codeforces
hollwoq_pelw/normal/1555/E.cpp
/* // is short or still long ??? hollwo_pelw's template(short) // Note : -Dhollwo_pelw_local */ #include<bits/stdc++.h> using namespace std; void FAST_IO(string filein = "", string fileout = "", string fileerr = ""){ if (fopen(filein.c_str(), "r")){ freopen(filein.c_str(), "r", stdin); freopen(fileout.c_str(), "...
ALGO
0.999847
4.441604
91f21632-a262-417d-a8b0-f3c93bf8abd8
AnimezKishan/Data-Structures-and-Algorithm-Preparation
LeetCode/Recursion/[C++] 37. Sudoku Solver.cpp
class Solution { public: bool isSafe(int row, int col, vector<vector<char>> &board, char val) { for(int i = 0;i<9;i++) { if(board[row][i] == val) return false; if(board[i][col] == val) return false; if(...
ALGO
0.999857
6.823885
feee9295-34f3-46a5-bd29-1e281c27512d
muratyildirim2/Algorithm-Problems
Algorithm Problems-1/Minimizing Coins.cpp
/* Author : Murat Yıldırım */ #include<bits/stdc++.h> using namespace std; typedef long long ll; void solve() { ll n, x; cin >> n >> x; vector<ll>coins(n); vector<ll>dp(x + 1); for (ll i = 0; i < n; i++) { cin >> coins[i]; } for (ll i = 0; i <= x; i++) { dp[i] = ...
ALGO
0.999978
4.502477
f2adcb25-f0a5-41e7-a2aa-6cd095702e20
Xu-Jack11/ACM-Learning
Nowcoder/2024/牛客小白月赛99/迷宫.cpp
#include <bits/stdc++.h> using namespace std; int mp[1005][1005]; void solve() { int n, m; cin >> n >> m; int x1, y1, x2, y2; for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { char x; cin >> x; if (x == '#') mp[i][j] = 0...
ALGO
0.999948
3.81196
0fb52248-8aa3-425b-894a-081245c4a083
Saed-Hamdy/Compiler
classes/DFA.cpp
// // Created by default on 19/03/18. // #include <queue> #include <iostream> #include <algorithm> #include "../headers/DFA.h" const string e ="\\L"; Node fi(""); vector<string> trans_symb; vector<Node> nfaGraph; vector<Node> nfa_without_e; vector<Node> remove_e_clousre(vector<Node> graph); void display_graph(vector...
ALGO
0.999765
3.699971
cc14f4e2-84b8-4854-9021-588b62bec9ef
mutiaraagust/tugas-praktik-sabtu
MODUL 2/02. VOLUME BOLA[1].cpp
#include<stdio.h> #include<math.h> int main() { float a,b,c; printf ("MENCARI SISI MIRING SEGITIGA \n"); printf("Sisi depan sudut = "); scanf("%f",&a); printf("Sisi dekat sudut = "); scanf("%f",&b); c= a*a+b*b; printf("jadi sisi miring segi tiga adalah %2.f",sqrt(c)); }
ALGO
0.999666
3.659484
2740612a-ebe7-4929-98f8-ac1c01d55f7b
SergeyUsachev021/labaeba7
boost/libs/geometry/doc/src/examples/algorithms/covered_by.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example //[covered_by //` Checks if the first geometry is inside or on border the second geometry #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp> na...
ALGO
0.995423
7.345932
0d093ed3-bc68-4af6-9eb2-9c6043815c36
KSMgotov/C
task5-2-J.cpp
/* Недавно один известный художник-абстракционист произвел на свет новый шедевр — картину «Два черных непересекающихся прямоугольника». Картина представляет собой прямоугольник m× n, разбитый на квадраты 1× 1, некоторые из которых закрашены любимым цветом автора — черным. Федя — не любитель абстрактных картин, однако е...
ALGO
0.999903
3.943137
fb5019a4-277e-4560-99b7-25cf83f6033f
nagratan1/services
figma_new_project/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.99882
6.763549
0aeb18fb-e323-4ac7-aa1f-38fd42ec9490
jayram10125/LEVEL-BOOSTER-C-
LOOPS/productTillN.cpp
//product till n numbers #include<iostream> using namespace std; int main() { int n,prdt=1; cout<<"enter a number : "; cin>>n; for(int i=1;i<=n;i++) { prdt=prdt*i; } cout<<"sum till "<<n<<" is : "<<prdt; }
ALGO
0.999852
4.006505
bcadbda7-67c8-4e66-913f-b8d55223075f
manikanta2901/ubuntu
.history/practice/cpp/codeforces/StringLcm_20210115134147.cpp
#include <bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<queue> using namespace std; #define trav(dataType,DataStruct,name) for(dataType<DataStruct>::itt ip = name.bb(); ip != name.ee(); ip++) //Pre processors & typedefs ...
ALGO
0.999931
4.386657
96d3dcb8-d106-4c33-a2ef-16c7c6710ac2
swENGsh/codetree-TILs
240205/좌우로 반복하며 출력/print-in-left-right-reverse.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. int n; cin >> n; for (int i=0; i<n; i++){ for (int j=1; j<=n; j++){ if (i%2==0){ cout << j; } else{ cout << n-j+1; } } cout << ...
ALGO
0.999972
3.979707
9cb4502c-df1b-4ef0-93df-886ce2b05131
adityaraj079/CodeChef-solution
Smakdown/Contest/TESTSERIES.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int draw=0, ones=0, twos=0; vector <int> v; for (int i=0; i<5; i++) { int temp; cin>>temp; v.push_back(temp); if (temp == 0) draw++; ...
ALGO
0.999643
5.130007
336c30b4-9bb1-48df-98c0-223c1c68ae36
denis-gubar/Leetcode
Math/0878. Nth Magical Number.cpp
class Solution { public: template<typename T> T gcd(T a, T b) { while (a && b) if (a > b) a %= b; else b %= a; return a + b; } template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } static const long long MOD = 1000000007; int nthMagicalNumber(int N, int A, int ...
ALGO
0.999947
5.441535
9c2ea1bb-b205-435f-b962-00de2c4a7d03
AdvTrainEvalSrcDomain/adv-train-evaluation-source-code-domain
code-imitator/data/dataset_2017/dataset_2017_8/vector310/5304486_5760761888505856_vector310.cpp
#include<iostream> #include<cstdio> #include<cstring> #define rep(i, l, r) for(int i = l; i <= r; ++i) using namespace std; char s[30][30]; int n, m; void work(int x){ rep(j, 1, m){ if(s[x][j] != '?'){ for(int k = j - 1; k >= 1 && s[x][k] == '?'; --k) s[x][k] = s[x][j]; for(int k = j + 1; k <= m && s[x...
ALGO
0.999978
3.31199
7cd4c9bf-0092-4719-951e-4094d04d617e
Karthikrajatp/flutter-learn
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
cec0f2c8-c082-4117-afac-2e671c5d048d
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5078_59.cpp
#include <bits/stdc++.h> using namespace std; int main() { double a, b; cin >> a >> b; cout << (long long)(a * b) << endl; }
ALGO
0.997448
4.152241
b76b0590-7527-4458-a7ec-dcec639254eb
masia-pasia/ardupilot
libraries/AP_Math/location.cpp
/* * this module deals with calculations involving struct Location */ #include <stdlib.h> #include "AP_Math.h" #include "location.h" // return bearing in centi-degrees between two positions float get_bearing_cd(const Vector2f &origin, const Vector2f &destination) { float bearing = atan2f(destination.y-origin.y,...
TOOL
0.942832
5.918534
a2cca033-5ff5-441e-8f41-8d1f68e76b1e
Nickeron-dev/Basics-Of-CPP
boost/language_extensions/foreach.cpp
#include <boost/foreach.hpp> #include <array> #include <iostream> int main() { std::array<int, 4> a{{0, 1, 2, 3}}; BOOST_FOREACH(int &i, a) i *= i; BOOST_REVERSE_FOREACH(int i, a) { std::cout << i << '\n'; } }
ALGO
0.969919
3.835896
09f9681d-c6ae-4f9d-acb8-5582fdbb8b3d
HONGDAMIN/C-Programming
Part01/Chapter1/01_3DefaultValue/DefaultValue/DefaultValue 2/DefaultValue 2/DefaultValue 2.cpp
#include <iostream> int Adder(int num1 = 1, int num2 = 2); // , Ű κп ġ. int main(void) { std::cout << Adder() << std::endl; // Ű 1, 2 . std::cout << Adder(5) << std::endl; // Ű 5Ѱ 5, 2 . std::cout << Adder(3,5) << std::endl; // Ű 2 , 3,5 return 0; } int Adder(int num1, int num2) // { return num1 + num...
TOOL
0.952732
5.212471
0d8ea156-bb46-454f-b79c-6bc7fcc278a8
JosephJostar0/pat
乙级cpp/1080MOOC最终成绩.cpp
#include<algorithm> #include<iostream> #include<cstring> #include<string> #include<vector> #include<map> using namespace std; map<string,int> Gp, Gm, Gf, G; bool cmp(string a,string b){ if(G[a] == G[b]) return a < b; return G[a] > G[b]; } int main(){ int P, M, N; vector<string> pass; string...
ALGO
0.996821
3.18595