uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
d8d32d40-f0da-44d6-b580-fbc4883ba347
GauravKumar529/Leetcode
0445-add-two-numbers-ii/0445-add-two-numbers-ii.cpp
class Solution { public: using Node = ListNode; ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { stack<int> st1, st2; while (l1) { st1.push(l1->val); l1 = l1->next; } while (l2) { st2.push(l2->val); l2 = l2->next; }...
ALGO
0.999949
6.801457
81dceb86-1da1-489f-ac1f-2adb0feee9d9
yaadhav/Competitive-Programming
CF/PROBLEM SET/1100/Dungeon/dungeon.cpp
// Q : https://codeforces.com/problemset/problem/1463/A #include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll t; cin >> t; while(t--) { ll a, b, c; cin >> a >> b >> c; ll tot=a+b+c; ll m=min(a,b); m=min(m,c); if( tot%...
ALGO
0.999891
4.849808
d7010dcc-8446-41ce-97f1-3ed14b56eed9
priyankareddy2004/foc
hallow piramid without vertical line.cpp
#include <stdio.h> int main() { int rows; printf("Enter the number of rows : "); scanf("%d", &rows); for (int i = 1; i <= rows; i++) { for (int j = 1; j <= i; j++) { if (j == i) { printf("*"); } else { printf(" "); } ...
ALGO
0.999841
4.104739
0b6fcca7-5229-4362-9a42-7bb4d45ade43
Abhish-akp/POD-Leetcode-
2699-count-the-number-of-fair-pairs/count-the-number-of-fair-pairs.cpp
class Solution { public: long long countFairPairs(vector<int>& nums, int lower, int upper) { long long result = 0; sort(nums.begin(),nums.end()); for (int i = 0; i < nums.size() - 1; i++) { auto high=upper_bound(nums.begin() + i + 1, nums.end(), upper - nums[i]); aut...
ALGO
0.999994
6.08143
5054059f-e747-4a49-8d9f-aed714f02ca2
MinaHenein/g2o
g2o/apps/g2o_hierarchical/g2o_hierarchical_test_functions.cpp
#include <signal.h> #include <iostream> #include <iomanip> #include <string> #include <fstream> #include <sstream> #include <algorithm> #include <cassert> #include <sstream> #include "g2o/apps/g2o_cli/dl_wrapper.h" #include "g2o/apps/g2o_cli/output_helper.h" #include "g2o/apps/g2o_cli/g2o_common.h" #include "g2o/core/...
ALGO
0.968889
6.020065
75b97d75-2449-4eb6-8522-e29af0952c50
Leumim2020/ExercisesCpp
Ponteiros e Referências C++/exercicio20/exeP20.cpp
/* Implemente uma função que receba como parâmetro um array de números reais de tamanho N e retorne quantos numeros negativos há nesse array. Essa função deve obedecer ao protótipo: int negativos(float *vet, int N) */ #include <iostream> #include <vector> void negative(std::vector<float> *vet,int N); int main(i...
ALGO
0.998189
4.894008
bc6d5c23-6098-4038-bdd5-2fa067f72ce0
tama4195/AOJ
src/ITP/ITP2/swap_ranges/main.cpp
#include <bits/stdc++.h> #include <stdint.h> #include <algorithm> #include <iostream> #include <vector> using namespace std; template <typename T> void input_vector(int &n, std::vector<T> &v) { cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; v.push_back(x); } } template <...
ALGO
0.999639
4.244233
8adb2ac5-c8f3-43c0-bd17-15d9ac6dd53a
Patryk1949/C-plus-plus
src/eigenTest.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'aVeryBigSum' function below. * * The function is expected to return a LONG_INTEGER. * The function accepts LONG_INTEGER_ARRAY ar ...
ALGO
0.998144
5.031277
e76f18bb-5f00-4d87-ac5a-28b1c85b2588
chalmersplasmatheory/DREAM
src/Settings/Equations/spi.cpp
#include "DREAM/EquationSystem.hpp" #include "DREAM/Equations/Fluid/SPIAblationTerm.hpp" #include "DREAM/Equations/Fluid/IonSPIDepositionTerm.hpp" #include "DREAM/Equations/Fluid/SPIHeatAbsorbtionTerm.hpp" #include "DREAM/Equations/Fluid/SPITransientTerm.hpp" #include "DREAM/Equations/Scalar/ConstantSPIVelocityTerm.hpp...
ALGO
0.880343
6.0064
85299ac9-7e10-4996-8c68-72961db8238e
GT9505/MONet
caffe/src/caffe/layers/argmax_layer.cpp
#include <algorithm> #include <functional> #include <utility> #include <vector> #include "caffe/layers/argmax_layer.hpp" namespace caffe { template <typename Dtype> void ArgMaxLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { const ArgMaxParameter& argmax_param =...
DATA
0.934327
6.640243
914e5556-8abc-4dbe-9e46-d42644807ad9
danchuo/algorithms-and-data-structures
#3 Arrays and matrices/B/main.cpp
#include <iostream> int ProcessingArray(int length_of_input_array); int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int length_of_input_array; std::cin >> length_of_input_array; std::cout << ProcessingArray(length_of_input_array); return 0; } int ProcessingArray(int const leng...
ALGO
0.999864
4.67409
41d25c9c-e63b-40b1-b82b-fd7fb91878ee
harsh-srivastv/May-Leetcode-Challenge-2023
1572-matrix-diagonal-sum/1572-matrix-diagonal-sum.cpp
class Solution { public: int diagonalSum(vector<vector<int>>& mat) { int n=mat.size(); int sum=0; int i=0,j=0; while(i<n) { sum+=mat[i][j]; i++; j++; } i=0; j=n-1; while(i<n) { if(i!=j) ...
ALGO
0.99994
5.783195
6eae6115-d34c-4eec-a76e-eb975bce1751
sudo-arjun/maimt
C&C++/C++ programs/R100Sem4P0006.cpp
#include<iostream> using namespace std; class TyreCompany { protected: int stock; public: void setTyreStock(int stk) { stock=stk; } }; class IronCompany { protected: int stock; public: void setIronStock(int stk) { stock=stk; } }; class PlasticCompany { protected: int stock; public: void s...
ALGO
0.963933
4.237607
e4dc8bd9-efbf-4d91-825c-c8c0aff846cd
silent-chen/DGE
gaussiansplatting/SIBR_viewers/src/core/graphics/Frustum.cpp
// Partially based on: // http://www.lighthouse3d.com/tutorials/view-frustum-culling #include "core/graphics/Camera.hpp" #include "core/graphics/Frustum.hpp" namespace sibr { Frustum::Frustum(const Camera& cam) { float ratio = cam.aspect(); float angle = cam.fovy(); float nearD = cam.znear(); float farD = c...
ALGO
0.972064
7.004009
b8623a01-3962-4ade-9a96-938a94bad851
stubbiali/meshsimplification
RPackage/MeshDataSimplification/src/meshsimplification/lib/Eigen/lapack/svd.cpp
#include "lapack_common.h" #include <Eigen/SVD> // computes the singular values/vectors a general M-by-N matrix A using divide-and-conquer EIGEN_LAPACK_FUNC(gesdd,(char *jobz, int *m, int* n, Scalar* a, int *lda, RealScalar *s, Scalar *u, int *ldu, Scalar *vt, int *ldvt, Scalar* /*work*/, int* lwork, ...
ALGO
0.999072
5.526819
7184054e-6012-452c-afe0-fcc976e51f72
Anshu1Gupta/Leetcode_-_GFG_Solved_Problems
0153-find-minimum-in-rotated-sorted-array/0153-find-minimum-in-rotated-sorted-array.cpp
class Solution { public: int findMin(vector<int>& arr) { int low=0; int high=arr.size()-1; int mini=1e9; while(low<=high){ int mid=(low+high)/2; if(arr[low]<=arr[mid]){ mini=min(arr[low],mini); low=mid...
ALGO
0.999952
5.928524
c8478b2f-e465-4755-bea7-05592f9fa225
sahilkhan03/CF-Solutions
codeforces/1465/C.cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define fast ios_base::sync_with_stdio(false); cin.tie(nullptr); #define all(x) x.begin(), x.end() #define F first #define S second #define pb push_back #define pl pair<ll, ll> #define vl vector<ll>...
ALGO
0.999952
5.526898
60fab66e-7e39-482f-a032-7cfcb2886406
Senior-Vlad/Senior-Vlad
C++_Projects/Algorithms & Data Structures/HeapSort_Problem_1/ASD2_LabuzaV_HeapSort.cpp
#include <iostream> #include <vector> using namespace std; void heapify(int arr[], const int idx, const int max) { const int left = 2 * idx + 1; const int right = 2 * idx + 2; int largest; if (left < max && arr[left] > arr[idx]) { largest = left; } else { largest = idx; } if...
ALGO
0.999817
4.603518
044f83d9-7791-4d7a-b84d-e338c5e4d4f9
AndyL-n/OJ
OJ/demo2.cpp
#include<stdio.h> #include<string.h> int main() { char a[3][128], tmp[128]; int i, j; for(i=0; i<3; i++) { scanf("%s", a[i]); } for(i=0; i<3; i++) { for(j=i+1; j<3; j++) { if(strcmp(a[i], a[j]) > 0) { memset(tmp, 0, sizeof(tmp...
ALGO
0.999991
3.182358
8590ec5a-f57a-45f8-b832-a803aad78000
stg0123/baekjoonlearn
dynamic programming/baekjoon9507.cpp
#include <iostream> #include <vector> using namespace std; typedef long long ll; class koong{ private: vector<ll> dp; int N; public: koong(){ std::cin >> N; dp.resize(68); dp[0]=1,dp[1]=1,dp[2]=2,dp[3]=4; } ll DP(int n){ if(dp[n]) return dp[n]; dp[...
ALGO
0.999898
4.102772
db2be5c5-d485-4191-bfa7-a98f918f9a03
DanielBrMz/TC1031
C++/2.2/main.cpp
#include <iostream> #include <fstream> #include "Fila/Fila.h" #include "Pila/Pila.h" /* * Este programa utliza los ADT Fila y Pila para almacenar datos. * implementados en los archivos Fila/Fila.cpp y Pila/Pila.cpp * para crear, leer, actualizar y eliminar nodos de la lista. * * El programa crea 5 nodos des...
ALGO
0.984609
4.82819
af923796-c44c-473e-b7ea-466aacf1c8cf
longcule/BT-LTNC-INT2215-22
BT04-LTNC/C-13-BT04.cpp
#include<iostream> using namespace std; int main(){ long long T,n,a,sum[n]; cin >> T; long long val = 0; for(int t = 0; t < T; t++){ cin >> n; for(int i = 0; i < n; i++){ cin >> a; val += a; sum[i] = val; cout<<val; } if(n ...
ALGO
0.999635
3.844851
53352385-6d56-4aaf-a640-431c60a69ad7
claudiutraistaru-cluttered/LeetCode-Minecode
Contest/Biweekly Contest 21/D/main.cpp
#include <map> #include <set> #include <queue> #include <string> #include <stack> #include <vector> #include <cstdio> #include <numeric> #include <cstdlib> #include <utility> #include <iostream> #include <algorithm> #include <unordered_map> #include <unordered_set> using namespace std; /// Solution: // struct TreeNod...
ALGO
0.999972
6.263322
21ef219b-3036-43ed-b680-c7952d561c8b
Thiago-V-A/IP-AED
aulaC++/teste3.cpp
#include <iostream> using namespace std; int main(){ int c, b; cin >> c >> b; if((c+b)%2 == 0){ cout << "Bino\n"; }else{ cout << "Cino\n"; } }
ALGO
0.999602
3.677596
8e13b511-8904-486b-8d7b-1add20aff16e
qitoy/cpp-library
test/library_checker/shortest_path.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/shortest_path" #include <bits/stdc++.h> #include "qitoy/graph/adjacency_list.hpp" #include "qitoy/graph/dijkstra.hpp" using namespace std; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int N,M,s,t; cin >> N >> M >> s >> t; adjacency_list<long lon...
ALGO
0.99992
4.331618
e58def8b-1b37-4625-a4c0-073c9ba8fad9
romanak/ProgrammingCpp
04_computation/ex11_prime_numbers.cpp
// Exercise 11: find all prime numbers between 1 and 100 #include "../std_lib_facilities.h" void print_vector(vector<int> v) { cout << "["; for (int i=0; i < v.size()-1; ++i) { cout << v[i] << ", "; } cout << v[v.size()-1] << "]\n"; } int main() { vector<int> primes; bool is_prime; ...
ALGO
0.9994
5.03336
5c5127b0-28f0-41d8-ae8f-81665b0e2d81
yogesh584/Data-Structures-and-Algorithm
Recursion/Day 10 : Lecture 40/rat_in_a_maze_problem.cpp
/* RAT IN A MAZE PROBLEM : */ #include <iostream> #include <vector> using namespace std; bool isSafe(vector<vector<int>> m, int n, int x, int y, vector<vector<int>> visited) { if ((x >= 0) && (x < n) && (y >= 0) && (y < n) && (m[x][y] == 1) && (visited[x][y] == 0)) { return true; } return ...
ALGO
0.999975
4.843614
4dec6268-e609-4bcb-9ddf-d734723f8268
ming197/leetcode
78.subsets.cpp
/* * @lc app=leetcode id=78 lang=cpp * * [78] Subsets */ // @lc code=start #include "bits/stdc++.h" using namespace std; class Solution { public: vector<vector<int>> result; vector<vector<int>> subsets(vector<int>& nums) { result.push_back({}); // the size of the subset for (int i =...
ALGO
0.999741
6.610465
563adbd7-3a43-4361-9ab5-772747518570
TsogooJuteh/OOP-L1S2
zadacha7.cpp
#include <iostream> #include <fstream> const int maxn = 1000; // Maximum number of elements in the array void read_from_file(int arr[], int& size, std::string namefile) { std::ifstream myfile; myfile.open(namefile); int num; int i = 0; while(myfile >> num && i < maxn) { arr[i++] = num...
ALGO
0.999707
4.929945
f414103d-0c96-4c9a-af5c-86d9313b9360
SheviakovIKM724a/LAB_11
LAB_11_program.cpp
#include <iostream> using namespace std; int main() { system("chcp 1251 > nul"); //підключення української мови int n; cout << "Введіть розмір масиву: "; cin >> n; // Створення динамічного масиву int* a = new int[n]; // Введення елементів масиву cout << "Введіть елементи масиву:\n";...
ALGO
0.999795
4.148919
745d621a-b154-489c-9db5-fbe96075ff15
Nirbhay-Gupta/Top-notch-DSA-Problem
Stack/Implement_two_stack_in_a_array/main.cpp
#include <bits/stdc++.h> using namespace std; struct twoStack{ int* arr,cap,top1,top2; twoStack(int n){ arr=new int[n]; cap=n; top1=-1; top2=cap; } void push1(int x){ if(top1<top2-1){ top1++; arr[top1]=x; } } void push2(i...
ALGO
0.998052
4.142264
c00aa01e-790d-4011-b45d-01bdc3a6c1ce
Omorfarouk/leetcode_solution
0239-sliding-window-maximum/0239-sliding-window-maximum.cpp
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { vector<int> res; deque<int>dq; for(int i=0; i<k; i++){ while(!dq.empty() && nums[i]>dq.back()){ dq.pop_back(); } dq.push_back(nums[i]); } ...
ALGO
0.99999
6.252694
c451f1c6-8e8d-40c0-bfc0-fd093075ce77
Anish168/Utsav_Session
Bootcamp/Important Things/Sorting/InbulidSort.cpp
#include <iostream> #include <algorithm> //for using inbuild sort using namespace std; int main() { int arr[] = {5, 4, 3, 2, 1}; int n = sizeof(arr) / sizeof(int); cout << "Before Sorting "; for (int i = 0; i < n; i++) { cout << arr[i] << " "; } cout << endl; //syntax:- sort(a...
ALGO
0.999836
4.460464
2ba97e52-9f31-4ecc-9065-7557c7cdf2f8
PigeonNerd/15418_assignment4_grading
src/myserver/worker.cpp
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <sstream> #include <glog/logging.h> #include "server/messages.h" #include "server/worker.h" #include "tools/work_queue.h" //#include <cstring> //#include <iostream> // Initialize the CPU and disk queues struct Worker_state { WorkQueue<Request_msg...
WEB
0.930036
4.216835
3abde3a4-f7f5-4663-8282-f7127c2fd43a
mastewalshiferaw/CSEC_CPD
dieroll.cpp
#include <iostream> using namespace std; int main() { int Y, W; cin >> Y >> W; int maxRoll = max(Y, W); string results[] = {"1/1", "5/6", "2/3", "1/2", "1/3", "1/6"}; cout << results[maxRoll - 1] << endl; return 0; }
ALGO
0.99982
4.144123
17acf490-7814-4719-9ef0-ec54e451a9d4
svk-2020/Coursera-C
Course 1 - White belt/WB_Final.cpp
#include <iostream> #include <sstream> #include <iomanip> #include <string> #include <exception> #include <map> #include <set> using namespace std; //================================================================================= class Date { public: // Конструктор даты Date(const string& s) { s...
TOOL
0.980535
5.216219
8fe74e1c-85f1-4b05-a803-ea9b54bba03d
CoderInTheNorth-049/Graph-Coding-Minutes
Section-12_Flood-fill/45-make-largest-island/45-make-largest-island.cpp
#include<bits/stdc++.h> using namespace std; map<int,int> col_cnt; vector<vector<bool>> vis; int dx[]={0,0,1,-1}; int dy[]={1,-1,0,0}; void dfs(int i,int j,int n,int m,vector<vector<int>>& grid,int col){ if(i<0 || j<0 || i>=n || j>=m || grid[i][j] != 1 || vis[i][j]) return; vis[i][j]=true; grid[i][j]=col...
ALGO
0.999416
5.406781
0f3e8567-5fcb-4cc3-ba58-fea0520405a8
sinian666/code_102_7
cpp_副本33/chapter_searching/two_sum.cpp
/** * File: two_sum.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 方法一:暴力枚举 */ vector<int> twoSumBruteForce(vector<int> &nums, int target) { int size = nums.size(); // 两层循环,时间复杂度 O(n^2) for (int i = 0; i < size - 1; i++) { for (int j = i + 1; j ...
ALGO
0.999787
6.081783
d1071ee8-4f08-43f5-a48a-cf455dd85918
Stardust369/Coding-Platforms
1907A__Rook.cpp
//Sauce: https://codeforces.com/problemset/problem/1907/A #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; char num[8] = {1, 2, 3, 4, 5, 6, 7, 8}; char place[8] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}; char str[3]; for (int i = 0; i < n; i++){ cin >> str; for (...
ALGO
0.999724
3.323692
27b851bb-3423-478a-be76-d3a5fc2aa7c2
svancaj/HybridMAPF
01archive/manual_split/Hybrid_MAPF/Picat.cpp
#include "Picat.h" using namespace std; PicatInstance::PicatInstance(Instance* in) { // parameters solver_input = "picat_instance.pi"; solver_output = "picat_solution.out"; solver_name = "soc2"; inst = in; } void PicatInstance::Solve(vector<int>& nodes, vector<int>& agents) { vector<vector<int> > graph (nodes...
ALGO
0.999147
4.534859
c8494f31-c135-4c73-a4e2-ef52df686134
MuhammadMutahhir6/CyberSentinal-_Toolkit_V2
core/xorcipher.cpp
#include "xorcipher.h" #include <fstream> bool XorCipher::transformFile(const std::string& inPath, const std::string& outPath, const std::string& key) { std::ifstream in(inPath, std::ios::binary); std::ofstream out(outPath, std::ios::binary); if (...
TOOL
0.893056
5.276028
248b8963-cb0b-44a6-afba-2904a246c738
checkedc/checkedc-llvm-project
llvm/lib/CodeGen/LiveDebugVariables.cpp
#include "LiveDebugVariables.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntervalMap.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringRef.h"...
TOOL
0.862022
3.324798
8e4e3547-24cc-4a66-98f9-c70bfed9a422
Shruti2906/DSA-Practice
.ccls-cache/@home@runner@FirstLastOcccurranceInArrayBinarySearch-1/main.cpp
#include <iostream> #include<vector> using namespace std; int firstOccurence(vector<int>& arr, int n, int k){ int start=0,end=n-1; int mid=start+(end-start)/2; int ans=-1; while(start<=end){ if(arr[mid]==k) { ans=mid; end=mid-1; } else if(k<arr[mid]){ ...
ALGO
0.999947
5.731984
848c6845-faf9-46f3-a0f0-c5e95e6c141d
R-utujatate/CPP_Code
Cross_product.cpp
#include <iostream> #include <vector> using namespace std; class Vector { private: vector<double> components; public: // Constructor Vector(vector<double> v) : components(v) {} // Method to compute cross product with another vector Vector crossProduct(const Vector &other) const { if (...
ALGO
0.998802
6.803666
010bbc4c-cf01-4d3e-a71c-a1abd09ecba6
192124136/DAY-1
reversing number.cpp
#include<iostream> using namespace std; int main() { int n,revnum=0,remainder; cout<<"enter an integer:"; cin>>n; while(n!=0) { remainder=n%10; revnum=revnum*10+remainder; n=n/10; } cout<<"reversed number="<<revnum; return 0; }
ALGO
0.999483
3.798616
e1c17fc6-c3f6-4580-a412-d9c2e587c660
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J00029/sticks/sticks.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t,n; freopen("sticks.in","r",stdin); freopen("sticks.out","w",stdout); cin>>t; for(int i=1;i<=t;i++){ cin>>n;if(n==1)cout<<"-1"<<'\n'; if(n==2)cout<<1<<'\n'; if(n==3)cout<<7<<'\n'; if(n==4)cout<<4<<'\n'; ...
ALGO
0.999489
3.383286
103d545c-3866-4626-b126-c9f12e59d7e7
ljx791863565/homework
interview/Tree/main.cpp
#include "binaryTree.h" #include <iostream> using namespace std; typedef char ElementType; //回调函数 Visit() = PrintElement() static void PrintElement(const ElementType &data) { cout << data; } int main() { CBTNode<ElementType> *pRoot; CBTNode<ElementType> *pLeftChild; CBTNode<ElementType> *pRightChild; pRoot = n...
ALGO
0.980256
4.034477
c87e2009-4923-4077-a8f5-aa55a8a34dac
rlagudwls5518/Step-4-1-
10871번/10871번.cpp
#include <iostream> using namespace std; //X보다 작은수 int main() { int N = 0; int X = 0; cin >> N >> X; int* A = new int[N]; for (int i = 0; i < N; i++) { cin >> A[i]; } for (int i = 0; i < N; i++) { if (A[i] < X) { cout << A[i] << " "; } } delete[] A; }
ALGO
0.999793
3.222497
a2d42113-8234-40c7-af82-fb241b366b6d
satya-supercluster/Leetcode
1370-count-number-of-nice-subarrays/1370-count-number-of-nice-subarrays.cpp
class Solution { public: int numberOfSubarrays(vector<int>& nums, int k) { unordered_map<int,int> mp; mp[0]=1; int ans{}; vector<int>pre(nums.size(),0); pre[0]=nums[0]%2; for(int i=1;i<nums.size();i++){ pre[i]=pre[i-1]+(nums[i]%2); } ...
ALGO
0.999997
5.563063
b3bcfdde-1c7a-467f-9d4b-ce673b80f068
vibha-4/Bharat_Intern
flutter_application_calc/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.998778
6.76073
dcc63995-599d-4243-af86-fe73c86ffcf3
ishandutta2007/codeforces
erray/normal/1527/C.cpp
// author: erray #include <bits/stdc++.h> using namespace std; template<typename A, typename B> string to_string(const pair<A, B>& p); template<typename A, typename B, typename C> string to_string(const tuple<A, B, C>& t); template<typename A, typename B, typename C, typename D> string to_string(const tuple<A, B, C, ...
ALGO
0.999946
4.755455
d3d0b408-46c2-4bdd-a611-638c726cb2b9
gmltn205/newcpp
cppp/subject.cpp
#include <iostream> #include <cmath> #include <cstdlib> int main() { double arr[19] = {22, 24, 19, 38, 22, 22, 23, 29, 27, 57, 63, 23, 24, 29, 31, 24, 20, 25, 30, 34}; int i, sum = 0; double k = 0; for (i = 0; i < 20; i++) { k += arr[i]; } k = k / 19; std::cout << "? "; std...
ALGO
0.999267
3.590683
fbec2114-be77-4192-b708-52861b08683a
raincross7/code-similarity
codes/train_code/problem233/problem233_25.cpp
#include <bits/stdc++.h> //#pragma GCC optimize(2) #define pb push_back #define mp make_pair #define all(x) x.begin(),x.end() #define rep(i,a,b) for(int i = (a);i <= (b);i++) #define pii pair<int,int> #define pll pair<long long, long long> #define fi first #define se second using namespace std; typedef long long ll; ty...
ALGO
0.999977
3.800526
0c4261bc-eca4-4257-b618-a3c6f840fc95
ioanajoj/Semester-5
PPD/Lab9/Lab9_bf/Lab9_bf/Lab9_bf.cpp
#include <mpi.h> #include <stdio.h> #include <iostream> #include <chrono> long *get_rand_polynomial(int size) { long *P = new long[size]; for (int i = 0; i < size; i++) P[i] = rand() % 10; return P; } void print_polynomial(const char* name, long *P, int size) { std::cout << name << " = "; for (int i = 0; i <...
ALGO
0.999914
3.963797
7d3f4696-a1b5-4693-bbc8-7a32fbf7631f
gilbertoalexsantos/judgesolutions
Solved/UVA/@UVA 11136 - Hoax or what/11136 - Hoax or what.cpp
//Author: Gilberto A. dom mantom //Website: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2077 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <set> using namespace std; int n; int main() { while(scanf("%d",&n) && n) { long long...
ALGO
0.996373
3.09754
df3a18cf-eca1-4dc3-8150-4eb2bed3a892
zjsxzy/Leetcode
Longer Contiguous Segments of Ones than Zeros/main.cpp
#include <bits/stdc++.h> using namespace std; #define PB push_back #define MP make_pair #define SZ(v) ((int)(v).size()) #define abs(x) ((x) > 0 ? (x) : -(x)) typedef long long LL; class Solution { public: int count(string &s, char c) { int sum = 0, res = 0; for (int i = 0; i < s.size(); i++) { ...
ALGO
0.999963
5.101934
eb411761-d6ac-4bf2-b2c7-a436d4814a23
rafli4514/CodeWars
8-kyu/calculate-bmi/calculate-bmiundefined.cpp
#include <string> std::string bmi(double w, double h) { double bmi = w/(h*h); if(bmi <= 18.5) { return "Underweight"; } else if (bmi <= 25.0) { return "Normal"; } else if (bmi <= 30.0) { return "Overweight"; }else { return "Obese"; } }
ALGO
0.909581
5.434461
bb3066d9-91a5-419d-8b96-51bf33cc2c07
TELOS-syslab/Pivot
src/systemc/tests/systemc/misc/cae_test/general/arith/subtract/sharing/sharing.cpp
/***************************************************************************** sharing.cpp -- Original Author: Rocco Jonack, Synopsys, Inc., 1999-07-14 *****************************************************************************/ /***************************************************************************** ...
TOOL
0.946575
3.599287
846f4cc3-f3e0-4736-8170-d3b5581cb422
camil0palacios/Competitive-programming
solutions/codeforce/Codeforces Round #820 (Div. 3)/e.cpp
#include <bits/stdc++.h> #define endl '\n' #define ll long long #define fori(i,a,b) for(int i = a; i < b; i++) #define forr(i,a,b) for(int i = a; i >= b; i--) #define fore(i,a,b) for(int i = a; i <= b; i++) #define ft first #define sd second #define all(v) v.begin(), v.end() #define sz(v) (int) v.size() #define mp make...
ALGO
0.996267
3.207761
10a9c5bb-b1e5-4ff4-a10a-f12f5405c858
mcmlxxxivis/Serie-1
serie_3d.cpp
//Implementa una lista ligada doble circular #include<stdio.h> #include<stdlib.h> struct nodo{ int Dato; struct nodo *ptrSig; struct nodo *ptrAnt; }; typedef struct nodo nodo; nodo *ptrPri=NULL,*ptrUlt=NULL; void agregarIni(); void agregarFin(); void mostrarIni(); void mostrarFin(); void eliminarFin()...
ALGO
0.993913
3.975273
49a72e8c-7486-4482-a995-bd2436037d9a
honokame/megarover_nnql
robust_multirobot_map_merging/src/third_parties/SE-Sync/eigen/test/sparse_solvers.cpp
#include "sparse.h" template<typename Scalar> void initSPD(double density, Matrix<Scalar,Dynamic,Dynamic>& refMat, SparseMatrix<Scalar>& sparseMat) { Matrix<Scalar,Dynamic,Dynamic> aux(refMat.rows(),refMat.cols()); initSparse(density,refMat,sparseMat); refMat = refMat * refMat.adjoint(); for (i...
TEST
0.88333
5.216745
96d3758a-2789-41fc-acf7-60e2973d4818
wheresvic/recurse
kata/2009_10_26_linked_list.cpp
#include <iostream> using namespace std; typedef struct linkedList { int data; linkedList *next; linkedList() { next = NULL; data = 0; } } linkedList; void printList (linkedList **head) { if (*head == NULL) { cout << "List is empty!" << endl; return; } linkedList *temp = *head; while (temp != N...
ALGO
0.999626
3.973011
1eb6eb46-e632-4c0e-a8d1-8d002c82c558
doubley318/LeetCode
Cpp/9.回文数.cpp
/* * @lc app=leetcode.cn id=9 lang=cpp int main() { Solution so; int x = -121; cout << so.isPalindrome(x) << endl; return 0; } * [9] 回文数 */ // 11510/11510 cases passed (8 ms) // Your runtime beats 77.26 % of cpp submissions // Your memory usage beats 77.74 % of cpp submissions (5.8 MB) // @lc code...
ALGO
0.99933
6.057221
872756f1-3a2a-40d9-9139-f735ac0b3b2d
DeepakKarishetti/Basic-cpp-
a_star_algorithm/readboard_file.cpp
#include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> using std::cout; using std::ifstream; using std::istringstream; using std::string; using std::vector; vector<int> ParseLine(string line) { istringstream sline(line); int n; char c; vector<int> row; while (...
TOOL
0.901458
5.037843
38d263ad-5b23-481c-8175-a58eec0f4647
RoadsUntravelled/codes
my_codes/factorials.cpp
/************************************************************************* > File Name: factorials.cpp > Author: 魍魉楼主 > Mail: <EMAIL> z> Created Time: 2018年03月13日 星期二 11时26分56秒 ************************************************************************/ #include<iostream> #include<memory.h> using namespace std; int m...
ALGO
0.999972
4.332563
f3b5fcb5-84b8-4455-aed3-4a7141c959e1
ns-niam/Algorithm-and-data-structures-
cpp-main/lab pp1/6 lab/6h.cpp
#include <bits/stdc++.h> using namespace std; string joke (int n){ int s = 0; int a = n; while(n != 0){ if ( (n % 10) % 2 == 0 ){ s++; } else { break; } n /= 10; } int d = 0; while (a != 0){ d++; a /= 10; } if ( s ...
ALGO
0.999688
4.125925
e5f4f6e9-8059-43aa-8880-963c983b867a
tyt0815/BaekJoon_Solved
Silver1/5525.cpp
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m, p, i, Cnt = 0; string InputString; cin >> n >> m; cin >> InputString; p = 2 * n + 1; for(i = 0; i + p - 1 < m; ++i) { if(InputString[i] == 'I') break; } ++i; ...
ALGO
0.999639
3.678608
0d9e2be2-4e2f-4af8-90dc-c4f9ddcbc28f
Nitin0309/Nitin-indigo-bugs
core/indigo-core/molecule/src/molecule_tautomer_match.cpp
#include "graph/embedding_enumerator.h" #include "molecule/molecule.h" #include "molecule/molecule_arom_match.h" #include "molecule/molecule_exact_matcher.h" #include "molecule/molecule_inchi.h" #include "molecule/molecule_layered_molecules.h" #include "molecule/molecule_substructure_matcher.h" #include "molecule/molec...
ALGO
0.987779
6.325094
0bf54e4c-6db1-4b15-b613-057a899458c8
umar-07/Competitive-Programming-questions-with-solutions
asdasasdasd/main.cpp
#include <bits/stdc++.h> #define ll long long int #define debug(x) cerr << #x << " is " << x << " "; #define mod 1000000007 #define endl "\n" #define fast_input ios_base::sync_with_stdio(false); cin.tie(NULL); using namespace std; int main() { ll t; cin >> t; while(t--) { ll n, k, f; ci...
ALGO
0.999866
3.655686
1c9feaed-b81a-48a4-9cbf-fc86c24d8d4f
ArionDas/Leetcode_Solutions
1700-minimum-time-to-make-rope-colorful/minimum-time-to-make-rope-colorful.cpp
class Solution { public: int minCost(string colors, vector<int>& neededTime) { int n = colors.size(); vector<int> dp(n, -1); return calculateMinCost(n - 1, colors, neededTime, dp, 'A', neededTime[n - 1]); } // Recursive function to calculate the minimum cost int calculateMinCost...
ALGO
0.99973
6.753749
dafd24a8-d1db-458b-b5f9-2c5f37c5e7fa
fontanf/localsearchsolver
examples/sequencing/traveling_salesman_with_release_dates_main.cpp
/** * Traveling salesman problem with release dates * * Problem description: * See https://github.com/fontanf/orproblems/blob/main/orproblems/traveling_salesman_with_release_dates.hpp * */ #include "read_args.hpp" #include "localsearchsolver/sequencing.hpp" #include "orproblems/routing/traveling_salesman_with_...
ALGO
0.999331
6.055285
910b00c8-206c-4cd1-a245-b2edbe53d4dd
plackduriga183/math-homework
src/16.cpp
#include <iostream> using namespace std; int main() { int num1, num2; cout << "Enter two numbers: "; cin >> num1 >> num2; if (num1 > num2) { swap(num1, num2); } cout << "The larger number is: " << num1 << endl; return 0; }
ALGO
0.995575
3.614263
94b84c1c-f3db-4c23-928b-9640a06b5ebd
narendra646/Leetcode
2888-minimum-index-of-a-valid-split/minimum-index-of-a-valid-split.cpp
class Solution { public: int minimumIndex(vector<int>& nums) { map<int,int>mp; int n=nums.size(); for(int i=0;i<nums.size();i++) mp[nums[i]]++; int maxi_el=-1,maxi_fre=0; for(const auto &pair : mp) { if(pair.second>maxi_fre) { ...
ALGO
0.999994
5.55132
f8ac6637-09b9-4f6b-a2dd-2dd587cf6634
takerun/coding-competition
abc/abc385/d.cpp
// #pragma GCC optimize("unroll-loops") // #pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define endl "\n" typedef long long int int64; typedef unsigned long long int uint64; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); // input int...
ALGO
0.999969
5.106578
8aefaa20-9602-43f8-8c22-fedd75f453c2
byte-engineer/Drafts
cplusplus/Draft.cpp
// INFO---------------------------------------------------- // C++ is a very powerful staticly typed compiled language. // You can do anything with it. // Advanced Info------------------------------------------- // Any thing starts with '#' is a preprocessed action. // preprocessed actions get evaluated before compili...
TOOL
0.941019
4.229228
1400b3f2-6409-4d32-8ac9-26ea26b5996f
gopoma/competitive-programming
tasks/1472C++.cpp
//* sometimes pragmas don't work, if so, just comment it! //? #pragma GCC optimize ("Ofast") //? #pragma GCC target ("avx,avx2") //! #pragma GCC optimize ("trapv") //! #undef _GLIBCXX_DEBUG //? for Stress Testing #include <bits/stdc++.h> //? if you don't want IntelliSense using namespace std; // building blocks usi...
ALGO
0.999905
5.129063
2a9fe42f-91ff-4c9c-b077-204b90c472df
JainitBITW/CP
ladder1300/7.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, n) for (int i = a; i < n; i++) #define FOK(i, a, n) for (int i = n; i > a; i--) #define JALDI ios_base::sync_with_stdio(false); #define jaldi cin.tie(NULL); #define F first #define MP make_pair #define PB push_back #define S second #define nl cout << endl ...
ALGO
0.999952
3.717183
8b05895e-36fb-49ef-aec7-fa928580b15b
GraciousSaxena/HackerRank
(Easy) Find Squares in range.cpp
#include<bits/stdc++.h> using namespace std; typedef long long LL; int main() { int t; cin >> t; while(t--) { long long int a, b, ans = 0, i; cin >> a >> b; for(i=1; ; i++) { if (i * i > b) break; if (i * i <= b && i * i >= a) ans++; } cout ...
ALGO
0.999944
4.404034
11b050b5-850d-4f32-8812-0bcca3d58663
ZPNMiaoHeng/gem5
src/systemc/tests/systemc/misc/v1.0/dash3/speed.cpp
/***************************************************************************** speed.cpp -- Definition of the speedometer. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*************************************************************...
ALGO
0.887009
6.06311
61be155e-a289-4ff8-926d-52e53a353fb2
humayun-ahmad/online-judge-problems-and-solutions
Codeforces/540A Combination Lock.cpp
#include<bits/stdc++.h> #define INF 1073741824 #define ll long long #define ull unsigned long long #define PI acos(-1.0) #define Hare printf("here\n") #define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); //#define mp make_pair #define pb push_back #define pii pair<int,int> #define on(val,pos) val|(1<<pos) #...
ALGO
0.999867
3.324116
65901dde-1797-4466-a7ee-468deb95de40
jmanday/Master
TFM/library/opencv-3.2.0/modules/features2d/src/bagofwords.cpp
#include "precomp.hpp" namespace cv { BOWTrainer::BOWTrainer() : size(0) {} BOWTrainer::~BOWTrainer() {} void BOWTrainer::add( const Mat& _descriptors ) { CV_Assert( !_descriptors.empty() ); if( !descriptors.empty() ) { CV_Assert( descriptors[0].cols == _descriptors.cols ); CV_Assert( de...
ALGO
0.976439
6.581295
0457ee98-334b-42a6-88a6-a98dbd45f605
riadath/problem-solves
UVA/uva_10325.cpp
#include <bits/stdc++.h> using namespace std; #ifdef IHAVETOPEE #include "debug.h" #else #define debug(args...) #endif long long oll = 0; #define ll long long #define ull unsigned long long #define FIO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #defi...
ALGO
0.999983
3.885472
4a4311e6-c402-49d3-bfdf-ac89a3230f5d
geoffgeorgein/CP
1/677A.cpp
#include<iostream> #include<algorithm> #include<vector> #include<string> #include <bits/stdc++.h> using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input1.txt", "r", stdin); freopen("output1.txt", "w", stdout); #endif int n,t,b,k; string s; cin>>t; while(t--) { cin>>n; s=to_string(n);...
ALGO
0.999407
4.625461
bdd60c61-1848-4390-bce0-87d4782ba958
tongfs/leetcode
1991.找到数组的中间位置.cpp
/* * @lc app=leetcode.cn id=1991 lang=cpp * @lcpr version=21910 * * [1991] 找到数组的中间位置 */ #include "mylib.h" // @lc code=start class Solution { public: int findMiddleIndex(vector<int>& nums) { int sum = 0; for (auto x : nums) sum += x; for (int i = 0, cur = 0; i < nums.size(); i++) { ...
ALGO
0.999957
6.267242
a37c049b-fbc8-49a5-b489-b4586b7a0c63
PrateekRohilla/DSA-Fundamentals
old practice/practice/lockdown start/prime_optimised.cpp
//check prime or not - optimised //running loop till sqrt(n) #include <iostream> using namespace std; int main() { int t; cin>>t; while(t--){ long long n; cin>>n; int flag = 0; long long i; for(i = 2;i*i<=n;i++){ if(n%i == 0) { cout<<"No"; fla...
ALGO
0.999926
4.739224
81a61eae-05ae-4360-b950-b458f8c1abc2
GeekyMatrix/Code
Mathematics/Minimum Time Visiting All Points(1266).cpp
class Solution { public: int minTimeToVisitAllPoints(vector<vector<int>>& points) { int n = points.size(); int res = 0; for(int i = 1; i < n ; i++){ int x = abs(points[i][0] - points[i-1][0]); int y = abs(points[i][1] - points[i-1][1]); res += max(x,y); ...
ALGO
0.999923
5.689939
4f18b619-fe65-415b-9783-943f6eac1922
fool8474/Algorithm_Backjoon
Backjoon/1003_피보나치함수.cpp
#pragma once #include <iostream> #include <string> #include <math.h> #include <vector> #include <algorithm> #include <utility> using namespace std; pair<int, int> operator+ (pair<int, int> first, pair<int, int> second) { int x = first.first + second.first; int y = first.second + second.second; return pair<int,int>(...
ALGO
0.999836
4.077908
8297bd3e-1508-4c53-a822-db87819ab775
Kalinche/SDA_2021-22
Homework7/Task3.cpp
#include <iostream> #include <map> #include <vector> using namespace std; int main() { long n, k; cin >> n >> k; vector<long> nums; for (long i = 0; i < n; i++) { long num; cin >> num; nums.push_back(num); } vector<long> final(n, -1); for (long i = n - 2; i >= 0; i--) { for (int j = i + 1; j < n; j...
ALGO
0.999998
3.761792
890259bf-ab93-4e8c-83f1-dc20bdbfc1cc
WangShuoCode/NEUQ
1052.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int q[N]; int main() { int n; cin >> n; q[1] = 1, q[2] = 2; for ( int i = 3; i <= n + 1; ++ i ) { q[i] = q[i - 1] + q[i - 2]; } double res = 0; for ( int i = 1; i <= n; ++ i ) { res += (double)q[i + 1]...
ALGO
0.999126
3.527513
3e26c82a-fc7c-462f-8708-895f93ed4dbc
nabin0/CPP-Data-Structures-And-Algorith
1. Basic/Strings/maximum_frequent_char.cpp
#include <iostream> #include <algorithm> using namespace std; void maxFreqChar(string st) { int frequencyArr[26] = {0}; for (int i = 0; i < st.length(); i++) { frequencyArr[st[i] - 'a']++; } int mx = -1; char ch; for (int i = 0; i < 26; i++) { if (frequencyArr[i] > mx) ...
ALGO
0.999958
5.068655
ba19c9c9-7669-4792-a06e-aeb1a39e4237
junlong-gao/recreations
src/code_practise/uva/dp/1347/uva1347.cpp
// UVa1347 Tour // Rujia Liu #include<cstdio> #include<cmath> #include<algorithm> using namespace std; const int maxn = 50 + 5; double x[maxn], y[maxn], dist[maxn][maxn], d[maxn][maxn]; int main() { int n; while(scanf("%d", &n) == 1) { for(int i = 1; i <= n; i++) scanf("%lf%lf", &x[i], &y[i]); for(i...
ALGO
0.999469
3.664482
023a4373-f5c4-40cd-879a-1938e54e1641
dheeraj-2000/dsalgo
Algorithms/Prims.cpp
#include <bits/stdc++.h> #define INF 99999 #define V 7 using namespace std; void printGraph(int parent[V], int graph[][V]) { cout << "Edge \tWeight\n"; for (int i = 1; i < V; i++) { cout << parent[i] << " - " << i << " \t" << graph[i][parent[i]] << " \n"; } } int min_ele(int distance[V], bool...
ALGO
0.999892
4.00563
4c25ea61-8266-43d8-afe6-23ee70adbeba
STRUKTUR-DATA-SE-07-02/Modul-14
2211104053_Dhiya Ulhaq Ramadhan/Unguided/unguided1.cpp
#include <iostream> #include <string> #include <vector> #include <map> #include <iomanip> #include <algorithm> class Graph { private: std::vector<std::string> cities; std::map<std::string, std::map<std::string, int>> distances; public: void addCity(const std::string& city) { cities.push_back(city)...
ALGO
0.998103
5.603595
9f3e95f9-a5bc-4307-97e6-c3f6a2f147de
shahrohit/Interview_DS_Algo
2D_Arrays/ballFall.cpp
#include <vector> using namespace std; // ----------------------- Introduction ------------------------------------------ // Title : Where Will the Ball Fall // LeetCode No : 1706 // Difficulty : Medium // Topics : Array, Matrix // Link : https://leetcode.com/problems/where-will-the-ball-fall/ // --------------------...
ALGO
0.999995
6.241492
1e2f1e06-83b6-4a2c-8492-cc882f2cc6d7
dansdrivers/ndas4windows
mayfield/branches/spr-rc3/src/tools/frhed/FRHEDX/FRHEDX.cpp
#include "precomp.h" #include "FRHEDX.h" #include "std_defs.h" #include "des.h" typedef void (*LPFN_set_key)(const u4byte in_key[], const u4byte key_len); typedef void (*LPFN_encrypt)(const u4byte in_blk[4], u4byte out_blk[]); typedef void (*LPFN_decrypt)(const u4byte in_blk[4], u4byte out_blk[4]); typedef struct { ...
ALGO
0.986285
6.402491
493491da-e53e-4e23-8ca9-b099767bd2d5
benMcChesney/KinectHacks
ofxKinectBox2D/ofxVectorMath/src/ofxMatrix4x4.cpp
#include "ofxMatrix4x4.h" #include <limits> #include <stdlib.h> #if (_MSC_VER) #undef min // see: http://stackoverflow.com/questions/1904635/warning-c4003-and-errors-c2589-and-c2059-on-x-stdnumericlimitsintmax #endif inline bool equivalent(double lhs,double rhs,double epsilon=1e-6) { double delta = rhs-lhs; return ...
TOOL
0.987306
6.623003
1da96483-27ff-4485-824d-3e48de1f8a18
revyos-rocm/rocm-llvm
libc/src/stdbit/stdc_leading_ones_ull.cpp
#include "src/stdbit/stdc_leading_ones_ull.h" #include "src/__support/CPP/bit.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(unsigned, stdc_leading_ones_ull, (unsigned long long value)) { return static_cast<unsigne...
ALGO
0.966863
6.172969
0b924378-c999-455e-8824-a9b34a57ba98
gokullevitate/draggable
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
4b91844b-b8b3-4f5f-a470-c05de1435e5f
PixelOS-Fourteen/build
tools/zipalign/ZipAlign.cpp
#include "ZipFile.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> namespace android { // An entry is considered a directory if it has a stored size of zero // and it ends with '/' or '\' character. static bool isDirectory(ZipEntry* entry) { if (entry->getUncompressedLen() != 0) { return false...
TOOL
0.870303
6.038427
23cfd260-2b09-41a3-b5c6-295bd3050e84
tarek99samy/CodeForces
A_Problems/493A-Vasya and Football.cpp
#include<bits/stdc++.h> using namespace std; int main() { string team1, team2; cin>>team1>>team2; int n; cin>>n; map<int, int> a; map<int, int> h; int min; char ch; int num; char card; while(n--) { cin >> min >> ch >> num >> card; if (ch == 'h'&&card == 'y') { if (h.count(num) == 0) ...
ALGO
0.988079
3.142866