uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
336e9972-c494-4a29-b344-63c1dbb9bd5c
Nih1tGupta/Leetcode-GFG
Difficulty: Hard/Stock Buy and Sell – Max 2 Transactions Allowed/stock-buy-and-sell-max-2-transactions-allowed.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int f(int i,int b,int c,vector<int>&p,vector<vector<vector<int>>>&dp){ // base if(i==p.size()||c==0){return 0;} // but and not buy if(dp[i][b][c]!=-1)return dp[i][b][...
ALGO
0.997734
6.118059
38cae35e-d17b-494e-b7d6-026fdae45025
raincross7/code-similarity
codes/train_code/problem338/problem338_207.cpp
//lamia 2k19 #include<bits/stdc++.h> #include<math.h> using namespace std; #define ll long long int #define T long long int t;scanf("%lld",&t);while(t--) #define CS cout<<"Case "<<cs++<<": " #define nd endl #define dd double #define ss string #define Y co...
ALGO
0.999813
3.124675
5a2b7919-7961-485c-ae11-154a2220815a
ghsoftco/scenegallery
Engine/Simple Mesh/BaseMeshVertexModifiers.cpp
/* BaseMeshVertexModifiers.cpp Written by Matthew Fisher BaseMesh is an abstract mesh class that defines basic mesh functionality. It also includes source for most of the manipulation (shape generation, file loading, etc.) that is possible under this generic structure. Each mesh must be associated with a graphics dev...
TOOL
0.853285
7.702603
799f7a79-ec9e-4d23-84f6-5ce35acba4d8
MeryemEceAYYILDIZ/Basic_Problems_and_Solutions_With_C
Programlamaya_Giris_I/2.Sayfa/9.Soru_Girilen_4_sayinin_Ortalamasina_Gore_Hangisinin_Ortalamadan_Buyuk_Kucuk_Esit_Oldugunu_Bulma.cpp
#include<stdio.h> //Klavyeden girilen 4 saydan hangi saylarn ortalamadan byk/eit/kk olduunu bulan program yaznz. //rnek: 10, 5, 3, 12 Ort: 7.5 => Ortalamadan byk olanlar:10,12 Ortalamadan kk olanlar: 3, 5 olarak yazacaktr. int main() { int dizi[4], oBS=0, oKS=0, oES=0, i; // oBS=ortalamadan byk says, oKS=ortalamadan...
ALGO
0.999815
3.142612
a394e31e-bdd6-4793-b6e6-64a673581f65
weiyu666/GAMES202homework
Assignment2/prt/ext/tbb/examples/task_arena/fractal/fractal.cpp
#include "fractal.h" #include "tbb/parallel_for.h" #include "tbb/blocked_range2d.h" #include "tbb/task_scheduler_init.h" #include "tbb/task_arena.h" #include "tbb/task_group.h" #include "tbb/tick_count.h" #include <math.h> #include <stdio.h> // Included for __TBB_CPP11_LAMBDAS_PRESENT definition #include "tbb/tbb_co...
ALGO
0.987373
5.62159
5f2be5cf-1dde-471a-a2d7-b6f15d5aabad
Papun-Tripathy/MCA-CPP
Question12.cpp
/* Write a C++ program to find largest and smallest of three numbers using class template. */ #include<iostream> using namespace std; template <class T> class Calculate{ T a,b,c; public: Calculate(T a1,T b2,T c3){ a=a1; b=b2; c=c3; } T findLargest(){ if(a>b && a>c...
ALGO
0.999338
4.543575
84b113ff-f202-4615-af73-1bf00fe11c6d
tsuchi0410/AtCoder
library_C++/グラフ/DFS/DFS(連結成分の個数).cpp
// https://algo-method.com/tasks/956 int main(){ LL(N, M); vvl G(N); rep(i, M){ LL(v, u); v--; u--; G[v].push_back(u); G[u].push_back(v); } vector<bool> seen(N, false); lambda dfs = [&](auto&& dfs, ll v) -> void { seen[v] = true; fore(nv, G[v]){ if(seen[nv] == true){ ...
ALGO
0.997825
5.09724
56f338bd-a3b9-45da-9b12-5570442a7b81
gabaid971/fingerprint-analyzer
src/orientation_map.cpp
/*! * \file orientation_map.cpp * \brief Tools to get the orientation map of a fingerprint image * \author Daniel Gabaï */ #include "orientation_map.hpp" #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <iostream> #include <cmath> ...
ALGO
0.999187
5.633411
66ea6abe-2204-46d6-bb39-7a10494b42f2
BlackOutDevelops/OpticalFlow
OpenCV/opencv/sources/modules/legacy/src/extendededges.cpp
#include "precomp.hpp" #if 0 //#ifdef WIN32 /* make sure it builds under Linux whenever it is included into Makefile.am or not. */ //void icvCutContour( CvSeq* current, IplImage* image ); CvSeq* icvCutContourRaster( CvSeq* current, CvMemStorage* storage, IplImage* image ); //create lists of segments of all contours ...
ALGO
0.991297
3.704611
05bd30a7-b201-4395-b2ee-9b387e2a0091
PorUna-byte/bustub
src/execution/hash_join_executor.cpp
#include "execution/executors/hash_join_executor.h" #include "execution/expressions/abstract_expression.h" namespace bustub { HashJoinExecutor::HashJoinExecutor(ExecutorContext *exec_ctx, const HashJoinPlanNode *plan, std::unique_ptr<AbstractExecutor> &&left_child, ...
ALGO
0.976564
4.379278
baa76ebd-baa7-4f68-8ef1-cfbb03f5f239
StabCrab/SchoolLabs
SysSch/SysSch.cpp
// // Created by trykr on 12.03.2019. // #include <algorithm> #include <iostream> #include <cmath> using namespace std; string sum(string a, int SS) { std::reverse(a.begin(), a.end()); int n = 0; a[n] += 1; while (a[n] == 97 + SS) { a[n] = 'a'; a[n+1] += 1; n++; } std...
ALGO
0.998868
3.309213
00890d4b-e5fa-49f0-96c0-3f2e864d196c
Edith-vis/Algorithm-Notes
第3章 入门篇(1)--入门模拟/3.6 字符串处理/A1001A+BFormat.cpp
#include <iostream> using namespace std; int main() { freopen("D:/in.txt", "r", stdin); long long a, b; scanf("%lld %lld", &a, &b); long long ans = a+b; string s = to_string(ans); int len = s.length(); for (int i = 0; i < len; i++) { printf("%c", s[i]); if (s[i] == '-') { ...
ALGO
0.999704
4.156216
d3c20f27-3434-4963-a6e7-54cf6603c6cc
Peacefull-beast/PeaceCode1
0003-longest-substring-without-repeating-characters/0003-longest-substring-without-repeating-characters.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { int i = 0; int j = 0; int ans = 0; unordered_map<char, int> freq; int len = 0; while (j < s.length()) { freq[s[j]]++; while (freq[s[j]] > 1) ...
ALGO
0.99996
6.293495
b7bb6805-2279-4b6e-b2c3-30e14eae9501
amanraut46/Data-Structure
Tree/LinkListTravesal.cpp
#include<iostream> using namespace std; class Node { public: int data; Node* next; public:Node(int item) { data = item; } }; void printList(Node* top){ while (top!=NULL) { cout << top->data << " "; top = top->next; } } int main() { Node* n1 = new Node(1); ...
ALGO
0.991948
3.604362
ec821a87-c14e-4db0-a8de-0d8b53d97f0b
PutinCoinPUT/putincoinsource
boost_1_58_0/libs/numeric/ublas/benchmarks/bench2/bench23.cpp
#include "bench2.hpp" template<class T, int N> struct bench_c_matrix_prod { typedef T value_type; void operator () (int runs) const { try { static typename c_matrix_traits<T, N, N>::type m1, m2, m3; initialize_c_matrix<T, N, N> () (m1); initialize_c_matrix<T, N, N> ...
TOOL
0.988578
5.227831
55933308-88d5-45b3-aa48-1a9d5ccc4dae
basecode-lang/basecode
share/prototypes/bootstrap-redux/ext/boost-1.70.0/libs/mpi/example/in_place_global_min.cpp
// An example using Boost.MPI's all_reduce() that compute the minimum // of each process's value and broadcast the result to all the processes. #include <boost/mpi.hpp> #include <iostream> #include <cstdlib> namespace mpi = boost::mpi; int main(int argc, char* argv[]) { mpi::environment env(argc, argv); mpi::commu...
ALGO
0.999637
4.314044
e0ab69df-4abc-4453-ab42-56121ded0c4f
funcdfs/Algorithm
2024/PAT_计数.cpp
// link: https://www.acwing.com/problem/content/description/1585/ PAT 计数 // time: 2024/6/30 14:31:30 https://github.com/funcdfs #pragma region github_funcdfs // clang-format off #include <bits/stdc++.h> using namespace std; using int32 = int32_t; using int64 = long long; using int128 = __int128; us...
ALGO
0.999558
5.479156
d9d63e32-0f13-4822-b3ab-623cd58c074f
farmJun/codetree
250429/K번 최댓값으로 이동하기/move-to-max-k-times.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; int n, k; int grid[100][100]; int r, c; int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, 1, -1}; bool visited[100][100]; queue<pair<int, int>> q; bool isIn(int y, int x){ return y >= 0 && y < n && x >= 0 && x < n; } int bfs(int start){ ...
ALGO
0.99989
4.01049
e52b6704-3dad-4098-9030-b2f651728e5a
odejinmi/bigbluebuttonsdk
example/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.998787
6.76775
d8b04241-27d7-4891-ae54-2fe0765a8d3c
akshayrajp/Competitive-Programming
Codeforces/246B.IncreaseAndDecrease.cpp
#include <iostream> using namespace std; int main() { int n, sum = 0, i; cin >> n; int arr[n]; for (i = 0; i < n; i++) { cin >> arr[i]; sum += arr[i]; } if (sum % n == 0) cout << n; else cout << n - 1; }
ALGO
0.999867
3.491421
92068a90-0daa-4882-bfeb-b54e92d964d2
parentoni/CP
cfcontests/940/a.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array #define all(x) (x).begin(), (x).end() // functions void setIO(string s) {freopen((s + ".in").c_str(), "r", stdin);freopen((s + ".out").c_str(), "w", stdout);} void yes() { cout<<"YES\n"; } void no() { cout<<"NO\n"; } // values const ...
ALGO
0.999825
4.387602
a4f2c62c-71f1-423f-bd39-c5f77d16e6cb
balabit-deps/balabit-os-9-llvm-toolchain-12
libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
// <random> // template<class IntType = int> // class negative_binomial_distribution // template<class _URNG> result_type operator()(_URNG& g); #include <random> #include <numeric> #include <vector> #include <cassert> #include "test_macros.h" template <class T> inline T sqr(T x) { return x * x; } void test1()...
TEST
0.897507
6.214032
8a918a1a-0861-4398-8f37-af119971f1a8
congduca/Lap-trinh-huong-doi-tuong
xaydunglopphanso.cpp
#include<bits/stdc++.h> using namespace std; class phanso{ private: int tuso; int mauso; public: phanso(){ tuso = 0; mauso = 1; } phanso(int tu, int mau){ this->tuso = tu; this->mauso = mau; } void nhap(){ cout << "Nhap tu so: "; cin >> tuso; cout << "Nhap mau so: "; cin >> mauso...
ALGO
0.998065
3.972143
fda11cc6-c626-428e-b624-43514d88eb2a
everwind/nlpnet
nlpnet/eigen/doc/examples/Tutorial_ArrayClass_accessors.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXXf m(2,2); // assign some values coefficient by coefficient m(0,0) = 1.0; m(0,1) = 2.0; m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0); // print values to standard output cout << m << endl << endl; ...
ALGO
0.957594
3.536336
86c8535b-d4cd-467b-8a15-739f525f0c39
yangh9596/Algo-Leetcode
Leetcode/101_Symmetric tree.cpp
#include <iostream> /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ // BFS class Solution { public: bool isSymmetric(TreeNode *root) { TreeNode *left, *right;...
ALGO
0.999991
6.759562
df224073-227c-4be6-b516-94fd261c7589
bogdanbbm/Tema1PA
prinel.cpp
#include "iostream" #include "bits/stdc++.h" using namespace std; struct Object { int weight; int price; Object(int _weight, int _price) : weight(_weight) , price(_price) { } }; class Task{ public: int N, K; vector<int> target; vector<int> p; vector<int> operations; ...
ALGO
0.999664
3.639587
19486ffb-6ffa-481a-948b-b128bd098803
bzztbomb/win32libs-lightspark
llvm/lib/CompilerDriver/Tool.cpp
#include "llvm/CompilerDriver/BuiltinOptions.h" #include "llvm/CompilerDriver/Tool.h" #include "llvm/ADT/StringExtras.h" #include "llvm/System/Path.h" #include <algorithm> using namespace llvm; using namespace llvmc; namespace { sys::Path MakeTempFile(const sys::Path& TempDir, const std::string& BaseName, ...
TOOL
0.91986
6.758425
b0f0a924-5011-433a-93a0-72ef76647ffb
giannic/melt
OgreMath/OgreQuaternion.cpp
// NOTE THAT THIS FILE IS BASED ON MATERIAL FROM: #include "OgreCommon.h" #include "OgreQuaternion.h" #include "OgreMatrix3.h" #include "OgreVector3.h" namespace Ogre { const float Quaternion::ms_fEpsilon = 1e-03f; const Quaternion Quaternion::ZERO(0.0f,0.0f,0.0f,0.0f); const Quaternion Quaternion::IDENT...
ALGO
0.946958
7.652094
8b8857bb-d372-4f04-b871-4c0021017ab0
qreal/qreal
plugins/robots/thirdparty/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp
#include <Box2D/Dynamics/Joints/b2PrismaticJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Linear constraint (point-to-line) // d = p2 - p1 = x2 + r2 - x1 - r1 // C = dot(perp, d) // Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1)) // = -dot...
ALGO
0.995817
7.704068
a531866e-2344-4b32-a7e8-4326124f3dd5
packyan/CppPrimer
Chapter.03/ex3_4b.cpp
#include <iostream> #include <string> using std::cin; using std::cout; using std::endl; using std::string; int main(int argc, char const *argv[]) { string str1, str2; cin >> str1 >> str2; string::size_type str1_len = str1.size(), str2_len = str2.size(); if(str1_len == str2_len) cout << "str1 and str2 have the same...
ALGO
0.999154
3.25397
076f40e0-8cf8-4f61-acf8-3387bccfbf99
Linquas/Sandbox
Leetcode/116.cpp
/* // Definition for a Node. class Node { public: int val; Node* left; Node* right; Node* next; Node() : val(0), left(NULL), right(NULL), next(NULL) {} Node(int _val) : val(_val), left(NULL), right(NULL), next(NULL) {} Node(int _val, Node* _left, Node* _right, Node* _next) : val(_...
ALGO
0.999929
6.037929
3748700e-5309-410a-98dd-9f0eb67b7f6f
ishandutta2007/codeforces
nok0/normal/1538/B.cpp
/** * author: nok0 * created: 2021.06.10 23:39:10 **/ #ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif #pragma region Macros // rep macro #define foa(v, a) for(auto &v : a) #define REPname...
ALGO
0.999729
5.100318
c6c95569-f114-43c5-a0a2-6dfae8a34e33
sarcilav/Manual
manual_andmej/src/geometria/is_inside_concave_polygon.cpp
//Point //Choose one of these two: struct P { double x, y; P(){}; P(double q, double w) : x(q), y(w){} }; struct P { int x, y; P(){}; P(int q, int w) : x(q), y(w){} }; // Polar angle // Returns an angle in the range [0, 2*Pi) of a given Cartesian point. // If the point is (0,0), -1.0 is returned. // REQUIRES: // i...
ALGO
0.986947
5.310436
68fffb06-73ac-4350-a8ac-c02131feb5e9
vidsinghal/Cornucopia
HashEnabledLLVM/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp
#include "FuzzerDefs.h" #include "FuzzerMutate.h" #include "FuzzerRandom.h" #include <cstring> namespace fuzzer { // Cross Data1 and Data2, store the result (up to MaxOutSize bytes) in Out. size_t MutationDispatcher::CrossOver(const uint8_t *Data1, size_t Size1, const uint8_t *Dat...
ALGO
0.969791
6.076106
4da2e56a-3dfe-4a7a-b2d7-cdb0735ffc15
pole95/AdventOfCode
2021/day12/main.cpp
#include <iostream> #include <fstream> #include <chrono> #include <vector> #include <algorithm> #include <set> #include <map> using namespace std; using namespace std::chrono; struct Node { enum TYPE {START, END, BIG, SMALL}; TYPE type; vector<Node *> neighbours; Node(string name){ if(name == "start") type = ST...
ALGO
0.998472
4.518956
2265e601-6ab6-4a6c-9038-6d511c667fdc
ilia-abbasi/Cpp-projects
projects/Calculator-v 1.x.x/Calculator 1.2.1 ( Ilia Abbasi )/Codes/Calculator.cpp
#include <iostream> #include <conio.h> using namespace std; main(){ float a,b; char ch; cin>>a>>ch>>b; cout<<"______"<<endl; switch(ch){ case '+': cout<< a + b;break; case '-': cout<< a - b;break; case '*': cout<< a * b;break; case '/': cout<< a / b;break; default : cout<<"(ERROR) PLEASE READ T...
ALGO
0.936505
3.056447
c0e89044-bf7b-458b-a03d-ced55a47285c
NotTheAmmar/Arithmetic-Expression-Evaluator
main.cpp
#include <iostream> #include <wx/wx.h> # define MAX_SIZE 100 using namespace std; bool isOperator(char); int _count(wxString, char); int _toDigit(char); bool isInvalid(wxString); wxString toPostfix(wxString); double evalPostfix(wxString); template <typename T> class Stack { private: int top = -1; public: T elemen...
ALGO
0.974074
5.981433
029a9559-3a26-4ab4-9b82-31a6496a4a25
Mohammadkaif7865/C-tut
p18.cpp
#include<iostream> using namespace std; long long int fact(long long int a) { if (a>=1) { return a * fact(a-1); } else return 1; } int main(){ long long int c; cout<<"Enter the value : "; cin>>c; cout<<"Factorail of the number is "<<c<<" : "<<fact(c)<<endl; return 0; }
ALGO
0.999731
3.696524
efc9be36-b2bc-43dc-9366-12b2fcb5ebbe
4molybdenum2/DSA
Shashwat/Dynamic Programming/0-1-KnapsackProblem/4) minimumSubsetSumDifference.cpp
// https://www.geeksforgeeks.org/partition-a-set-into-two-subsets-such-that-the-difference-of-subset-sums-is-minimum/ // Problem Statement arr[] : {1, 2, 7}, To split array into to parts such that absolute(Sum2 - Sum1) = min // Here Output = 4 // This problem is most similar to equal sum partition ques where Sum2 - Sum...
ALGO
0.999771
5.717789
9f4497d6-6946-4eb0-9a03-5a1af961c195
sjtao98/Leetcode_backup_2
148-sort-list/148-sort-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* sortList(Li...
ALGO
0.999998
5.906888
b84648dc-2108-4c7f-8e04-fd7c2f3b0d8e
kkumazaki/Self-Driving-Car_Project6_Kidnapped-Vehicle
src/particle_filter.cpp
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: Tiffany Huang */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> #include "helper_functions.h" using std::string;...
ALGO
0.993604
5.101071
c3f5b767-a5a3-4aac-a304-44e25bbd9db9
garimasingh128/CP-DSA-Cpp-C
Linear DS(CodeChef DSA week2)/COMPILER.cpp
//https://www.codechef.com/LRNDSA02/problems/COMPILER #include <bits/stdc++.h> using namespace std; #define mod 1e9+7 typedef long long ll; int main() { int t; cin >> t; while ( t-- ) { string s; cin >> s; int count = 0; int i,prefix=0; for(i = 0 ; i < s.length() ; i++) { if(s[i]=='>') count--...
ALGO
0.999819
3.400327
a1458069-5453-47e8-8deb-bc13e03c997b
lxylxy123456/algorithms
src/ApproxMinWeightVCMain.cpp
#include "ApproxMinWeightVC.hpp" #include <iostream> #include <vector> #include "Graph.hpp" #include "graph_utils.hpp" #include "utils.hpp" using namespace algorithms; int main(int argc, char *argv[]) { const std::size_t v = get_argv(argc, argv, 1, 10); const std::size_t e = get_argv(argc, argv, 2, 20); const bo...
ALGO
0.984264
4.833436
80b59bc7-d2c4-44e2-b6c2-f0fda170f8f0
openeuler-mirror/openjfx8
modules/web/src/main/native/Source/JavaScriptCore/bytecode/BytecodeBasicBlock.cpp
#include "config.h" #include "BytecodeBasicBlock.h" #include "CodeBlock.h" #include "PreciseJumpTargets.h" #include "UnlinkedCodeBlockGenerator.h" namespace JSC { DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(BytecodeBasicBlock); BytecodeBasicBlock::BytecodeBasicBlock(const InstructionStream::Ref& instruction, unsigned blo...
TOOL
0.88127
7.93126
33622661-a20c-49a4-abc2-7eca22365809
AuTURBO/2023_KMU_Autonomous_team_AuTURBO_rookie
ar_track_alvar/ar_track_alvar/src/medianFilter.cpp
/** * \file * * N-dimensional median filter for marker poses * * \author Scott Niekum */ #include <ar_track_alvar/filter/medianFilter.h> namespace ar_track_alvar { using namespace alvar; MedianFilter::MedianFilter(int n) { median_n = n; median_ind = 0; median_init = false; median_poses = new Pose[media...
ALGO
0.998401
6.477365
cf533cc7-c39a-4b59-9a26-fc14cc8eda6b
Sri-Hasini/leetcode-sync
2581-divide-players-into-teams-of-equal-skill/divide-players-into-teams-of-equal-skill.cpp
class Solution { public: long long dividePlayers(vector<int>& skill) { sort(skill.begin(), skill.end()); int val = skill[0] + skill[skill.size() - 1]; vector <pair<int,int>> v; v.push_back({skill[0], skill[skill.size() - 1]}); int i = 1, j = skill.size() - 2; while (i...
ALGO
0.999955
5.138511
d3cbea3c-8ddc-45bf-813a-d6c75e0e996e
tajshuvoo/TLE_CP_31_SHEET
900/4.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <string> #include <numeric> #include <cmath> using namespace std; #define rtn return 0; #define vctr(n, name) vector<int> name(n); #define vctrll(n, name) vector<long long> name(n); #define vctr_init(n, name,init) vector<int> name(n,ini...
ALGO
0.996161
3.458426
dac4a74e-fa3a-426a-b440-3463ff983b4f
mizanur87/Pattern-Solving
Square_pattern_Binary_solve2.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n ; cout << "Input:"; cin >> n; for (int i=1; i<=n; i++){ for (int j=1; j<=n; j++){ if (i%2==0){ cout << "0" ; } else { cout << "1"; } } ...
ALGO
0.999944
3.550834
409f341a-71b1-4219-a218-c9636395d501
Ravibabuc/NOV_2021
Single_number_return.cpp
#include <iostream> #include<vector> #include <bits/stdc++.h> #include<string> using namespace std; int max_value (int a, int b) { return a>b?a:b; } int min_value (int a, int b) { return a<b?a:b; } void swap(int *a, int *b) { int temp = *a; *a = *b; *b = *a; } int singleNumber(const vector<int> &A...
ALGO
0.999866
4.503972
ae47357d-90f1-44c9-a3f5-046956367bcd
lazy-chess-player/daily_problem
Problem_CodeForces/2024/08/29/Bouncing_Boomerangs.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include <algorithm> #include <array> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #inclu...
ALGO
0.999779
3.445057
b7019db4-0ce2-4063-a3cb-1e2fed18e5f1
olivergafvert/muphasa
mph/main.cpp
#include <algorithm> #include <cassert> #include <cmath> #include <fstream> #include <iostream> #include <numeric> #include <vector> #include <queue> #include <iostream> #include <sstream> #include <unordered_map> #include <set> #include <random> #include <time.h> #include "utils.h" #include "grade.h" #include "column...
ALGO
0.993487
5.30104
b72eb735-2279-4789-87fb-4445086cf1c4
OldKroll/FA
4_Курс/Зайцев/ТПП/sem5/sem5_1.cpp
#include <stdio.h> #include <locale> #include <omp.h> int main() { setlocale(LC_ALL, "Russian"); int n; #pragma omp parallel private(n) { n = 1; #pragma omp master { n = 2; } printf("Первое значение n потока %d: %d\n", omp_get_thread_num(),n); #pragma omp barrier #pragma omp master { n = 3; } pr...
ALGO
0.994831
3.406346
1312ec16-6647-40a7-8307-1e13fe4e286d
Jankoekenpan/storm
src/storm-pars-cli/monotonicity.cpp
#include "storm-pars-cli/monotonicity.h" #include "storm-cli-utilities/model-handling.h" #include "storm-pars-cli/feasibility.h" #include "storm-pars-cli/monotonicity.h" #include "storm-pars-cli/print.h" #include "storm-pars-cli/sampling.h" #include "storm-pars/analysis/MonotonicityHelper.h" #include "storm-pars/api/...
ALGO
0.998696
7.579753
20a663ad-c6e2-41a5-8dd1-ab82b4d48dc9
Harini-Pavithra/Solve-CPP-HackerRank
Vector-erase.cpp
Input Format The first line of the input contains an integer N.The next line contains N space separated integers(1-based index).The third line contains a single intege x,denoting the position of an element that should be removed from the vector.The fourth line contains two integers a and b denoting the range that shou...
ALGO
0.999854
3.778966
ee90c27f-5394-4c46-9c30-7fb432e81502
pks2277/DSA
DSA_Problems/Arrays/maxm_No_Of_point_withCost_1937.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; class Solution { public: long long maxPoints(vector<vector<int>>& points) { long ans = 0; int max, rindex = -1, cindex = -1, rprevIndex = -1, cprevIndex = -1; for (int i = 0; i < points.size(); i++) { ...
ALGO
0.999977
6.008918
6e187faa-8528-4e8d-b994-eeb118e32c71
aryaman0098/codes
cpp/leetcode/974.subarray-sums-divisible-by-k.cpp
/* * @lc app=leetcode id=974 lang=cpp * * [974] Subarray Sums Divisible by K */ // @lc code=start #include<bits/stdc++.h> using namespace std; class Solution { public: int subarraysDivByK(vector<int>& nums, int k) { int n = nums.size(); vector<int> prefixMod(n); int sum = 0; ...
ALGO
0.999941
6.090218
e268ca3a-c2f0-46b5-81b1-c5320401073b
Anil-Turgeman/itertools-cfar-a
Demo.cpp
#include <iostream> #include <vector> #include "range.hpp" #include "accumulate.hpp" #include "filterfalse.hpp" #include "compress.hpp" using namespace itertools; using namespace std; struct lessThan3 { bool operator()(int i) const { return i < 3; } }; int main(int argc, const char * argv[]) { cout << ...
TOOL
0.947017
5.558904
5986e55e-bacf-4a9d-ba74-f2a05580c4c4
MkAngelo/CompetitiveProgramming
Codeforces/Round-975/a.cpp
// Author: Angel Quintana #include <bits/stdc++.h> using namespace std; void solve(){ int n; cin >> n; vector<int> A(n); for(auto &a : A) cin >> a; sort(A.begin(), A.end()); int l = ceil(((float)n)/2); cout << l << " " << A[n-1] + l << endl; } int main(){ ios_base::sync_w...
ALGO
0.999328
3.876514
f96b5738-0977-4dfa-bf3b-3409adfd0bed
ayushasri/cpp-fundamentals
fundamentals/28_loops.cpp
#include <iostream> #include <vector> using namespace std; int main() { char ch[] = {'a', 'b', 'c', 'd', 'e'}; for (int i = 0; i < 5; i++) { cout << "At index " << i << " arr is: " << ch[i] << endl; } // can array can also be char name[] = "Ayush"; cout << name[2] << endl; /** ...
ALGO
0.924176
4.007767
6593bd46-b3fc-40d0-a76d-3e42949278e1
7SongMinJi/codetree-TILs
250106/숫자 2개 출력/print-two-numbers.cpp
#include <iostream> using namespace std; int main() { cout << 3 << " " << 5; return 0; }
ALGO
0.947521
3.521464
3ff69a15-3348-464d-991c-9091bc6ffb8e
Pdiya13/c-
ch17_basic_sorting_algorithms/count_sort.cpp
#include <iostream> using namespace std; int main() { int n; cout<<"Enter size of array:"; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; } int freq[10000]={0}; int min_v=INT8_MAX,max_v=INT8_MIN; for(int i=0;i<n;i++) { freq[arr[i]]++; min_...
ALGO
0.999941
4.07237
fc63d62d-9dc2-4b6f-896f-842d19cf3d96
en30/online-judge
atcoder/abc105_a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, N) for (int i = 0; i < (int)N; i++) int main () { int N, K; cin >> N >> K; cout << (N%K == 0 ? 0 : 1) << endl; return 0; }
ALGO
0.999793
3.607287
8085479c-15c4-4f89-98c9-a4d2c352078a
MarkoGordic/FTN-IN
4. Semestar/Operativni Sistemi/Vezbe/Vezbe 2/Resenja/07_stl_algoritmi_max_resen.cpp
/* Uneti 5 celih brojeva sa standardnog ulaza. Koriscenjem STL algoritma pronaci najveci uneti broj */ #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> brojevi; //STL vektor koji sadrzi brojeve koji treba da se sortiraju int broj; //privremena promenl...
ALGO
0.998296
4.46951
5f940747-dcf5-4778-a7b6-f92ebd58b641
hetsthr/cpp_cdac
het_cpp/RECURSIO.CPP
// recursion : function called it self #include<iostream.h> #include<conio.h> void fibo(int n) { static int i,f=0,b=1; if(n>0) { i=f+b; cout<<" "<<i; f=b; b=i; fibo(n-1); } } void main() { int n,f=0,b=1; clrscr(); cout<<"enter no: "; cin>>n; cout<<" "<<f<<" "<<b; fibo(n); getch(); }
ALGO
0.999949
3.895449
6dfeef84-7f23-44bf-b79b-77508418e936
A-Kelly05/EjerciciosPracticos
SumaPares.cpp
#include <iostream> using namespace std; int main() { int Num,Suma; cout<<"Sumaremos los primeros 100 numeros pares\n"; system("pause"); for (int i = 0; i <= 100; i++) { if (i%2==0) { Suma=Num+i; Num=Suma; } i++; } cout<<"La suma de l...
ALGO
0.998751
3.310108
f1ed1532-d777-4cb1-99fb-35379ab7a4ec
maksyuki/code_tools
code_library/图论/最小生成树(Prim+邻接矩阵).cpp
/*********************************************** ************************************************ @ӿ: void Init () @: ʼڽӾ @ʱ临Ӷ: O (n^2) @: @ӿ: long long Prim (int s) @: С @ʱ临Ӷ: O (n^2) @s: Դ ************************************************/ const int maxn = 100 + 66; bool vis[maxn];//ʾڵǷС //ֱʾڽӾ󡢽ڵСľͶĸ int edge[maxn...
ALGO
0.999724
3.359905
40b77098-8f5f-4116-9de2-6c3b86ca39ed
muschellij2/FSL6.0.0
extras/include/boost/libs/graph/example/directed_graph.cpp
#include <boost/graph/directed_graph.hpp> // A subclass to provide reasonable arguments to adjacency_list for a typical directed graph int main(int,char*[]) { // directed_graph is a subclass of adjacency_list which gives you object oriented access to functions // like add_vertex and add_edge, which makes the code ...
ALGO
0.990774
6.370739
6b5c6272-8cec-4e83-9dbd-5633f7375e2c
rosscleary/Competitive-Programming
DMOJ/CCC/CCC '00 S4 - Golf.cpp
#include <iostream> using namespace std; int main () { int total; int club; int *dist; cin>>total; cin>>club; dist=new int[club]; for (int a=0; a<=club-1; a++) cin>>dist[a]; int *subs; subs=new int[total+1]; for (int a=0; a<=total; a++) subs[a]=total+1; subs[0]=0; for (int a=1; a<=total; a++){ int on=0; int ...
ALGO
0.999968
3.910588
9a8d7c65-8e20-4c59-bc56-c65b867d93b1
git-bavar/scribblr_new
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
1413f948-071f-4b2b-bb86-2de7c0acda80
guslipkin/COP2272C
Function2LipkinG/Function2LipkinG/main.cpp
//Gus Lipkin //COP 2272C 01 //Computer Programming 1 //Function2 //September 20, 2019 #include <iostream> using namespace std; void printTriangle(int size) { int stars = (size * 2) - 1;; for(int i = 0; i < size; i++) { for(int k = 0; k < i; k++) cout << " "; for(int j = 0; j < star...
ALGO
0.957926
5.517451
1fa1caae-6405-4dda-ad62-105f0cbb910f
abufarhad/Codeforces-Problems-Solution
158B(B-Texi).cpp
#include<bits/stdc++.h> #include<stdio.h> using namespace std; #define ll long long #define sci(x) scanf("%d",&x) #define scl(x) scanf("%lld",&x) #define scd(x) scanf("%lf",&x) #define scc(x) scanf("%[^\n]s",x); // For charecter string input , It will read all charecter untill Enter new line . #define pfi(x) print...
ALGO
0.999092
3.533881
11e851de-5ecf-4117-9960-da82f063d4ac
openjdk/jdk6
hotspot/src/share/vm/runtime/atomic.cpp
jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest, jbyte compare_value) { assert(sizeof(jbyte) == 1, "assumption."); uintptr_t dest_addr = (uintptr_t)dest; uintptr_t offset = dest_addr % sizeof(jint); volatile jint* dest_int = (volatile jint*)(dest_addr - offset); jint cur = *dest_int; jbyte*...
TOOL
0.96889
5.456244
c47fedc8-36c3-410b-91bb-4288f4d0ebdb
Kireck211/Team-Reference-KDT
Longest Common Subsequence.cpp
/* Dynamic Programming C/C++ implementation of LCS problem */ #include<bits/stdc++.h> int max(int a, int b); /* Returns length of LCS for X[0..m-1], Y[0..n-1] */ int lcs( char *X, char *Y, int m, int n ) { int L[m+1][n+1]; int i, j; /* Following steps build L[m+1][n+1] in bottom up fashion. Note ...
ALGO
0.999979
5.625279
a1b52f8b-2867-4495-8aab-76f45f766d3b
Chinz1/boostify_test_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.998733
6.76775
bf864065-5d87-4e69-9015-62a31b0c472d
Ristika0726/DS_Lab_sem2
lab1q3.cpp
#include<stdio.h> int flr(float x); int cei(float y); int main() { float value; int a=0,b=0; printf("Enter a number:"); scanf("%f",&value); a=flr(value); b=cei(value); printf("Floor=%d and Ceiling=%d",a,b); return 0; } int flr(float y) { int t; if(y<0) { t=(int)y +(-1); return t; } ...
ALGO
0.992751
3.108929
c0dfa90f-a519-4807-9786-d44ad54ea7c9
xinjunZ/miracl_test
gf2m4x.cpp
/* * MIRACL C++ Implementation file gf2m4x.cpp * * AUTHOR : M. Scott * * PURPOSE : Implementation of class GF2m4x (Quartic extension over 2^m) * * WARNING: This class has been cobbled together for a specific use with * the MIRACL library. It is not complete, and may not work in other * application...
ALGO
0.998537
4.88262
17aba964-ff74-42f7-bf0b-45151c99b69c
Tobiasloch/developable-gauss-stylization
libigl/include/igl/project_isometrically_to_plane.cpp
template < typename DerivedV, typename DerivedF, typename DerivedU, typename DerivedUF, typename Scalar> IGL_INLINE void igl::project_isometrically_to_plane( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedF> & F, Eigen::PlainObjectBase<DerivedU> & U, Eigen::PlainObjectBase<Deriv...
ALGO
0.977565
5.699068
00e0cfad-732e-437f-b4db-667b70b17c48
pedroprio/Marlin-2.0.8.1
Marlin/src/lcd/fontutils.cpp
/** * @file fontutils.cpp * @brief help functions for font and char * @author Yunhui Fu (<EMAIL>) * @version 1.0 * @date 2016-08-19 * @copyright GPL/BSD */ #include "../inc/MarlinConfig.h" #define MAX_UTF8_CHAR_SIZE 4 #if HAS_WIRED_LCD #include "marlinui.h" #include "../MarlinCore.h" #endif #inc...
TOOL
0.907405
5.779163
3a3d75aa-1254-493f-afe3-df5ef1c84f00
kaito1111/GameJam
GameTemplate/tkEngine/bulletPhysics/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
#include "btBoxBoxCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionShapes/btBoxShape.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "btBoxBoxDetector.h" #include "BulletCollision/CollisionDispatch/btCollisionObjec...
ALGO
0.999067
6.599949
62a468e4-d46b-438b-8c02-d9cd7c142bee
catherinemabato/project3
clang/tools/clang-installapi/ClangInstallAPI.cpp
#include "Options.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticFrontend.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/Tool.h" #include "clang/Frontend/TextDiagnosticPrinter.h" #include "clang/InstallAPI/Frontend.h" #include "clang/InstallAPI/FrontendRecords.h" #include "...
TOOL
0.893987
7.329685
68a1982f-2555-41c3-a009-6c10454de31f
gracygulati7/Codes
bit manipulation/clear_bit.cpp
#include<iostream> using namespace std; int clearbit(int n,int pos){ return (n&(~(1<<pos))); } int main(){ cout<<clearbit(5,2)<<endl; return 0; } /* clear bit means the position which we are given, we need to set that bit as 0 n=0101 suppose we need to clear bit at position, i=2, so to achieve this we wi...
ALGO
0.996158
5.340535
a728afde-6c86-4557-ae3a-abb01596926a
MichaelBalsam/Cplusplus-HW
Vector/moreOnVectors.cpp
// Example demonstrating VECTOR usage (and more!) // Read about "sequence containers" here: // http://en.wikipedia.org/wiki/Sequence_container_(C%2B%2B) // from where this code is excerpted #include <iostream> #include <vector> #include <algorithm> // sort, max_element, random_shuffle, remove_if, lower_bound #include...
ALGO
0.982477
4.387516
f1e0539e-dda1-4e0a-ac7b-b8486b5446f9
BiaLoquete/C
devC/ex6.cpp
#include <iostream> using namespace std; main(){ setlocale(LC_ALL, "Portuguese"); float altura,peso,result; cout << "Informe sua altura: "; cin >> altura; cout << "Informe seu peso: "; cin >> peso; result = (peso/(altura*altura)); if (result<=18.5){ cout << "Abaixo do peso"; }else if (result>=18....
TOOL
0.897758
3.585101
776714e4-ab3e-4ec9-9c4d-4f756b578a9c
Dup4/competitive-programming
template/geo3D.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; typedef double db; const db eps = 1e-10; const db PI = acos(-1.0); int sgn(db x) { if (fabs(x) < eps) return 0; return x < 0 ? -1 : 1; } db sqr(db x) { return x * x; ...
ALGO
0.998643
3.673478
c1282496-8d86-4813-bc10-24b86bec889b
Shiv1799/Erasmus_industrial_challenge_Ov2slam
map_manager.cpp
#include <opencv2/highgui.hpp> #include "multi_view_geometry.hpp" #include "map_manager.hpp" MapManager::MapManager(std::shared_ptr<SlamParams> pstate, std::shared_ptr<Frame> pframe, std::shared_ptr<FeatureExtractor> pfeatextract, std::shared_ptr<FeatureTracker> ptracker) : nlmid_(0), nkfid_(0), nblms_(0), nbkfs...
TOOL
0.919717
6.312696
69de7897-d2af-4fb5-9c01-0f2e18e0bfdb
leasunhy/leetcode
cpp/#169.Majority Element.cpp
// Date: 2016-07-30 class Solution { public: int majorityElement(vector<int>& nums) { int major = nums[0], count = 1; for (size_t i = 1; i < nums.size(); ++i) { if (count == 0) major = nums[i], count = 1; else if (nums[i] != major) --count; ...
ALGO
0.999963
5.676442
162a9fc8-fc1e-4118-8588-881005548364
viiku/competitive-programming-problems
hackerearth/FerrisWheel.cpp
#include<bits/stdc++.h> using namespace std; using ll=long long int; int main(){ int n,x; cin>>n>>x; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); for(int i=0;i<n;i++){ } }
ALGO
0.99991
3.356391
e0ffb686-cd56-4dca-a3f4-42944dccf498
jamesbrindle/Custom-Jyers-Marlin
Marlin/src/libs/least_squares_fit.cpp
/** * Least Squares Best Fit by Roxy and Ed Williams * * This algorithm is high speed and has a very small code footprint. * Its results are identical to both the Iterative Least-Squares published * earlier by Roxy and the QR_SOLVE solution. If used in place of QR_SOLVE * it saves roughly 10K of program memory. I...
ALGO
0.998838
5.594059
4a8c3b48-d39c-473e-b6e5-821367d36cc3
Testing-Repos/build_make
tools/ziptime/ZipFile.cpp
// // Access to Zip archives. // #include "ZipFile.h" #include <memory.h> #include <sys/stat.h> #include <errno.h> #include <assert.h> #include <inttypes.h> using namespace android; #define LOG(...) fprintf(stderr, __VA_ARGS__) /* * Open a file and rewrite the headers */ status_t ZipFile::rewrite(const char* zip...
TOOL
0.872461
6.234113
dcb8391d-c8c4-4716-bd17-4f38f6fd2855
Jiachengyou/NTU2019ADA
hw4/code/ReachabilityCoefficient_v2.cpp
//reference(DFS):https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/ #include<bits/stdc++.h> using namespace std; // Graph class represents a directed graph // using adjacency list representation int value[500][20001]; class Graph { int V; // No. of vertices // Pointer to an ar...
ALGO
0.999784
4.248954
5d2e1a5f-8754-43ea-a16b-74a4d765f808
Limineses/JS
additional 3/2/2.3.cpp
#include <iostream> #include <cstdlib> #include <cmath> using namespace std; void equation(double a, double b, double c) { if(a==0) { cout << "Неверное выражение !"; return; } double D; D = pow(b,2) - 4 * a * c; if(D < 0) { cout << "Уравнение не имеет решений"; return; } if(D == 0) { cout << "Уравн...
ALGO
0.998269
3.415443
f0f4fe90-6853-4d6b-8eea-400957905881
HarryGogonis/YAGE
packages/bulletphysics/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
#include "LinearMath/btScalar.h" #include "SphereTriangleDetector.h" #include "BulletCollision/CollisionShapes/btTriangleShape.h" #include "BulletCollision/CollisionShapes/btSphereShape.h" SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle,btScalar contactBreakingThreshold) ...
ALGO
0.998437
7.256827
a990a2c5-5383-4724-82b2-e0fbc8fd24df
anishgupta675/FINAL450
Array/Given_an_array_of_size_n_and_a_number_k_fin_all_elements_that_appear_more_than_nk_times/main.cpp
#include <iostream> #include <unordered_map> using namespace std; int *arr = nullptr; void getArr(int *arr, int n, int k) { unordered_map<int, int> umap; for(int i = 0; i < n; i++) umap[arr[i]]++; for(auto i : umap) if(i.second > n / k) cout << i.first << " "; cout << "\n"; } int mai...
ALGO
0.999958
3.338513
37087508-588a-45c7-9837-0fdc756a0ed6
ishandutta2007/codeforces
nebuchadnezzar/normal/1305/D.cpp
// Created by Nikolay Budin #ifdef DEBUG # define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define ff first #define ss second #define szof(x) ((int)x.size()) #ifndef LOCAL # define cerr __get_ce #endif using namespace std; typedef long long ll; typedef long double ld; ...
ALGO
0.999915
3.932792
d986bc92-70f2-4929-a989-2ba177fc38c5
compilerai/counter
llvm-project/mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopSpecialization.cpp
#include "PassDetail.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/LoopOps/LoopOps.h" #include "mlir/Dialect/LoopOps/Passes.h" #include "mlir/Dialect/StandardOps/IR/Ops.h" #include "mlir/IR/AffineExpr.h" #include "mlir/IR/BlockAndValueMapping.h" using namespace mlir; using loop::ParallelOp; ...
TOOL
0.873079
7.75571
3c0cbdc2-daab-4c0f-8ef3-8b2074d9abf2
walkccc/LeetCode
solutions/3021. Alice and Bob Playing Flower Game/3021.cpp
class Solution { public: long long flowerGame(int n, int m) { // Alice wins if x + y is odd, occurring when: // 1. x is even and y is odd, or // 2. y is even and x is odd. const int xEven = n / 2; const int yEven = m / 2; const int xOdd = (n + 1) / 2; const int yOdd = (m + 1) / 2; ...
ALGO
0.999971
5.94805
917d60c2-cd6b-4942-80a2-f48a64eb4861
lucasxia01/Competitive-Programming-Problems
ICPC/ICPC Training/ICPC PR5 N/ICPC PR5 N/main.cpp
#include <vector> #include <stack> #include <iostream> #include <cstdio> #include <string> #include <cmath> #include <algorithm> #include <map> #include <functional> #include <set> #include <cstring> #include <queue> #include <stdlib.h> #include <time.h> #include <complex> #include <iterator> #include <regex> #include ...
ALGO
0.999895
3.957137
4ff7b1d5-508a-4a04-a9e7-cd16232d9bde
HJWAJ/acm_codes
Project Euler/Column 1/46.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> #include<cmath> #include<vector> #include<string> #include<map> #include<set> #include<queue> using namespace std; int prime[200000]; bool bo[1000001]; int prime_table() { int i,j,flag=0; memset(bo,0,sizeof(bo)); bo[...
ALGO
0.99982
3.864105
ed1f9f70-81b2-4d51-a055-24eda4db25ad
juanplopes/euler-plus
035.cpp
#include <iostream> #include <vector> #include <cmath> #define LIM 2000100 #define ull unsigned long long using namespace std; bool sieve[LIM]; vector<int> P; int P10[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000}; void make_sieve(int until, int step) { until++; int n = (until - 3) / 2; ...
ALGO
0.999605
4.711473
10bea9b1-a84a-4a34-954e-e314cdec5a9e
Sharknevercries/Online-Judge
CodeForce/144B. Meeting.cpp
/* 1308994 Mar 7, 2012 6:20:41 PM Shark 144B - Meeting GNU C++ Accepted 30 ms 1400 KB */ #include<stdio.h> #define SQUARE(x) ( (x)*(x) ) typedef struct data{ int X,Y,R; }MAKE; MAKE point[1000]; int main(){ int x1,x2,y1,y2; while(scanf("%d%d%d%d",&x1,&y1,&x2,&y2)==4){ int n; scanf("%d",&n); for(int i=0;i<n...
ALGO
0.998758
3.607006