uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
2d08e32a-fcf1-4115-9acf-65718bfee30a
JackWetherell/self-driving-car-path-planning
src/Eigen-3.3/lapack/eigenvalues.cpp
#include "lapack_common.h" #include <Eigen/Eigenvalues> // computes eigen values and vectors of a general N-by-N matrix A EIGEN_LAPACK_FUNC(syev,(char *jobz, char *uplo, int* n, Scalar* a, int *lda, Scalar* w, Scalar* /*work*/, int* lwork, int *info)) { // TODO exploit the work buffer bool query_size = *lwork==-1;...
ALGO
0.990218
4.671507
0099b771-36a3-490e-b93a-ea8d281bc0bc
bossxu/acm
比赛/zoj/15/j.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<queue> #include<stack> #include<vector> #include<cmath> #include<set> #include<cstdlib> #include<functional> #include<climits> #include<cctype> #include<iomanip> using namespace std; typedef long long ll; #define INF 0x3...
ALGO
0.999901
3.626249
6c86f4bb-13e6-4288-9b7f-7a8045301220
aarthirs/DSA
c++/loop/concatenation_of_array.cpp
class Concatenation { public: vector<int> solve(vector<int> input) { vector<int> temp = input; for (int i=0;i<=input.size()-1;i++){ temp.push_back(input[i]); } return temp; } };
ALGO
0.999266
5.073292
02eff498-683a-430b-aaca-5f23ea0c8e1d
binhdk/ImageMagick
app/src/main/jni/ImageMagick/libicu4c-64-2/samples/coll/coll.cpp
/** * This program demos string collation */ const char gHelpString[] = "usage: coll [options*] -source source_string -target target_string\n" "-help Display this message.\n" "-locale name ICU locale to use. Default is en_US\n" "-rules rule Collation rules file (overrides locale...
TOOL
0.969802
6.092283
d0710048-f72a-441d-b1c0-8ddca869dbc8
ishandutta2007/codeforces
ftiasch/normal/1677/F.cpp
#line 1 "/home/ftiasch/Documents/shoka/binom.h" #include <vector> template <typename ModT> struct Binom { Binom(int n) : fact(n), inv_fact(n) { fact[0] = inv_fact[0] = inv_fact[1] = ModT(1); for (int i = 2; i < n; ++i) { inv_fact[i] = ModT(ModT::MOD - ModT::MOD / i) * inv_fact[ModT::MOD % i]; } ...
ALGO
0.9997
5.005021
5fcc2dc2-c240-4db5-87dc-8cabbceb36b9
shreejitverma/SDE-Interview-Prep
LeetCode/C++/maximum-number-of-darts-inside-of-a-circular-dartboard.cpp
// Time: O(n^2 * logn) // Space: O(n) // angle sweep solution // great explanation: // https://leetcode.com/problems/maximum-number-of-darts-inside-of-a-circular-dartboard/discuss/636345/Python-O(n3)-and-O(n2logn)-solution-explained-in-detail-with-pictures class Solution { public: int numPoints(vector<vector<int>...
ALGO
0.999905
6.776709
bff09cc8-8fc1-4ffe-a695-6368969223c3
rakeem996/Leet-Code-questions
Linked_List/linked-list-cycle-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *detectCycle(ListNode *head) { if(head == NULL) return head; ListNode* slow = head; ListN...
ALGO
0.999952
5.535294
ea57462b-6ede-4a87-9ecc-26c521c5955a
bothemrun/CAP-Complete-Algorithmic-Programming
Leetcode_All_Solved/1022.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999966
6.252892
8a9b76b2-48db-4311-8034-a44a1865fc28
SamuellH12/Competitive-Programming-Algorithms
Solutions/CSES/Distinct Values Subsequences.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; // https://cses.fi/problemset/task/3421 const ll MOD = 1e9 + 7; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; map<int, ll> mp; for(int i=1, x; i<=n && cin >> x; i++) mp[x]++; ll ans=1; ...
ALGO
0.999959
4.453493
7606faac-32ea-480b-96bc-84fa99e38ede
terrydamasio/studies-c
Lista de Exercicios/Algoritmo de busca/binaria_1.cpp
#include <stdio.h> #include <iostream> int main () { int vetor[] = {2, 4, 6, 8, 10, 12, 13, 14, 16, 18}; int ini = 0, fim = 9, meio; while (ini <= fim) { meio = (ini + fim) / 2; if (vetor[meio] == 13) { cout << "Encontrado na posição: " << meio << endl; break; ...
ALGO
0.996557
5.284311
a7fb4a36-ad3a-442a-a200-81c78578aa29
kylepham/adventofcode23
day1/part1/main.cpp
// _oo0oo_ // o8888888o // 88" . "88 // (| -_- |) // 0\ = /0 // ___/`---'\___ // .' \| |// '. // / \||| : |||// \ // / _||||| -:- |||||- \ ...
ALGO
0.998894
4.983905
d6030746-5524-4583-9f1d-84c5e372c0dd
iandailis/Control-Flow-Analysis
src/graph/graph.cpp
#include "graph.h" Graph::Graph(vector<tuple<int, int, int, int>> input) { graph_.resize(input.size()); size_t i; for (i=0; i < input.size(); i++) { if (get<2>(input[i]) != -1) { graph_[i].push_back(make_pair(get<2>(input[i]), get<1>(input[get<2>(input[i])]))); } if (get<3>(input[i]) != -1) { graph_[i]....
ALGO
0.9386
4.457236
d5980928-0488-4bb3-a9ad-7a123e500ecc
SumitRaikwar18/Hacktoberfest
C++/QuickSort.cpp
// Introduction to Quick Sort // QuickSort is a Divide and Conquer algorithm // We take an element as pivot and we use partition() function to sort the before and after elemets of the pivot. // Following are the ways in which you can take a pivot element : // 1) Pick first element as pivot // 2) Pick last element as...
ALGO
0.999969
5.849521
36688a41-0719-4a72-9d45-bd63c169fb4d
Hardyy00/Codeforces
1400-rating/wooden_toy_festival.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; using namespace std; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for(int i=a;i<=b;i++) #define all(a) (a).begin(), (a).end() #define...
ALGO
0.999895
5.056406
049d8917-2742-4810-86ab-7d15836eda92
TheMisterFox01/CppMaster
calc/calc.cpp
#include "Calc.h" #include <string.h> #include <ctype.h> calc::calc(void) : eval() { // save them binary_table operations = plugins.dll_binary_table; unary_table functions = plugins.dll_unary_table; // edit data operations["+"] = [](double a, double b) -> double {return a + b; }; operations["-"] = [](doub...
TOOL
0.946603
4.743498
9115e57e-ee43-4e1f-9d43-66285bf11a86
Tasmia22/Parallel-Programming
Thread(Dynamic LoadBalancing)/DecreasingChunks.cpp
#include <iostream> #include <cmath> #include <queue> #include <mutex> #include <thread> using namespace std; double sum = 0; queue<int> taskQueue; mutex mtx; double compute(int i) { int start = i * (i + 1) / 2; int finish = start + i; double return_val = 0.0; for (int j = start...
ALGO
0.999957
5.100377
34ad1fde-efa0-44f5-bd45-84ee80e55421
ishandutta2007/codeforces
piob/normal/486/A.cpp
#include <bits/stdc++.h> #define REP(a,b) for(int a=0; a<(b); ++a) #define FWD(a,b,c) for(int a=(b); a<(c); ++a) #define FWDS(a,b,c,d) for(int a=(b); a<(c); a+=d) #define BCK(a,b,c) for(int a=(b); a>(c); --a) #define popcount __builtin_popcount #define x first #define y second #define pb push_back #define re real() #de...
ALGO
0.999797
3.597972
4516bb4f-cac8-47f1-86da-98513fe076e6
harungunaydin/Competitive-Programming-Solutions
JBOI/JBOI 2009/Coins2.cpp
#include <iostream> #include <fstream> #include <set> #define FOR(i,a,b) for(i=a; i<=b; i++) #define FOR2(i,n) FOR(i,0,n-1) #define all(x) x.begin(),x.end() using namespace std; set < pair < int , char > > st4; set < int > st,st2,st3; int A[10][10]; char C[5]; char find(int i,int x) { int j; if(C[i] == '<') { FOR(...
ALGO
0.99995
3.256077
33968eee-2dad-4378-b1dd-46248a3478d3
JihyeKim2024/GVM
codes/Fig5a_complete_networks.cpp
#define _CRT_SECURE_NO_WARNINGS #include "Random.h" #include<iostream> #include<vector> #include<cmath> #include<set> #include<algorithm> using namespace std; random_device rd; splitmix gen(rd); int N = 10000, t_ensemble = 1, iq = 2, fq = 6, dq = fq - iq; double t_max = 1000000000.0, dt = 1.0 / N; uniform_int_distribut...
ALGO
0.999482
3.870472
fd6891e2-10dc-4ecc-a609-e0a5ba256bc6
harsh-govind/codes-leetcode
Check if all levels of two trees are anagrams or not - GFG/check-if-all-levels-of-two-trees-are-anagrams-or-not.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int data; struct Node* left; struct Node* right; }; Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp-...
ALGO
0.999697
6.801124
b6789b83-49a9-4563-8fc7-ade07d4d139d
nkarapet42/CPP_Modules
CPP_09/ex01/RPN.cpp
#include "RPN.hpp" #include <string> #include <cctype> #include <climits> #include <cstddef> RPN::RPN() {} RPN::RPN(const RPN&) {} RPN& RPN::operator=(const RPN&) {return (*this);} static bool isOperator(int c) { if (c == '+' || c == '-' || c == '*' || c == '/') return true; return false; } static bool check(s...
ALGO
0.99945
4.366125
dba7474d-196c-45c6-941d-e44640387124
Virender-45/Learn-C-plus-plus
stl/Algorithms/reverse.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { vector<int> vec = {1, 2, 3, 4, 5, 6, 7, 8, 9}; vector<int> vec2 = {10, 20, 30, 40, 50, 60, 70, 80, 90}; reverse(vec.begin(), vec.end()); // reverse(vec.begin() + 3, vec.begin() + 7); //For a specific range for(auto...
ALGO
0.997006
3.748302
2b0291d0-0baa-4308-83aa-22a51d29e888
eggag32/Competitive-Programming
CSES/Olympiads (13 points).cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef pair<int, int> pi; #define debug(x) cerr << #x << ": " << x << endl; #define debug2(x, y) debug(x) debug(y); #define repn(i, a, b) for(int i...
ALGO
0.999974
3.436975
6f489aee-fb90-4d2d-b8a4-7fcbdf94813f
nakul1010/6companies30Days_Challenge
Amazon/7_1ST_NON_REPAETING_D.cpp
/*First non-repeating character in a stream https://practice.geeksforgeeks.org/problems/first-non-repeating-character-in-a-stream1216/1 */ string FirstNonRepeating(string str) { queue<int>q; int arr[26] = {0}; int n = str.size(); for(int i=0; i<n; i++) { arr[(str[i]-'a')]++; ...
ALGO
0.999728
4.075604
8674ad78-b57e-40e8-8d86-95ebaeb53202
isheshukov/vkr-2021
lib/eigen-3.3.8/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXf a = ArrayXf::Random(5); a *= 2; cout << "a =" << endl << a << endl; cout << "a.abs() =" << endl << a.abs() << endl; cout << "a.abs().sqrt() =" << endl << a.abs().sqrt() << endl...
ALGO
0.932255
3.130341
a550ef2c-1efc-4ebf-8f90-589a0c751155
siddhantkhandelwal/competitiveprog-submissions
leetcode/#GoGetIt/785.cpp
class Solution { public: bool isBipartite(vector<vector<int>> &graph) { int n = graph.size(); map<int, int> colour; queue<int> q; for (int i = 0; i < n; i++) { if (colour.find(i) != colour.end()) { continue; } ...
ALGO
0.999769
5.891057
f53cbbf5-a24a-4716-bc32-e23678e9ee9b
mandalrajatsuvra/dsa-cpp
Arrays/ThreeSumClosest.cpp
#include "iostream" #include "vector" #include "algorithm" using namespace std; class Solutions{ public: int threeSumClosest(vector<int> &A, int B) { int closestSum = INT_MAX; int diff = INT_MAX; sort(A.begin(), A.end()); for(int i=0; i< A.size(); i++){ int j = i+1; ...
ALGO
0.999947
5.379269
0a3abefc-e170-4e23-b971-0b6ec4755897
fsjhhh/acm_title
cpp/模板/饮料换购_数学.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <deque> #define IOS ios::sync_with_stdio(0); \ cin.tie(0); \ cou...
ALGO
0.999874
3.858227
a2811eb7-79b7-48f1-aea5-b0815df3789e
Min-03/Algorithm
08/W1/2023_08_04/2230.cpp
#include <bits/stdc++.h> using namespace std; int nums[100'000]; int main() { ios_base :: sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, m; cin >> n >> m; for (int i = 0; i < n; i++) { cin >> nums[i]; } int lp = 0; int rp = 0; int ans = -1; sort...
ALGO
0.999999
4.455664
99c8c50e-ef50-451f-8165-c3b26dc83bb8
sdkysfzai/flutter4f
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.998859
6.785645
696aa520-3bf2-4b3f-9473-ad3ce5316013
nachiketkanore/Codeforces-Solved-Problems
580_D.cpp
#include <bits/stdc++.h> #define int long long #define sz(x) (int)(x.size()) using namespace std; const int N = 20; const int inf = 1e18; const int mod = 1e9 + 7; int n, m, k, a[N], cost[N][N], dp[1 << 19][N]; int solve(int mask, int taken, int last){ if(taken == m) return 0; if(taken > m) return -inf; int &a...
ALGO
0.999882
4.067835
52a127da-1af7-48a6-b569-3831b9a31128
BismarckSVBP/Codechef-Contest-Solution
149/problem3.cpp
//https://www.codechef.com/START149D/problems/P1149 #include <bits/stdc++.h> using namespace std; int main() { // your code goes here int a,b,c; cin >> a >> b >> c; int d = a-b; if(d<0){ d =-d; } if(d <= c){ cout << "Yes" << endl; } else{ cout << "No" << endl...
ALGO
0.99999
3.607625
e235b749-7fca-4fcf-8848-eba913bbbeb4
das-ankur/Daily-Problem-Solving
2095-delete-the-middle-node-of-a-linked-list/2095-delete-the-middle-node-of-a-linked-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* deleteMiddl...
ALGO
0.999867
5.937148
542dbe1c-ba3c-4ed7-9610-9b7b5ed2f370
rockersabbier/c-c---solves102-
673.cpp
#include<bits/stdc++.h> #include<string.h> #define SIZE 256 char stack[SIZE]; using namespace std; int top; void push (char c){ ++top; stack[top] = c; } void pop( ){ --top; } int main() { int i,l,n,flag; char c[SIZE]; scanf("%d",&n); getchar(); while(n--){ stack[SIZE] = '\...
ALGO
0.999871
3.800077
92843119-5e97-481b-aa27-038f8729ec11
mahfuzswe/LearningJava
TEMP/Q_Coordinates_of_a_Point.cpp
#include<bits/stdc++.h> using namespace std; int main(){ float x,y; cin>>x>>y; if(x==0.0 && y==0.0) cout<<"Origem\n"; else if(x>0.0 && y>0.0) cout<<"Q1\n"; else if(x<0.0 && y>0.0) cout<<"Q2\n"; else if(x<0.0 && y<0.0) cout<<"Q3\n"; else if(x>0.0 && y<0.0) cout<<"Q4\n"; else if( x == 0.0 &&...
ALGO
0.999921
3.76287
6e3d35fc-23b9-4137-a804-b81662cb03c8
AnuragVinodh/C-Projects
NthRootFunc.cpp
////////////////////////////////////////////////////////////// #include <limits> #include <stdlib.h> ////////////////////////////////////////////////////////////// #ifndef MARMOSET_TESTING #include <iostream> using namespace std; float NthRoot(const float S, const int N, const float precision); #endif //////////...
ALGO
0.998591
5.461972
8cbe3a9c-705a-41b5-9287-2aa7152af24a
lammps/lammps
lib/gpu/lal_beck.cpp
/*************************************************************************** beck.cpp ------------------- Trung Dac Nguyen (ORNL) Class for acceleration of the beck pair style. ______________________________________________...
TOOL
0.969035
6.887662
7c57e36d-e759-4b21-98df-8e7d8d507143
anurag-singh2001/My-DS-practice
Tree/pre&suc.cpp
void findPreSuc(Node *root, Node *&pre, Node *&suc, int key) { // Your code goes here if (root == NULL) return; findPreSuc(root->left, pre, suc, key); if (root and root->key < key) pre = root; else if (root and root->key > key) { if (suc == NULL) suc = root;...
ALGO
0.999998
4.930771
fde789c1-ec12-4e5c-ac58-a95482da8f69
Prithvi-Velicheti/gem5-ramulator2
gem5/src/systemc/tests/systemc/misc/v1.0/dash6/dist.cpp
/***************************************************************************** dist.cpp -- Implementation of the odometers. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /************************************************************...
ALGO
0.993434
6.558409
3469d332-28ab-4d95-ab6a-180e7aa86991
Doraemon9z/leetcode
Binary Tree/235.二叉搜索树的最近公共祖先.cpp
/* * @lc app=leetcode.cn id=235 lang=cpp * * [235] 二叉搜索树的最近公共祖先 */ // @lc code=start /** * 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: Tree...
ALGO
0.999995
6.917636
402b650d-a5cf-4aa5-a3af-4e586b0c1665
Aditya14442/CompetitiveProgramming
playground/vjudge_contest_inevitable/Water_Water_Everywhere copy.cpp
#include <iostream> #include <vector> using namespace std; int solution(vector<vector<int>>& array){ vector<vector<int>> prefix2d(array.size(),vector<int>(array[0].size()+1,0)); for(int i=0;i<array.size();i++){ for(int j=0;j<array[0].size();j++){ prefix2d[i+1][j+1] = prefix2d[i-1][j]+prefix...
ALGO
0.999587
4.294455
fab5ab65-63ec-42bf-838d-5b75e9306c0e
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_2472_19.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, a[1010]; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n); cout << a[n / 2]; return 0; }
ALGO
0.99969
4.286598
b54a8cdc-f83c-45bf-b169-54247aece77a
shreyashji/Dsa-essential
13.Stack/4.stockspan.cpp
#include <iostream> #include <stack> #include <string> #include <bits/stdc++.h> using namespace std; //o(n) void stock_span(int prices[], int n ,int span[]){ stack <int> s; //indices of the days s.push(0); span[0]=1; //hardcoding //loop for rest of the days for(int i=1; i<=n; i++){ int currentPrice = prices[i]; ...
ALGO
0.999763
5.170808
0e6cd24a-ddae-4a61-ad8d-f0d8866bcd49
PravarAnu/Pre-Placement-Program-Ineuron
DSA/Recusrion/Assignment 10/Question01.cpp
#include <iostream> using namespace std; bool powerOf3(int num, int three){ if(three == num){ return true; } if(three > num){ return false; } return powerOf3(num, three * 3); } int main() { cout<<powerOf3(81, 1); return 0; }
ALGO
0.999735
4.24985
8f320aff-f3b3-4745-98ef-c7dd723a53b8
Akrobatik/ps
BaekJoon/10000/10170.cpp
// Title : NFCWestvsNorth // Link : https://www.acmicpc.net/problem/10170 // Time : 0 ms // Memory: 2020 KB #include <bits/stdc++.h> using namespace std; constexpr const char* kStr = "NFC West W L T\n" "-----------------------\n" "Seattle 13 3 0\n" "San Francisco 12 4 0\n" "Arizona 10 ...
ALGO
0.998909
3.334798
cf7df15f-0c6e-428c-8d10-2c4bde950553
ee08b397/Lintcode-7
Cpp/Maximum-Subarray.cpp
class Solution { public: /** * @param nums: A list of integers * @return: A integer indicate the sum of max subarray */ int maxSubArray(vector<int> nums) { // write your code here if (nums.size() == 0) return 0; int res = nums[0], cnt = 0; for (int i = 0; i < nums....
ALGO
0.999922
5.987826
bc6ec8c9-6990-41ba-a579-2eb248ac2a63
hirakuuuu/kyopro
ABC/257/e.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for(int i = a; i < n; i++) #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> const int MOD = 1000000007; const int mod = 998244353; // 問題 // https://atcoder.jp/contests/abc257/tasks/abc257_e int main(){ int n; cin >> n; ...
ALGO
0.999933
4.459975
d425d6aa-56ab-4645-be10-e8300b53f9f1
Nguyenhieu277/DSA_PTIT
bien_doi_ve_1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1000000007; #define max_n 1001 #define MAX 1000001 #define Quick() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); /*created by: HiuDev*/ void convert(int n){ queue<pair<int, int>> q; q.push({n, 0}); whil...
ALGO
0.999906
4.173096
d35e89a0-b321-4fc4-90ed-f5f0f95d6ffa
POC-2025/leetcode
solution/1800-1899/1850.Minimum Adjacent Swaps to Reach the Kth Smallest Number/Solution.cpp
class Solution { public: int getMinSwaps(string num, int k) { string s = num; for (int i = 0; i < k; ++i) { next_permutation(begin(s), end(num)); } vector<int> d[10]; int n = num.size(); for (int i = 0; i < n; ++i) { d[num[i] - '0'].push_back(i...
ALGO
0.999986
6.030909
80333f26-e882-4bae-b6b5-b85c65a151d9
risha2004/GFG
Difficulty: Easy/Ceil The Floor/ceil-the-floor.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User code template class Solution { public: vector<int> getFloorAndCeil(int x, vector<int> &arr) { // code here int n = arr.size(); int floor = -1; in...
ALGO
0.999955
5.785737
c8f5a397-957e-484b-986e-b74eb517f455
odabasi52/IUC-Computer-Engineering
2-1/Data Structures Practices/Tree Algorithms/BST_LowestCommonAncestor.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node* left; Node* right; }; bool create_path(Node *root, int num, vector<Node*>& path) { if (root == NULL) return false; path.push_back(root); if (root->data == num) return true; ...
ALGO
0.999968
5.122733
bba98ada-cc69-49e6-87cf-de1757670fc0
eraysr378/CSE312-Operating_Systems-GTU
HW1/RealTime/PARTB_4/src/multitasking.cpp
#include <multitasking.h> #include <helper.h> using namespace myos; using namespace myos::common; Process ProcessManager::processTable[256]; BlockedList ProcessManager::blockedList = BlockedList(); ReadyQueue ProcessManager::readyQueue = ReadyQueue(); Process::Process() { cpustate = (CPUState *)(stack + 4096 - si...
TOOL
0.997045
3.36998
41d2747e-95a0-46df-a1a8-0b9e187c7a13
QbitQuantum/Basics
Исходники/alarmlist.cpp
// update an alarm so that the systemtime reflects the next time the alarm will go off, based on the last_check time bool UpdateAlarm(SYSTEMTIME &time, Occurrence occ) { FILETIME ft_now, ft_then; ULARGE_INTEGER uli_then; switch(occ) { case OC_DAILY: case OC_WEEKDAYS: case OC_WEEKLY: time.wDay = last_check.wDa...
TOOL
0.870438
5.209907
ebfe245e-51b8-408b-962d-20469cda8c42
Deepak-Bisht-dev/DAA_LAB
Week8/Wk8Prblm2.cpp
#include<iostream> #include<algorithm> #include<limits.h> using namespace std; int find(int i,int p[]){ while(p[i]!=i) i=p[i]; return i; } void union1(int i,int j,int p[]){ int a=find(i,p); int b=find(j,p); p[a]=b; } int kruskals(int **g,int V){ int res=0; int parent[V]; for(...
ALGO
0.999959
4.054153
ac3ba9d7-00d3-453f-9162-20583dbe5f2c
surazjaiswal/FAANG-Interview-Questions
3. Stacks/generateParenthesis.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<string> ans; vector<string> generateParenthesis(int n) { char str[20]; generateBrackets(str, 0, 0, 0, n); return ans; } void generateBrackets(char *str, int i, int open, int close, int n) { ...
ALGO
0.999821
4.620791
b25dddb1-603b-4b18-8ecd-82e077037b42
brlarsen/SummerNodeProject
SummerNodeProject/Model/HashTable.cpp
#include "HashTable.hpp" #include <iostream> using namespace std; //constructor / destructor template <class Type> HashTable<Type> :: HashTable() { this -> capacity = 101; this -> size = 0; this -> efficiencyPercentage = .667; this -> front = new HashNode<Type>(); HashNode<Type> * currentEnd =...
ALGO
0.885499
3.376816
5d308667-0da8-42df-b25e-b4d38d1116d4
Mohamed-Khalifa12/Problem-Solving
Sign of the Product of an Array/Algo.cpp
#include <iostream> #include <vector> using namespace std; int arraySign(vector<int>& nums); int main() { vector<int> nums = {-1,1,-1,1,-1}; int result = arraySign(nums); cout<< result; } int arraySign(vector<int>& nums) { int n = nums.size(); int count = 0; for(int i = 0; i < n; i++) { ...
ALGO
0.99998
4.942752
d8985fbd-cebd-4b2e-ac18-41ba78ded528
ItsMeShashu/LeetCode-Bucket
Detect Loop in linked list - GFG/detect-loop-in-linked-list.cpp
//{ Driver Code Starts //Initial template code for C++ #include <bits/stdc++.h> using namespace std; struct Node { int data; Node* next; Node(int val) { data = val; next = NULL; } }; void loopHere(Node* head, Node* tail, int position) { if(position==0) return; No...
ALGO
0.999798
4.548227
f1ea70ae-43e7-4163-b9ce-c1b41b774680
leokang123/Algorithm
1.7.BFS/불.cpp
#include <bits/stdc++.h> using namespace std; #define X first #define Y second #define MAX 1001 int dx[4] = {1,0,-1,0}; int dy[4] = {0,1,0,-1}; char board[MAX][MAX]; int dist1[MAX][MAX]; int dist2[MAX][MAX]; int main(void) { cin.tie(nullptr); ios::sync_with_stdio(false); int n,m; int success = 0; ...
ALGO
0.999938
4.882501
8cbe956f-1e9d-473e-b447-4eccadcc31f1
raincross7/code-similarity
codes/train_code/problem206/problem206_429.cpp
#include<bits/stdc++.h> #define lln long long int #define llu unsigned lln #define sc(n) scanf("%d",&n); #define scl(n) scanf("%lld",&n); #define scd(n) scanf("%lf",&n); #define pf(res) printf("%d\n",res); #define pfl(res) printf("%lld\n",res); #define pfd(res) printf("%lf\n",res); #define maxii 100005 using namespace...
ALGO
0.994913
3.252978
a1b8c280-c125-456c-86c6-0808d65d0023
Shivam-TyagiG/LeetCode-Solutions
1416-restore-the-array/1416-restore-the-array.cpp
#define mod 1000000007 #define ll long long int ll dp[100001]; ll solve(string &s,ll k,int pos) { if(pos==s.length()) return 1; if(dp[pos]!=-1) return dp[pos]; ll ans=0; ll x=0; for(int i=pos;i<s.length();i++) { x=(x*10)+(s[i]-'0'); if(x<=k && x>=1ll) { ...
ALGO
0.999846
5.528982
8d4451ed-29db-457b-818d-b8d0a011f660
caiopetruccirosa/mc721-2023s1
contest-2023-05-26/E.cpp
#include <bits/stdc++.h> #define _ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long using namespace std; vector<ll> is_possible(ll a, ll b) { if (a == b) return { a }; if (a > b) return vector<ll>(); vector<ll> v = is_possible((a*2), b); if (v.size() > 0) {...
ALGO
0.999978
4.264997
da20d009-bcf5-45d7-a132-f5cfca57136c
sammig6i/Leetcode
203-remove-linked-list-elements/remove-linked-list-elements.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* removeEleme...
ALGO
0.999953
6.006734
30cb42d5-023f-4d8e-bad9-9949fefbeb62
DreadVectorStudios/DistributedUnrealEngine
Engine/Source/ThirdParty/hlslcc/hlslcc/src/hlslcc_lib/lower_discard.cpp
/** * \file lower_discard.cpp * * This pass moves discards out of if-statements. * * Case 1: The "then" branch contains a conditional discard: * --------------------------------------------------------- * * if (cond1) { * s1; * discard cond2; * s2; * } else { * s3; * } * * becomes: * * temp = false; * ...
ALGO
0.880735
7.624918
0b4a6773-c60b-4c13-9dba-33b4a7a89636
StevenMaMei/Competitive-Programming
Contest/Codeforces/Educational_div2_round74/D/main.cpp
#include <bits/stdc++.h> #define ff first #define ss second #define fore(i,a,b) for(int i=a,colchin=b;i<colchin;++i) #define pb push_back #define ALL(s) s.begin(),s.end() #define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define SZ(s) int(s.size()) using namespace std; typedef long long ll; int main(){F...
ALGO
0.999953
3.870878
86b1bdd4-97a0-46a3-bb1b-a62683060797
mariarbelen/projectsC
areapormt.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; double area(double a){ return (3.14 * ((a*a)/4)); } double area(int a, int b){ return a * b ; } double area(int a, int b, int c){ return (0.5 * a) * (b + c) ; } double area(int a, int b, int c, double s){ return sqrt(s * (s...
ALGO
0.993652
3.959141
2280cc36-6ab2-4f2c-b747-be23b213425e
MahendraSH/dsa-cpp
BinarySearch/bsAns/pro5.cpp
// 5.##Problem Statement : You are given an array of integers ‘arr’ and an integer i.e.a threshold value ‘limit’.Your task is to find the smallest positive integer divisor, such that upon dividing all the elements of the given array by it, the sum of the division’s result is less than or equal to the given threshold va...
ALGO
0.999997
5.039502
fcf2e8ca-e00f-4460-88a5-aeed76e05fcd
MarcinLGit/Text-Editor
src/lib/lcs.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> std::vector<char> fill_dyn_matrix( std::string &x, std::string &y) { int m = x.length(); int n = y.length(); std::vector<std::vector<int>> L(m + 1, std::vector<int>(n + 1)); // matrix L for (int i = 1; i <= m; i++) { ...
ALGO
0.998451
4.980743
998dc5cc-c911-4594-b9ba-31688265fd16
sarvex/leetcode-bhai
solution/2600-2699/2609.Find the Longest Balanced Substring of a Binary String/Solution.cpp
class Solution { public: int findTheLongestBalancedSubstring(string s) { int zero = 0, one = 0; int ans = 0; for (char& c : s) { if (c == '0') { if (one > 0) { zero = 0; one = 0; } ++zero; ...
ALGO
0.999991
6.029059
54646f6a-546f-499b-8c6e-7bf90c6a2413
zeroplusone/AlgorithmPractice
NCKUCSIE/CSIE-2-Hashmats_war.cpp
#include<iostream> #include<cstdlib> #include<cstdio> #include<cmath> using namespace std; int main() { long long int a,b,c; while(scanf("%lld %lld",&a,&b)!=EOF) { c=a-b; if(c<0) c=(-1)*c; printf("%lld\n",c); } return 0; }
ALGO
0.999745
3.03963
27348819-f4b4-4c46-ab05-d7f98147c01c
hruif/Codeforces
Round_708_Div.2/Round 708 Div. 2/M-arrays.cpp
#include <iostream> #include <fstream> #include <vector> #include <utility> #include <string.h> #include <algorithm> #include <math.h> #include <string> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <stack> #include <iomanip> #include <climits...
ALGO
0.999938
5.094159
052dd596-95fe-4949-870c-e9a090f1238c
sahilkhose/stereo
matrix.cpp
#include "matrix.h" #include <algorithm> #include <math.h> #define SWAP(a,b) {temp=a;a=b;b=temp;} #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) static FLOAT sqrarg; #define SQR(a) ((sqrarg=(a)) == 0.0 ? 0.0 : sqrarg*sqrarg) static FLOAT maxarg1,maxarg2; #define FMAX(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > (max...
ALGO
0.999762
5.139194
4c536467-34a5-41a0-871a-47b0283e712d
vishallpanwar/Recursion
Easy/power-of-n.cpp
#include<iostream> using namespace std; int power(int x, int n){ // Base case : Agr power 0 hojati hai to return 1 if(n==0) return 1; // Recursive relation return x * power(x, n-1); } int main(){ int x, n; cin>>x>>n; cout<<power(x, n); return 0; }
ALGO
0.999977
5.368592
6e85f4cb-879c-4ef6-b2d3-ab7f20e27d5b
laljarus/Path-Planning-Project
src/Eigen-3.3/unsupported/doc/examples/EulerAngles.cpp
#include <unsupported/Eigen/EulerAngles> #include <iostream> using namespace Eigen; int main() { // A common Euler system by many armies around the world, // where the first one is the azimuth(the angle from the north - // the same angle that is show in compass) // and the second one is elevation(the angl...
ALGO
0.989945
5.125681
cdff5fe6-1c93-4902-b2c3-1e31e478ddb3
maneesh-123/PC-app
bin_exponentiation.cpp
long long int bin_exponentiation(long long int a, long long int n){ if(n==0) return 1; long long int result= bin_exponentiation(a,n/2); if(n%2==0) return result*result; else return result*result*a; }
ALGO
0.999487
3.597705
8687d34e-9bed-431c-9834-517cd39a648b
i-X-ce/competitive-programming
ABC/370B.cpp
/* g++ XXX.cpp ./a.out */ #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<vector<int>>a(n, vector<int>(0)); for (int i=0;i<n;i++){ for (int j=0;j<=i;j++){ int bf; cin >> bf; a.at(i).push_back(bf); } } int ans = 1; for (int i=0;i<n;i++){ int in = i ...
ALGO
0.999811
3.575693
bda3b6d3-d112-4695-9a05-5d86ae00ee75
samiazam00/my-work
c, c++, and x86/c++/traveling.cpp
/* Samreen Azam (sa3tnc) * 12/3/19 * traveling.cpp */ #include <iostream> #include <stdio.h> #include <stdlib.h> #include <algorithm> using namespace std; #include "middleearth.h" float computeDistance (MiddleEarth &me, string start, vector<string> dests); void printRoute (string start, vector<string> dests); in...
ALGO
0.999813
4.958958
c516c701-ea14-4343-bad4-f3a0222042e1
dkondakova/OS-PThreads
19lab/old.cpp
#include <iostream> #include <stdlib.h> #include <unistd.h> #include <list> #include <algorithm> #include <iterator> #include <pthread.h> #include <string.h> #include <errno.h> #include <signal.h> using namespace std; #define min(a, b) a < b ? a : b #define STR_SIZE 80 #define SUCCESS 0 #define ERRNO_SET 0 #define ER...
ALGO
0.999752
4.694677
1f1aba25-cacd-4ff9-84ab-8981ab40572c
shreyabrruuh/online-
compiler/code/cpp/11ff584f-ae9f-46bb-85c2-2e1ea8ce31fb.cpp
#include <iostream> #include<string> using namespace std; bool isPalindrome(string s) { int n=s.length(); int left=0; int right=n-1; while(left<right){ if(!isalnum(s[left])){ left++; continue; } if(!isalnum(s[right])){...
ALGO
0.999747
5.490076
66295231-cad1-4c4d-90d6-b9b661083dee
allem40306/Competitive-Programming
codeforce/cf149B.cpp
#pragma GCC optimize("O2") #include <bits/stdc++.h> using namespace std; using LL = long long; using ULL = unsigned long long; using PII = pair<int, int>; using PLL = pair<LL, LL>; using VI = vector<int>; using VVI = vector<vector<int>>; const int INF = 1e9; const int MXN = 0; const int MXV = 0; const double EPS = 1e-9...
ALGO
0.98656
3.657124
cc7394d0-c3c2-49b9-bcad-ac2c73a8a8f3
re3el/LeetCode
LongestConsecutiveSequence.cpp
class Solution { public: int longestConsecutive(vector<int>& nums) { if(nums.size() == 0) return 0; set<int> setT(nums.begin(),nums.end()); auto itr = setT.begin(); int val = *itr, cnt = 1, res = 1; while(true) { itr++; ...
ALGO
0.999982
5.613358
71dd3965-a243-445b-9aff-96312602a4c2
N9199/Programacion-Competitiva
Codeforces/April Fools/2019/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<ii> vii; typedef vector<vi> graph; typedef vector<vll> vvll; #define rep(i, n) for (int i = 0; i < n; i++) #define repx(i, a, ...
ALGO
0.999923
3.928791
47e79e63-7850-42d5-a52c-305e0cfd8bf7
escabeau/TicTacToe24
src/AIPlayer.cpp
#include "AIPlayer.h" #include <array> bool can_win(const std::array<char, 9>& board, char symbol, int& move) { for (int i = 0; i < 3; ++i) { // lignes if (board[i * 3] == symbol && board[i * 3 + 1] == symbol && board[i * 3 + 2] != 'X' && board[i * 3 + 2] != 'O') { move = i * 3 + 2; ...
ALGO
0.997592
5.462562
a7479271-cb64-4f23-80e9-5b66d849c85a
dpsfigo/code-diary
leetcode/135_candy.cpp
// // Created by dps_figo on 2024/10/29. // /*** * There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. You are giving candies to these children subjected to the following requirements: Each child must have at least one candy. Children with a higher ratin...
ALGO
0.999993
6.35464
f040c9c7-e388-488c-b155-c9c2a9d494ce
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_valid_80_42.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 4e4 + 6; int T; char str[MAXN]; int main() { scanf("%d", &T); while (T--) { int len; bool flag; flag = 0; scanf("%d", &len); scanf("%s", str); for (int i = 0; i < len; i++) { if ((!flag) && str[i] == '0') { if (len ...
ALGO
0.998373
3.003199
c8dd36ce-d9fb-4208-883b-1c41fc39e485
OzzieIsaacs/winmerge-qt
ext/boost_1_70_0/libs/compute/perf/perf_bolt_sort.cpp
#include <algorithm> #include <cstdlib> #include <vector> #include <bolt/cl/sort.h> #include <bolt/cl/copy.h> #include <bolt/cl/device_vector.h> #include "perf.hpp" int main(int argc, char *argv[]) { perf_parse_args(argc, argv); std::cout << "size: " << PERF_N << std::endl; ::cl::Device device = bolt::...
ALGO
0.993385
5.063756
cf0c2dfe-2d24-4c78-9bf2-21fe75d489dd
gaming-hacker/jburkardt_cpp_src
snakes_and_ladders/snakes_and_ladders.cpp
# include <cstdlib> # include <iostream> # include <fstream> # include <iomanip> # include <cstring> # include <ctime> using namespace std; # include "snakes_and_ladders.hpp" //****************************************************************************80 double *snakes ( ) { double *a; int d; int i; int j...
ALGO
0.988047
3.614904
828f04df-44db-464b-af8e-f27941c6a263
graalvm/labs-openjdk-11
src/hotspot/share/opto/output.cpp
#include "precompiled.hpp" #include "asm/assembler.inline.hpp" #include "asm/macroAssembler.inline.hpp" #include "code/compiledIC.hpp" #include "code/debugInfo.hpp" #include "code/debugInfoRec.hpp" #include "compiler/compileBroker.hpp" #include "compiler/compilerDirectives.hpp" #include "compiler/disassembler.hpp" #inc...
TOOL
0.868672
7.096569
87cab7a7-3bf6-41a1-9d00-744234a5dc64
VijayNegi/OJCodeRepo
leetcode/2020/11_Nov/06_FindSmallestDivisorTh.cpp
/* Leetcode problem- Find the Smallest Divisor Given a Threshold Link - https://leetcode.com/explore/featured/card/november-leetcoding-challenge/564/week-1-november-1st-november-7th/3521/ tags - */ #include <stdio.h> #include <stdlib.h> #include <limits.h> #include <string.h> #include <iostream> #include <vect...
ALGO
0.99996
5.784852
9d6b348e-8d25-4211-a210-ca05be4a47ee
Shagor71/CP-Competetive-Programming-
Ramadan/Module 1/Binary Exponentiation and Basic Modular Arithmetic/12_Magic_of_the_locker.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace __gnu_cxx; template <typename T> using o_set = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>; //#define _42_ #ifde...
ALGO
0.999879
4.212748
97030eed-a75c-4f72-a2f3-7fff6f592e84
akshaychouke/LeetCode_Solutions
0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& mat, int target) { int m = mat.size(); int n = mat[0].size(); int start = 0; int end = (m*n)-1; int mid = (start+end)/2; while(start <= end){ int num = mat[mid/n][mid%n]; if(nu...
ALGO
0.999971
6.168379
c086befd-8a49-4a96-b279-db4da5d59089
seclab-fudan/SyzDirect
source/llvm-project-new/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
#include "PassDetail.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/SCF/Passes.h" #include "mlir/Dialect/SCF/SCF.h" #include "mlir/Dialect/StandardOps/IR/Ops.h" #include "mlir/IR/AffineExpr.h" #include "mlir/IR/BlockAndValueMapping.h" using namespace mlir; using scf::ForOp; using scf::Parallel...
TOOL
0.903402
7.458117
6f20e71c-dafb-4081-8da9-44a7f4731726
ishandutta2007/codeforces
spy20051623/normal/1622/A.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int a, b, c; cin >> a >> b >> c; if (a == b && c % 2 == 0 || b == c && a % 2 == 0 || c == a && b % 2 == 0 || a == b + c || b == c + a || c == a + b) cout << "YES\n"; else cout << "NO\n"; } int main() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", std...
ALGO
0.999718
5.085348
91bfcb25-956a-4f43-8510-f173282df615
HaelC/LeetCode
C++/237. Delete Node in a Linked List/sol.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: void deleteNode(ListNode* node) { ListNode* next = node->next; *node = *next; delete next; } };
ALGO
0.996744
5.544385
753bf484-bbe5-4722-a6e6-f9772925cd5c
Sriver27/DSA
0374-guess-number-higher-or-lower/0374-guess-number-higher-or-lower.cpp
/** * Forward declaration of guess API. * @param num your guess * @return -1 if num is higher than the picked number * 1 if num is lower than the picked number * otherwise return 0 * int guess(int num); */ class Solution { public: int guessNumber(int n) { int...
ALGO
0.99999
5.850796
76509a0e-e114-4c31-ba64-444bf44e6dcf
NarcisXD/TemePC1
TemePC1/Tema Lab10/Copacel_Narcis-Mihail_Lab10_P4.cpp
// Copacel_Narcis-Mihail_Lab10_P4.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <math.h> using namespace std; class Triangle { protected: float a, b, c; public: Triangle(float x, float y, float z) { a = x; b = y; ...
ALGO
0.994383
4.746557
e76698c9-4e92-47b8-a21c-6f515b531c70
7biggirl/Cryptography-experiment
experiment-5-RSA/rsa_pro_1.cpp
#include<iostream> #include<gmpxx.h> #include<gmp.h> #include<bitset> #include<cstdlib> #include<ctime> #include<cstring> #include<string.h> #include<sstream> #include<string> #include<windows.h> #include<stdlib.h> using namespace std; #define LENGTH 1024 mpz_class key_n, p, q, key_e, key_d, n2; /* Ҳԣ mpz_class get...
ALGO
0.999342
3.104848
08bd1954-9909-4ce5-a8d2-fae2e259ee49
001priyanshu/competitve-programming
885/vika-and-friends.cpp
#include "bits/stdc++.h" using namespace std; #define lli long long int void solve(){ int n,m,k; cin>>n>>m>>k; int x,y; cin>>x>>y; map<pair<int,int>,int>mp,mp2; for(int i=0;i<k;i++){ int a,b; cin>>a>>b; mp[{a,b}]=1; } if(x+1<=n) mp2[{x+1,y}]=1; if...
ALGO
0.999957
3.989933
f2cca4f4-296f-457d-9502-14008e67e44f
Jikky1618/AtCoder
kyopro90/002.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); int N; cin >> N; // 正しいカッコ列かを判定する auto judge = [&](string &S) -> bool { bool res = true; int dep = 0; fo...
ALGO
0.999708
4.904043
27ae2390-2780-4d9c-9c69-901f71d0d940
9Tempest/llvm-hacked
mlir/lib/Dialect/Vector/Transforms/VectorDropLeadUnitDim.cpp
#include "mlir/Dialect/Arith/IR/Arith.h" #include "mlir/Dialect/Utils/StructuredOpsUtils.h" #include "mlir/Dialect/Vector/IR/VectorOps.h" #include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h" #include "mlir/Dialect/Vector/Transforms/VectorTransforms.h" #include "mlir/Dialect/Vector/Utils/VectorUtils.h" #inc...
ALGO
0.985137
7.790343