uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
74c5a5d9-3563-4074-a48d-010ea36609e0
Yash-Singh1/competitive-programming
acsl/senior/2024-2025/contest1/main.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'scoreTosses' function below. * * The function is expected to return a STRING. * The function accepts following parameters: * 1. INTEGER numPlayers * 2. STRING_ARRAY tosses */ typedef...
ALGO
0.995727
5.344886
9c691347-fa97-43a9-970c-acd93d32ba0e
AbdalnoorAlhajo/Problem-Solving
Level 1/34 -Commission Percentage.cpp
// # 34 - Commission Percentage.cpp #include <iostream> using namespace std; float ReadTotalSales() { float TotalSales = 0; cout << "Please Enter Total Sales: "; cin >> TotalSales; return TotalSales; } float GetComissionPercentage(float TotalSales) { if (TotalSales >= 1000000) return 0....
ALGO
0.869022
5.231677
1a8ff29a-269d-4169-b052-a39523e5d63d
ucsdwcsng/EdgeRIC-on-5G
docker/radio_network/srsRAN-5G-ER/lib/scheduler/support/mcs_tbs_calculator.cpp
#include "mcs_tbs_calculator.h" #include "dmrs_helpers.h" #include "sch_pdu_builder.h" #include "srsran/ran/pdsch/dlsch_info.h" #include "srsran/ran/pusch/pusch_mcs.h" #include "srsran/ran/pusch/ulsch_info.h" #include "srsran/ran/sch/tbs_calculator.h" #include "srsran/ran/uci/uci_mapping.h" using namespace srsran; st...
TOOL
0.95486
7.707872
e9659127-1ccd-4242-a4d8-dcc284d6206f
Hantaro171902/LeetCode
231-PowerOfTwo/231-PowerOfTwo.cpp
// Last updated: 8/22/2025, 9:56:56 PM class Solution { public: bool isPowerOfTwo(int n) { return n > 0 && (n & (n - 1)) == 0; } };
ALGO
0.998182
6.908288
f97cf8cf-f68e-413f-b97d-67f10d0f46c9
Janmansh/CompetitiveProgramming
Codeforces/Codeforces Round 731 Div. 3/C_Pair_Programming/C_Pair_Programming.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define int long long #define pb push_back #define mod 1000000007 #define mp make_pair ll fact[200005]; ll powermod(ll x,ll y){ if(y==0) return 1; ll temp = powermod( x,y/2 )%mod; if( y%2 ){ return (((temp*temp)%mod)*x%mod); } return (tem...
ALGO
0.999959
3.438202
7a3ca919-c079-478a-a5ce-35eec503f8ff
kmjp/procon
2017-2021/2017/colopla/qual/a.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999889
3.432739
170aa9d3-7df2-48fb-845e-629749af44da
FuSiYu666/gmoj_Code
mycode/oj1/4.字符串/1137. 【字符串】练习6.cpp
#include<iostream> #include<string> using namespace std; int main() { string a; cin >> a; for (int i = a.size() - 1; i >= 0; i--) { cout << a[i]; } return 0; }
ALGO
0.999547
3.923069
5ca24724-46e5-4d92-bdb3-5f19adc8094d
blindaks/LeetCode-Daily-Challenge
Minimum Penalty for a Shop.cpp
class Solution { public: int bestClosingTime(string customers) { int cur=count(customers.begin(),customers.end(),'Y'); int m=cur; int h=0; for (int i=0;i<customers.size();i++) { char ch=customers[i]; if(ch=='Y') cur--; else ...
ALGO
0.999777
5.676186
77adc893-fb1e-412e-81e2-e225bb09d2db
NipenPaul/Program-Catagory-Document
Online Judge/Codeforces/codeforces_1272C_.cpp
#include<bits/stdc++.h> #define fwrite freopen("in.txt","r",stdin) #define fread freopen("out.txt","w",stdout) #define Mx 100005 #define ll long long using namespace std; int main() { ll n, k; cin >> n >> k; string ch; cin >> ch; char c; int arr[26] = {0}; for(int i = 0; i < k; i++) { ci...
ALGO
0.999982
3.466215
7549dec5-a4d4-4acb-8de5-b6ed72677541
himanshumahajan138/Leetcode
58-length-of-last-word/length-of-last-word.cpp
class Solution { public: int lengthOfLastWord(string s) { int cnt=0; int lastcnt=0; for(int i=0;i<s.length();i++){ if(s[i]!=32){ cnt++; lastcnt=cnt; } else { //lastcnt=cnt; cnt=0; ...
ALGO
0.998765
5.305578
4f32a7b8-9ee0-4363-94ef-72765e0bd5f7
hvdieu/mycode
03102015/B.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> ii; typedef pair<long long, int> lli; typedef long long ll; typedef unsigned long long ull; #define For(i,a,b) for(int i=a;i<=b;i++) #define Rep(i,a,b) for(int i=a;i>=b;i--) #define REP(i, n) for(int i = 0; i < n; i++) #define FOR(i, f) for(__typeof...
ALGO
0.999861
3.400523
7873bfbc-96c2-44d6-b223-d65c2e928e19
fjxds/POJ
1010 STAMPS/STAMPS.cpp
#include <iostream> #include <algorithm> using namespace std; int type[25]; int cus[25]; int sol[4]; int k,t,num,total; int taken[25]; int DFS(int *a, int pos, int cur, int number,int &flag) { if (cur<0||pos>=t||number>4) return -1; if (cur==0&&number<=4) { // a[number++]=type[pos]; // taken[pos]++; // for (in...
ALGO
0.998655
3.450891
3a5309e7-b01e-460a-a433-ae1b530ef4e1
woohyunjng/Coding-Practice
PS/Baekjoon/15000/15758.cpp
#include <bits/stdc++.h> #define int long long #define MAX 200100 #define MOD 1000000007 #define INF 0x7f7f7f7f7f7f7f7f #define endl '\n' using namespace std; typedef pair<int, int> pr; typedef array<int, 3> tp; int in[MAX]; vector<int> adj[MAX], arr[MAX]; bool vst[MAX]; signed main() { ios_base::sync_with_stdi...
ALGO
0.999997
3.837615
e104dfd2-6095-48af-8c88-14d35844686b
AdvTrainEvalSrcDomain/adv-train-evaluation-source-code-domain
code-imitator/data/dataset_2017/dataset_2017_8_formatted_macrosremoved/DAle/5304486_5697460110360576_DAle.cpp
#include <algorithm> #include <cmath> #include <cstring> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <sstream> #include <stack> #include <string> #include <tu...
ALGO
0.998804
3.819206
71f72c3c-3b92-4553-8685-592980d55849
Rachit2912/Cpp-LeetCode-Solutions
1160-letter-tile-possibilities/letter-tile-possibilities.cpp
class Solution { public: int numTilePossibilities(string tiles) { int n = tiles.length(); vector<bool>seen(n+1,false); unordered_set<string>ans; string current = ""; solve(tiles,seen,current,ans); return ans.size()-1; } private: void solve(string tiles, vector...
ALGO
0.999935
7.043498
eac93e4b-081c-4c98-8266-94f0bf6485de
Chris-Arvin/CorridorROS1.0
costmap_2d/src/footprint.cpp
#include<costmap_2d/costmap_math.h> #include <boost/tokenizer.hpp> #include <boost/foreach.hpp> #include <boost/algorithm/string.hpp> #include <costmap_2d/footprint.h> #include <costmap_2d/array_parser.h> #include<geometry_msgs/Point32.h> namespace costmap_2d { void calculateMinAndMaxDistances(const std::vector<geome...
TOOL
0.998856
6.970826
acf41c15-d5cf-497d-a5c2-484baaaca024
sahuankit010/LeetCode-Solutions
21. Sort an array according to the other - GFG/21.-sort-an-array-according-to-the-other.cpp
// { Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template in C++ class Solution{ public: // A1[] : the input array-1 // N : size of the array A1[] // A2[] : the input array-2 // M : size of the array A2[] ...
ALGO
0.999978
5.300388
ca662253-e0c7-498e-8ffc-bcd15faf66a2
Ash-codes18/Cpp_DSA
Programs/Leetcode/0160-intersection-of-two-linked-lists/0160-intersection-of-two-linked-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { if(headA==NULL || headB==NULL){ return NULL; ...
ALGO
0.999918
5.161351
9ade6939-b725-4f24-a8d3-35c3d76b9893
mitchellnouhan/leetCode
bitManipulation/findTheDifferenceBitManipulation.cpp
class Solution { public: char findTheDifference(string s, string t) { char res = 0; for(int i = 0; i < s.size(); i++){ res ^= (s[i] ^ t[i]); } return res ^ t[t.size() - 1]; } };
ALGO
0.999971
6.405174
7ac3fb2b-91dd-41d1-8f61-efd7559a39de
GodFinal/cobalt
src/third_party/skia/tests/PathCoverageTest.cpp
#include "SkMathPriv.h" #include "SkPoint.h" #include "SkScalar.h" #include "Test.h" /* Duplicates lots of code from gpu/src/GrPathUtils.cpp It'd be nice not to do so, but that code's set up currently to only have a single implementation. */ // Sk uses 6, Gr (implicitly) used 10, both apparently arbitrarily....
TEST
0.980606
6.588428
32afa6af-7b55-4280-8bcb-c610fb0a75ae
Aarush-Shukla/Leetcode-DSA-
ZigZag Tree Traversal - GFG/zig-zag-tree-traversal.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val...
ALGO
0.999866
6.335965
32b522f9-9f31-4b2f-85ab-9c181f6eb5f5
yeominstall/algo
PS/SWEA/rccar.cpp
/** * swea 1940 */ #include <iostream> int main (void) { int T; std::cin >> T; for (int tc = 1; tc <= T; tc++) { int N, dist = 0, comm, sp, csp = 0; std::cin >> N; for (int c = 0; c < N; c++) { std::cin >> comm; if (comm != 0) { std::cin ...
ALGO
0.999458
3.691434
8b49a1e6-f917-496b-b72c-631c593dccf4
burakcoskun/programming_contests
codeforces/423div2/A/soln.cpp
#include<cstdio> #include<cstdlib> #include<string> #include<cstring> #include<vector> #include<map> #include<set> #include<queue> #include<stack> #include<algorithm> #include<iostream> #include<cmath> using namespace std; #define pb push_back #define mp make_pair #define fs first #define sc second int n , a , b , r...
ALGO
0.999627
3.20553
0b3f713f-a230-4b2c-a86c-12c1f0e48a1c
r-sarathi/CPP-Notes
STL/Set/Set.cpp
#include <iostream> #include <set> using namespace std; int main() { // Declare a set of integers set<int> s; // Inserting elements s.insert(10); s.insert(20); s.insert(5); s.insert(15); // Inserting duplicate elements (which will be ignored) s.insert(10); // Displaying the e...
ALGO
0.906392
6.023859
d0dca575-2607-4847-9b18-06d745a0290e
anshu-ak/DSA
Rotate Image.cpp
// https://leetcode.com/problems/rotate-image/ class Solution { public: void rotate(vector<vector<int>>& matrix) { int n = m.size(); for(int i=0; i<n; i++){ for(j=0; j<i; j++){ swap(m[i][j], m[j][i]); } } for(int i=0; i<n; i++...
ALGO
0.999986
6.770928
1c52d5b7-75af-48e4-b45f-3dc18dc25059
raincross7/code-similarity
codes/train_code/problem167/problem167_127.cpp
#include <bits/stdc++.h> #define ll long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) static const ll MAX = 1000000000000000; static const int NIL = -1; using namespace std; const long double EPS = 0.0000000001; const long double PI = (acos(-1)); const int MOD = 1000000007; int main() { ll n, m, d; ...
ALGO
0.999993
3.711556
b8772401-2cc8-44e4-a41d-b2ce29c7d212
rupav/cp
competitive_coding/maximumOfAllSubarraysSizeK.cpp
#include<bits/stdc++.h> using namespace std; #define fr(i,n) for(int i=0; i<n; i++) #define rep(i, st, en) for(int i=st; i<=en; i++) #define repn(i, st, en) for(int i=st; i>=en; i--) #define sq(a) (a*a) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ll mod = 1e9+7; ll gcdll(ll a, ll b){ ...
ALGO
0.999923
3.897077
d7331f95-a7c6-4a55-825a-61b1f5ea20e5
otaliptus/AdventOfCode2024
day1/day1_part1.cpp
#include <algorithm> #include <cstdio> #include <iostream> int main() { std::freopen("input.txt", "r", stdin); std::vector< std::vector<int> > vec(2, std::vector<int>()); int num, ans = 0, cnt = 0; while(std::cin >> num) { vec[cnt].push_back(num); cnt = 1 - cnt; } std::sort(v...
ALGO
0.999776
3.853693
d380d63e-8ba3-47c0-b361-28a418ae4891
kbcgang/kbc
dat/School/Grade9/20-2-2025afternoon/cau1.cpp
/// Made by Nguyễn Hữu Đạt #include <bits/stdc++.h> #define ll long long #define kien main using namespace std; const ll inf = LLONG_MAX; const ll mod = 1e9 + 7; int n; int ans; int f[100005], d[100005]; void make_sieve() { for (int i = 2; i <= 1e5; i++) if (f[i] == 0) for (int j = i; j <= 1e5; ...
ALGO
0.999713
4.392592
7ad0700f-7b42-4466-94f8-1252613add63
akshat12345/Coding_Question_and_Solutions
Leetcode_Solutions/number_of_equivalent_dominos_pair.cpp
#include <bits/stdc++.h> #define pi (3.141592653589) #define ll long long int #define rrep(i, n) for(ll i=n-1;i>=0;i--) #define lp(i,a,b) for(ll i=a;i<b;i++) #define rep(i,n) for(ll i=1;i<n;i++) #define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); #define ps(x,y) fixed<<setprecision(y)<<...
ALGO
0.999873
5.689681
00a21d6e-cad1-49ef-a090-9f3a347e1b50
ms303956362/myexercise
Cpp/codeforces/edu/137/A.cpp
// IO #include <iostream> #include <iomanip> // std::setprecision #include <sstream> // ordered container #include <vector> #include <deque> #include <list> #include <forward_list> #include <string> #include <stack> #include <queue> // associative-container #include <map> #include <set> #include <unordered_map> #i...
ALGO
0.999111
4.811066
c41e0243-c38b-454b-aaf5-73b7cde74b5e
WashizuRyo/Competitive-programming
ABS/abc395/b.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using P = pair<int, int>; using ll = long long; int main() { int n; cin >> n; vector<vector<char>> s(n, vector<char>(n, '?')); rep(i, n) { int j = n + 1 - i - 2; if (i <= j) { if ((i + 1) % 2 == 0) { ...
ALGO
0.999974
3.290548
8a1eb299-e925-4dba-bfc4-7e36c0e966a8
Phoenix-RK/GeeksForGeeks
Permutation/Sum of permutations.cpp
//Phoenix_RK //Sum of permutations /* ******************************************* reference:https://www.youtube.com/watch?v=PQ5OySVcvSQ ******************************************* Given N distinct digits in an array A (from 1 to 9), Your task is to complete the function getSum which finds sum of all n digit numbers tha...
ALGO
0.999719
6.771248
321360f2-658e-461e-92dc-1ec781c6bc58
debjani1413/DSA-Practice
3-longest-substring-without-repeating-characters/3-longest-substring-without-repeating-characters.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { unordered_set<char> st; int i=0,j=0,ans=0; int n=s.length(); while(i<n && j<n) { if(st.find(s[j])!=st.end()) { st.erase(s[i]); i++; }...
ALGO
0.999845
6.07107
30722597-46ae-48a4-92e4-8296a6acaad4
SuperSlot0613/leetcodeProblem
215-kth-largest-element-in-an-array/215-kth-largest-element-in-an-array.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { sort(nums.begin(),nums.end(),greater<int>()); return nums[k-1]; } };
ALGO
0.999885
5.04124
2218f2b6-be5b-466e-8c5b-5e84ae85a866
Oysica/Pandas
3rdparty/boost/libs/compute/test/test_sort_by_key.cpp
#define BOOST_TEST_MODULE TestSortByKey #include <boost/test/unit_test.hpp> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/sort_by_key.hpp> #include <boost/compute/algorithm/is_sorted.hpp> #include <boost/compute/container/vector.hpp> #include <boost/compute/types/struct.hpp> struct custom_stru...
TEST
0.940741
7.068243
0c814421-4c32-4eef-b2b9-ccd878765575
CJSBinder-User/CJSBinder
experiment/correctness_efficiency/cjsbinder/NUMBER_DIGITS_PRODUCT_TWO_NUMBERS/NUMBER_DIGITS_PRODUCT_TWO_NUMBERS_GLUECODE.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <fstream> #include "include/libplatform/libplatform.h" #include "include/v8.h" #include "CQuesHeader.h" using namespace v8; void Print(const FunctionCallbackInfo<Value>& args){ v8::Isolate* isolate = args.GetIsolate(); v8::Str...
ALGO
0.973342
4.209849
77298bec-fbb0-4c1a-8623-51ea102c569d
truongtamthanh2004/Leetcode
2846-robot-collisions/robot-collisions.cpp
class Solution { public: static bool comp( pair<int,int>&a,pair<int,int>&b){ return a.first<b.first; } vector<int> survivedRobotsHealths(vector<int>& pos, vector<int>& h, string d) { vector<pair<int,int>>v; int n = pos.size(); for( int i = 0; i< n; i++){ ...
ALGO
0.999976
5.533919
f6b7c77d-1e80-4f17-a803-96591f63f22f
weedstream/double_linked_list_cpp
Double Linked List/unguided_2.cpp
#include <iostream> using namespace std; struct dlinkedlist { dlinkedlist * prev; string data; dlinkedlist * next; }; dlinkedlist * head; dlinkedlist * tail; dlinkedlist * vertex; void inisialisasi() { head = NULL; tail = NULL; } bool dLinkKosong() { if (head == NULL && tail == NULL) { return true; } el...
ALGO
0.995242
4.266424
7f2a06c2-57a7-45ed-ae20-d1c3a54119cd
AmandeepMewar/DAA-Practicals
09_checkDuplicates.cpp
/* 9. Given an unsorted array of positive integers, design an algorithm and implement it using a program to find whether there are any duplicate elements in the array or not. (use sorting) (Time Complexity = O(n log n)) */ #include <bits/stdc++.h> using namespace std; int check; void read(int arr[], int n){ cout...
ALGO
0.999903
4.853099
d2aacc62-3564-438d-b68c-f887c97dae74
avnishsingh516/love-babbar-DS-ALGO
BASIC/STRING/reverse each word in string.cpp
#include<bits/stdc++.h> using namespace std; // METHOD 1:- using stack stl void reverseWords1(string str) { stack<char> st; // Traverse given string and push all characters // to stack until we see a space. for (int i = 0; i < str.length(); ++i) { if (str[i] != ' ') st.push(str[i]); // When we see a space...
ALGO
0.998803
5.437812
0a1df081-72d6-44b6-a827-16c6f670cb7b
ioz9/lewa_code_frameworks
base/media/libstagefright/codecs/aacdec/ps_fft_rx8.cpp
/* Pathname: fft_rx8.c Funtions: ps_fft_rx8 ------------------------------------------------------------------------------ REVISION HISTORY Who: Date: Description: ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Inputs: Re...
ALGO
0.999947
5.769472
d560f898-076e-4028-96c8-6219f061d480
RedMarbles/pdt_360deg_git
src/applications/stixel_world_lib/stixel_world_lib.cpp
#include "stixel_world_lib.hpp" #include "video_input/VideoInputFactory.hpp" #include "stereo_matching/stixels/AbstractStixelWorldEstimator.hpp" #include "stereo_matching/stixels/StixelWorldEstimatorFactory.hpp" #include "stereo_matching/cost_volume/DisparityCostVolumeEstimatorFactory.hpp" #include "video_input/calib...
TOOL
0.89627
6.899549
3bca9be4-32b1-40c5-80a2-ad8cf40ff595
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12404_13.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m, r, i; cin >> n >> m >> r; int arr1[n], arr2[m]; for (i = 0; i < n; i++) cin >> arr1[i]; for (i = 0; i < m; i++) cin >> arr2[i]; int mini = *min_element(arr1, arr1 + n); int maxi = *max_element(arr2, arr2 + n); int ans = r % mini + (r /...
ALGO
0.999973
3.722126
504b5360-cf85-4b27-ba47-e133b0c07b2c
JustAG7/Competitive_Programming
Codeforces/Rounds/906/D.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define ll long long #define pb push_back #define pf push_front #define db double #define X first #define Y second #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define...
ALGO
0.99998
3.549445
637538b6-78a8-4e9b-bbc0-cdf23d9a3a2d
imrann2005/cp-dsa-cf-lc-cc
1869B.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define ll long long #define vi vector<int> #define vll vector<ll> #define pb push_back #define all(v) v.begin(), v.end() #define sz(v) ((int)(v).size()) #define ye...
ALGO
0.999955
4.670844
10799085-83e5-4731-8785-51a345e9d885
ytia001/leetcode-practice
LeetCode/u57. Insert Interval/InsertInterval.cpp
#include <vector> #include <iostream> using namespace std; class Solution { public: vector<vector<int>> insert(vector<vector<int>>& intervals, vector<int>& newInterval) { vector<vector<int>> res; if(intervals.empty()) return {newInterval}; int start = newInterval[0], end = newInterval[1];...
ALGO
0.999952
5.789825
e4b8e719-5a02-4d9c-ba7e-f4d59eeafb82
DarkModest/OI_codes
Atcoder/ABC366/A_Election_2.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, t, a; cin >> n >> t >> a; int x = n / 2; if(t > x || a > x) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
ALGO
0.999925
3.838851
b909bac0-19d9-4e4b-a18b-6638500ed04d
pratikne/Cpp
PairSumisK.cpp
//Approach 1: Two pointer approach int maxOperations(vector<int>& nums, int k) { int n=nums.size(); sort(nums.begin(),nums.end()); //IMP* int i=0,j=n-1,count=0; while(i<j) { if (nums[i]+nums[j]==k) { count++,i++,j--; } ...
ALGO
0.999883
6.406322
4829ea5a-6578-46ef-8857-732570d2638d
danieldf01/ESE_WS22_G3_T2
Projekte/Foerderbandmodul1/src/simulation/simulationcore/simconveyorbelt.cpp
/* * File: simconveyorbelt.cpp * @author Lehmann * @date 3. April 2020 */ #include "simconveyorbelt.h" #include <iostream> #include <cmath> using namespace std; #define BELT_POS_DROP_LEFT 0.0 #define BELT_POS_DROP_RIGHT 700.0 #define BELT_POS_UPPER_LIMIT 60.0 #define BELT_POS_LOWER_LIMIT 20.0 #define BELT...
TOOL
0.9465
5.085632
00af794c-a5d5-4f77-9703-240c2764f85f
huxingyi/autoremesher
thirdparty/cgal/CGAL-5.1-beta1/examples/Kernel_23/intersection_visitor.cpp
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/intersections.h> typedef CGAL::Exact_predicates_exact_constructions_kernel K; typedef K::Point_2 Point_2; typedef K::Segment_2 Segment_2; typedef K::Line_2 Line_2; typedef K::Intersect_2 Intersect_2; struct Intersection_visitor { typedef v...
ALGO
0.99887
5.297846
c291e222-6996-44c2-b7af-d7f1026432b2
ethanh6/LeetCode
src/0973-k-closest-points-to-origin.cpp
/* Given an array of `points` where `points[i] = [xi, yi]` represents a point on the **X-Y** plane and an integer `k`, return the `k` closest points to the origin `(0, 0)`. The distance between two points on the **X-Y** plane is the Euclidean distance (i.e., `√(x1 - x2)2 + (y1 - y2)2`). You may return the answer in *...
ALGO
0.999989
6.646815
5ed49790-2274-4a92-bf95-f00a366888a0
Aesma/CG-Project3-3
ShadowsReflectionRefraction/scene_parser.Cpp
#include <stdio.h> #include <string.h> #include "scene_parser.h" #include "matrix.h" #include "camera.h" #include "light.h" #include "material.h" #include "object3d.h" #include "group.h" #include "sphere.h" #include "plane.h" #include "triangle.h" #include "transform.h" #define M_PI 3.14159265358979323846 #d...
TOOL
0.874435
5.876709
86376d86-288d-47c1-a367-19ca46b331ed
joy91227/practice.problems
todo/1722. Minimize Hamming Distance After Swap Operations.cpp
class Solution { public: int minimumHammingDistance(vector<int> &source, vector<int> &target, vector<vector<int>> &allowedSwaps) { if (allowedSwaps.size() == 0) return hammingDistance(source, target); for (int i = 0; i < source.size(); i++) { if (source[i] != targ...
ALGO
0.999928
5.8824
b3b31e6a-d2ee-4ddd-801e-2d2ca02a16ec
IDEA-CUHK/FlatDD
extern/taskflow/3rd-party/eigen-3.3.7/bench/spbench/sp_solver.cpp
// Small bench routine for Eigen available in Eigen // (C) Desire NUENTSA WAKAM, INRIA #include <iostream> #include <fstream> #include <iomanip> #include <Eigen/Jacobi> #include <Eigen/Householder> #include <Eigen/IterativeLinearSolvers> #include <Eigen/LU> #include <unsupported/Eigen/SparseExtra> //#include <Eigen/Sp...
ALGO
0.994614
4.297748
e0e67d0b-68b6-49cc-bab5-e50bc6e435b7
shakhawatsalam/Phitron_DSA_Shakhawat
Introduction to Data-Structure/Module-22/insert_in_max.cpp
#include <bits/stdc++.h> using namespace std; int main() { vector<int> v; int n; cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; v.push_back(x); int cur_idx = v.size() - 1; while (cur_idx != 0) { int parent_idx = (cur_idx - 1) / 2;...
ALGO
0.999992
4.632004
02994d9b-fe3f-49f0-8002-470df690390c
ghurkan/device_motorola_clark
gps/utils/loc_misc_utils.cpp
#include <stdio.h> #include <string.h> #include <log_util.h> #include <loc_misc_utils.h> #include <ctype.h> #define LOG_NDDEBUG 0 #define LOG_TAG "LocSvc_misc_utils" int loc_util_split_string(char *raw_string, char **split_strings_ptr, int max_num_substrings, char delimiter) { int raw_st...
TOOL
0.973205
5.380703
b7348380-3978-41fe-88fd-44b7a131636c
IIIIIIIIIU/TXT
20170925/TouHouContestRound4T1_100pts.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> typedef long long ll; const int mod=100000007,maxn=25000005; int n,pi[1565928],cnt; ll ans=1; bool vis[maxn]; void euler(int lit) { for(register int i=2;i<=lit;++i) { if(!vis[i]) { pi[++cnt]=i; ll tmp=i; while(tmp*i<=lit)...
ALGO
0.999977
4.819444
8d6bad09-c053-4612-b5d5-c8961337d2b6
nmhienbn/Competitive-Programming
Mr.Minh/$History/20210410135700915_063753746191359[hien2][paint].cpp
#include <bits/stdc++.h> #define f(i,a,b) for(int i=a;i<=b;++i) #define fd(i,a,b) for(int i=a;i>=b;--i) #define ll long long #define name "main" #define maxn 1000005 using namespace std; int n, x, res, a[maxn], min_e[maxn]; int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); //f...
ALGO
0.99992
3.49352
f3e1c107-ceea-40cd-8c76-eb1a13c7fc01
eliemichel/OpenMfxForBlender
source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
/** \file * \ingroup freestyle * \brief Class to perform all geometric operations dedicated to silhouette. That, for example, * implies that this geom engine has as member data the viewpoint, transformations, projections... */ #include <cstdio> #include <cstring> #include "Silhouette.h" #include "SilhouetteGeomEn...
TOOL
0.860072
6.672311
276a9ee3-8ec8-4c23-8b17-d18b449d5032
priyam-shankar/DSA
SortQ.cpp
#include<iostream> using namespace std; void sort(int arr[], int n ) { for (int i = 0; i < n - 1; i++) { bool isSwap = false; for (int j = 0; j < n - i - 1; j++) { if(arr[j] > arr[j+1]) { swap(arr[j], arr[j+1]); isSwap = true; } } ...
ALGO
0.999988
5.19301
79a1ebda-864b-45fc-96dd-a6b4dabc6544
gautham227/Leetcode-submissions
443-string-compression/443-string-compression.cpp
class Solution { public: int compress(vector<char>& chars) { int cnt=1; char cur; bool flag=false; int ans=0; int n=chars.size(); vector<char> v; if(chars[n-1]=='a')chars.push_back('b'); else chars.push_back('a'); for(int i=1;i<n+1;i++){ ...
ALGO
0.999856
5.173113
9b7b79b9-30d2-4544-a37c-977b146f498e
cormoran/CompetitiveProgramming
src/contest/aoj/2022/2022.comp.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; #define rep(i, j) for(int i=0; i < (int)(j); i++) // vector template<class T> istream& operator >> (istream &is , vector<T> &v) { for(T &a : v) is >> a; return is; } void set_min(string &s, const string &s1) { if(s =...
ALGO
0.99998
4.236785
58d7a4c7-5053-4b09-b9af-b3119a939597
saujanya29/DSA-Sheet
13.Binary Trees/1.Binary Tree Implementation/Copy.cpp
#include<iostream> #include<climits> #include<vector> #include<string> #include<set> #include<unordered_map> #include<algorithm> using namespace std; class Node{ public: int data ; Node* left; Node* right; public: // constructor Node(int data){ this -> data = data; ...
ALGO
0.999949
4.169862
644f5ff7-7569-44a8-834d-9e2bd7e7986b
PlatonYadrov/First_semester
second_contest/O.cpp
#include <iostream> struct Node { Node* left = nullptr; Node* right = nullptr; Node* parent = nullptr; int64_t value = 0; }; class BST { public: Node* root = nullptr; int64_t all_height = 0; void Insert(int64_t val) { int64_t temp_height = 1; auto new_node = new Node; new_node->value = val;...
ALGO
0.999981
4.796113
7898de5b-4cf6-4d57-b211-59d1c05dabb2
yosupo06/yosupo-library
test/oj/dynamicseq.test.cpp
// clang-format off // verification-helper: PROBLEM https://judge.yosupo.jp/problem/dynamic_sequence_range_affine_range_sum // clang-format on #include <concepts> #include <utility> #include <vector> #include "yosupo/algebra.hpp" #include "yosupo/container/reversiblesplaytree.hpp" #include "yosupo/fastio.hpp" // #inc...
ALGO
0.998885
5.910511
93dbcabe-5176-44c0-88c7-6658e78628cb
SouvikChan/-Leetcode_Souvik
40-combination-sum-ii/40-combination-sum-ii.cpp
class Solution { public: vector<vector<int>> ans; void solve(vector<int>& cand,int sum,int start,vector<int> v){ if(sum<0) return; else if(sum==0){ ans.push_back(v); return; } for(int i=start;i<cand.size();++i){ if(i>start and cand[i]...
ALGO
0.999995
5.789842
457417a7-70aa-421c-8837-969b89ebcf96
Naushad-ansarintiw/DSA_REPO
Dynamic Programming/Minimum_coins.cpp
int f(int ind, int T, vector<int> & nums, vector<vector<int>> & dp) { if(ind == 0) { if(T % nums[0] == 0) return T / nums[0]; return 1e9; } if(dp[ind][T] != -1) return dp[ind][T]; int notTake = 0 + f(ind -1, T, nums, dp); int take = INT_MAX; if(nums[ind] <= T) ta...
ALGO
0.999978
5.658132
6f3db7ff-b355-42b9-bc60-033c9f749e5a
asavan/quizcpp
ya_algo_2020_09/D2/main.cpp
// https://contest.yandex.ru/contest/19811/problems/D/ #include <iostream> long long combine(long long& n, long long d) { long long tmp = d - 1; while(true) { n /= d; if (n % d != 0) { return tmp; } tmp *= d; } } long long primeFactors(long long n) { long l...
ALGO
0.999873
5.465113
6a244632-7632-4232-ba2e-78dda5a276d0
humoyun28-02-09/imtihon
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998756
6.772262
9d38c388-a49a-41fe-9a62-2cdcc0cfb36c
shantanu2002git/LEET-QS
1765-merge-in-between-linked-lists/merge-in-between-linked-lists.cpp
class Solution { public: ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) { int fs = 0; ListNode* l1 = list1, *tc1 = nullptr, *tc2 = nullptr; while (l1 != nullptr) { if (fs == a - 1) { tc1 = l1; } if (fs == ...
ALGO
0.999973
5.3693
06f450d2-5681-4ba7-943b-39716998eac7
oilcode/DragonBonesDemo_CPP
demo_cocos2dx/cocos2d/cocos/math/CCVertex.cpp
#include "math/CCVertex.h" #include "base/ccMacros.h" NS_CC_BEGIN void ccVertexLineToPolygon(Vec2 *points, float stroke, Vec2 *vertices, unsigned int offset, unsigned int nuPoints) { nuPoints += offset; if(nuPoints<=1) return; stroke *= 0.5f; unsigned int idx; unsigned int nuPointsMinus = nuPoin...
ALGO
0.993611
5.81487
2833a817-6b83-44ee-8c8e-ca63c598da0a
DarkJyn/CPP_PTIT
CPP0374 - BIẾN ĐỔI A – B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MOD 1000000007 #define endl "\n" signed main(){ cin.tie(nullptr)->sync_with_stdio(false); string s; cin >> s; vector<string> v; int idx = 0; int ii = 0; while(idx < s.size()){ while(s[ii] == s[ii+1]){ ii++; if(ii == s.size())...
ALGO
0.999898
4.499455
a1189aed-f436-4acd-8c6c-85788d0db221
Saifu0/Competitive-Programming
CP/1500/173B.cpp
// ----- In the name of ALLAH, the Most Gracious, the Most Merciful ----- #include<bits/stdc++.h> using namespace std; #define NINJA ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define fo(i,n) for(int i=0;i<n;i++) #define Fo(i,k,n) for(int i=k;i<n;i++) #define for1(i,n) for(int i=1;i<=n;i++) #define dloop(i...
ALGO
0.997583
4.146237
55f45f0e-2d72-4cd5-abe0-f917224ee53b
slimepiki/atcoder
abc184/b/main.cpp
using namespace std; using ll = long long; using ull = unsigned long long; #include <bits/stdc++.h> void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef __LOCAL #define debug(...) ...
ALGO
0.99991
3.975684
e7362c04-ac76-477e-bab4-3de6a99f1d5e
hsrivastava96/striverSDESheet
DP/Maximum sum of non-adjacent elements.cpp
/* Algo: Apply the same logic of select and not select Here, if we are selecting then we need to check if ind + 2 is possible or not if possible then we call ind + 2 function's max sum from that node to end otherwise we consider current node as max value in selection scenario for not selection ...
ALGO
0.999968
5.381789
d2c7a69f-9abf-4b61-8359-735d13a8beb7
ishandutta2007/codeforces
gmusya/normal/1303/B.cpp
#include <iostream> #include <vector> #include <algorithm> #define ll long long using namespace std; int main() { ll t; cin >> t; while (t--) { ll n, g, b; cin >> n >> g >> b; ll d = (n + 1) / 2; ll x = d / g; ll ans; if (x * g == d) { ans = (g + b) * (x - 1) + g; cout << max(n, ans) << endl; ...
ALGO
0.999694
3.778935
e9825c21-02bf-42fe-8286-b9789b06bfd1
Iamutkarshkumar/LEETCODE
1993-sum-of-all-subset-xor-totals/1993-sum-of-all-subset-xor-totals.cpp
class Solution { public: int subsetXORSum(vector<int>& nums) { int ans=0; for(auto ele: nums) ans|=ele; ans=ans<<(nums.size()-1); return ans; } };
ALGO
0.999966
5.454779
06ba78b0-582e-4d02-ac5f-dd189276525d
anubhav-bhard/Competitive-Programming-June-Course-
Hashwanth/Linked Lists, Queues& Stacks/14_Implement Stack using Queues/Implement Stack using Queues.cpp
class MyStack { public: /** Initialize your data structure here. */ queue<int> q1; queue<int> q2; MyStack() { } /** Push element x onto stack. */ void push(int x) { while(!q1.empty()) { q2.push(q1.front()); q1.pop(); } q1....
ALGO
0.998809
5.69603
df94e427-15ad-44eb-90e1-8a8ea548ca27
fjararibet/GPU-T2
src/test.cpp
#include "gameOfLife/cpu.hpp" #include "gameOfLife/cuda.hpp" #include "gameOfLife/interface.hpp" #include "gameOfLife/opencl.hpp" #include <chrono> #include <iostream> #include <map> #include <memory> #include <vector> int N = 100; int M = 100; // cli args bool cuda = false; bool opencl = false; bool cpu = true; int ...
ALGO
0.988315
5.944327
1c8d1186-269d-4e02-8827-de024291cc36
Etsuya233/CodeSyncEtsuya
Luogu/1255.cpp
#include <algorithm> #include <cstring> #include <cstdio> using namespace std; typedef struct bigN{ int num[5000] = {0}; int digit = 1; int used = 0; } BigN; BigN zero; BigN one; BigN res[5001]; BigN unused; BigN newBigN(); BigN plusBigN(BigN a, BigN b); void showBigN(BigN a); BigN stair(int step); int main(){ ...
ALGO
0.999978
3.427798
d6365f4c-5404-4c43-999a-0e6babc0b682
MarvelCollin/c
LinearSearch.cpp
#include <stdio.h> int linearSearch(int arr[], int n, int key) { for (int i = 0; i < n; i++) { if (arr[i] == key) { return i; // Return the index if key is found } } return -1; // Return -1 if key is not found } int main() { int arr[] = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20};...
ALGO
0.99984
5.908098
ab4cfd2c-a3d8-4baa-8d30-30f6a1b19d1d
trinhminhtriet/leetcode
solutions/2100-2199/2139.minimum-moves-to-reach-target-score/Solution2.cpp
class Solution { public: int minMoves(int target, int maxDoubles) { int ans = 0; while (maxDoubles > 0 && target > 1) { ++ans; if (target % 2 == 1) { --target; } else { --maxDoubles; target >>= 1; } ...
ALGO
0.999774
6.210703
c5144bc4-7d47-492e-b5d6-d1dd868659bf
Amanullah1002/6Companies30Days
Milestone3-Microsoft/13.Bridge-edge-in-graph.cpp
/* Submitted by Amanullah Khan */ #include<bits/stdc++.h> using namespace std; int isBridge(int V, vector<int> adj[], int c, int d) { vector<int> visited1(V, 0), visited2(V, 0); queue<int> q; q.push(c); visited1[c] = 1; while(!q.empty()) { int curr = q....
ALGO
0.999807
5.257411
dcfb4a77-660d-422e-801c-5696c301243d
bibakroy/DSA
pattern/hollow_squire.cpp
#include<iostream> #include<cmath> using namespace std; int main() { // hollow squire int side; cout << "enter side of squire" << endl; cin >> side; for (int row = 0; row < side; row++) { for (int col = 0; col < side; col++) { if(row == 0 || row == side -1 || col == 0 || col ==...
ALGO
0.850269
3.482971
54d6c784-fe37-4695-ac6d-8b4bbec51426
liuchuo/PAT
CCCC-GPLT/L2-038 病毒溯源.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int ,int> int n, k, t, S, Long = 0, ans, in[10005], pa[10005]; vector<int> F, Edge[10005]; queue<pii> Q; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> k; for (int j = 0; j < k; j++) { cin >> t; ...
ALGO
0.999986
3.688846
0f2c9e0f-a1da-4b5b-b94d-e27295bfc4e9
SpencerL-Y/SELO
regression/esbmc-cpp/cpp/ch21_7/main.cpp
// Fig. 21.20: fig21_20.cpp // Standard library class set test program. #include <iostream> #include <iterator> using std::cout; using std::endl; #include <set> // define short name for set type used in this program typedef std::set< double, std::less< double > > double_set; #include <algorithm> #include <ostream> ...
TEST
0.859667
6.21315
d6149a20-9a96-4693-8d10-0e343dd201aa
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10374_11.cpp
#include <bits/stdc++.h> using namespace std; int n; const int maxn = 1e5 + 5; int a[maxn]; int b[maxn]; int c[maxn]; int main() { cin.tie(0), ios_base::sync_with_stdio(false); cin >> n; for (int i = 1; i <= n; ++i) cin >> a[i]; b[n] = n, c[n] = a[n]; for (int i = n - 1; i > 0; --i) { if (a[i] < a[b[i + 1...
ALGO
0.999994
3.739329
4b4703e9-abc2-45ad-a8e0-2d6817df116b
Aman398/COA_GITHUB_REPO
MID_SEM/gpgpu-sim_distribution/debug_tools/WatchYourStep/ptxjitplus/ptxjitplus.cpp
/** * Modified by: Jonathan Lew * PTX JIT PLUS * * ********** * User Guide * ********** * * Welcome to WatchYourStep, a debugging tool that allows you launch individual * kernels using parameters captured from cudaLaunch and outputs the values in * the arrays from the kernel. It allows you to watch each ste...
TOOL
0.975559
5.343996
89022329-842e-4086-8d42-d737a4add829
JFGalloR/Proyectos
UAA/ICI/2do Semestre/Estructuras Computacionales/3er Unidad/Ejercicio #5/EJERCICIO_JFGR.cpp
/*====================================================================== EJERCICIO. Implementacin de colas con arreglos. -------------------------------------------------------------------- OBJETIVO: Implementar operaciones de insertar y eliminar elementos de una Cola con el uso de arreglos. ----------------...
ALGO
0.99718
4.982556
0bd1aeaa-8ba4-42d9-b8a2-6883348bb83d
AlpesPAP/Pap
modules/juce_box2d/box2d/Dynamics/Contacts/b2CircleContact.cpp
#include "b2CircleContact.h" #include "../b2Body.h" #include "../b2Fixture.h" #include "../b2WorldCallbacks.h" #include "../../Common/b2BlockAllocator.h" #include "../../Collision/b2TimeOfImpact.h" #include <new> using namespace std; b2Contact* b2CircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, ...
ALGO
0.968746
6.847609
29dadc4e-edff-4882-b967-e85054901d6d
HUYTG17/ICPC
CSES/Maximum Subarray Sum.cpp
#define ll long long #include <vector> #include <iostream> using namespace std; void M_sa_sum(vector<ll>& a) { ll current_sum = a[0]; ll max_sum = a[0]; for(int i = 1; i < a.size(); i++) { current_sum = max(a[i], current_sum + a[i]); max_sum = max(current_sum, max_sum); } cout << m...
ALGO
0.999873
4.548029
2cbe9653-17da-4256-896d-9489e0525950
AIN-X/First
logdelete.cpp
#include <iostream> using namespace std; #define SIZE 5 int main() { int arr[SIZE] = {1, 20, 5, 78, 30}; int key, i, index = -1; cout << "Enter element to delete: "; cin >> key; /* * Iterate through the array elements using a loop. * If any element matches the key, store the index. ...
ALGO
0.999932
4.613411
dbe5093b-ccdb-4563-9f16-42279e29521c
floreaadrian/AlgCodes
CodeForces/740A/main.cpp
#include <bits/stdc++.h> using namespace std; int mm=0x3f3f3f3f; int n,a,b,c; void back(int x,int cost){ if (x%4==0){ mm = min(mm,cost); return; } if (x<0) return; if (cost>=mm) return; back(x+1,cost+a); back(x+2,cost+b); back(x+3,cost+c); } int main() { scanf("%d %d %d %d",&n,&a,&b,&c); if (n%4==0){ ...
ALGO
0.999845
3.731636
78c053ca-08fb-433e-add4-21300abc650a
magyarakoos/contest-prog
codeforces/contest/1955/B/main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define sz(v) (int)v.size() #define all(v) v.begin(), v.end() #define smin(x, y) x = min(x, y) #define smax(x, y) x = max(x, y) #define cases 1 void solve() { int N, C, D; cin >> N >> C >> D; multiset<int> s; for (int i = 0; i < N * N...
ALGO
0.999784
3.927983
550c728b-595b-47c0-86a8-c8d7c521bcb7
yitianhao/gpu_sched_new
gpu-sched-exp/minor/boost_1_61_0/libs/math/src/tr1/assoc_legendref.cpp
extern "C" float BOOST_MATH_TR1_DECL boost_assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x) BOOST_MATH_C99_THROW_SPEC { return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); }
TOOL
0.927586
4.12418
d068eeef-a647-412c-b20d-d48abd3ce6cf
RedPandaProjects/RedSource
src/Utils/Bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp
#include "LinearMath/btDefines.h" #if defined(BT_USE_SSE) && !defined(BT_DEBUG) // Allow SSE operations because we don't directly use user data. #define BT_USE_SSE_IN_API #endif #include "LinearMath/btVector3.h" #include "btRaycastVehicle.h" #include "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h" #in...
ALGO
0.907417
4.298939
fa522ed0-3790-4150-8815-bb61110e6259
ishandutta2007/codeforces
isaf27/normal/1237/B.cpp
//#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; //defines typedef long long ll; typedef double ld; #define TIME clock() * 1.0 / CLOCKS_PER_SEC #define prev _prev #define y0 _y0 //permanent constants const ld pi = acos(-1.0); const int day[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, ...
ALGO
0.999962
3.977133
e098b417-9bc1-4332-9ae5-9f67a1d2116a
ArcticFoox/autocommit_window
eatorbeate.cpp
//7795 sort #include<iostream> #include<algorithm> using namespace std; int a[20001]; int b[20001]; int main(){ int t; cin >> t; while(t--){ int n, m; int cnt = 0; cin >> n >> m; for(int i = 0; i < n; i++){ cin >> a[i]; } for(int i = 0; i < ...
ALGO
0.999932
3.401023
e9882aac-be16-4729-8074-5a355a7ce639
RD0407/LeetCode-RD
0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { if (nums.empty()) { return 0; } int mark = 1; for (int i=1; i< nums.size();i++){ if (nums[i-1] != nums[i]){ nums[mark]= nums[i]; mark +=1; } } ret...
ALGO
0.999888
6.176355