uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
a91b6c67-4373-4bb4-855b-d57469e72d90
shubhamtiwari1602/SodukuSolver
solver.cpp
// Sudoku Solver in C++ with user input #include <iostream> #include <vector> using namespace std; const int SIZE = 9; // Standard size for Sudoku board // Function to print the Sudoku board void printBoard(const vector<vector<int>>& board) { for (int i = 0; i < SIZE; ++i) { for (int j = 0; j < SIZE; ++j)...
ALGO
0.999701
7.029244
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-06-16T05:25:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f139ca15fd6...
51f5dcda-27cd-4747-b9e6-b2011c447069
EPOCHDevs/EpochFolio
src/portfolio/timeseries.cpp
// // Created by adesola on 1/8/25. // #include "timeseries.h" #include <epoch_frame/factory/date_offset_factory.h> #include <epoch_frame/factory/index_factory.h> #include <epoch_frame/factory/series_factory.h> #include <oneapi/tbb/parallel_for.h> #include "txn.h" #include "interesting_periods.h" #include "empyrical...
ALGO
0.944716
5.976756
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2025-04-08T22:45:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c592c6a9fc...
781939c0-3e9f-48f5-8939-08c9478d885c
drviruses/CP
hackercup1.cpp
/* @uthor: <NAME> user -->GitHub: drviruses ; CodeChef: dr_virus_ ; Codeforces,AtCoder,Hackerearth,Hakerrank: dr_virus; */ #include <bits/stdc++.h> #include <chrono> using namespace std; using namespace std::chrono; //#include <boost/multiprecision/cpp_int.hpp> //namespace mp = boost::multiprecision; //#define ...
ALGO
0.999454
3.152062
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-10-20T06:14:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea8ddc904b...
bfaa20d7-e5c4-4228-9673-0d39969f1f1c
eladmines/DataStructures-employee-management-system-hw1
Company.h
#ifndef COMPANY_H #define COMPANY_H #include <iostream> using namespace std; #include "employee.h" #include "KeyBySalary.h" class Company{ private: int companyId; int value; AVLTree<KeyBySalary*>* employeesSalaryKey; AVLTree<KeyByID*>* employeesIDKey; int HighestSalaryEmployee; int highe...
TOOL
0.993151
3.527978
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-11-12T13:07:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "579af54fc8ad...
a6f91ab1-041e-4fe4-9349-0ddf3f7e8bc5
Suraj-2705/logicBuildingWithCPP
graceMarks.cpp
#include <iostream> using namespace std; class Node { public: string Name; double Marks; bool Grace; Node *next; Node(string n, double m) { Name = n; Marks = m; Grace = false; next = NULL; } }; void insertAtEnd(Node **head, string Name, double Marks) { N...
TOOL
0.952721
5.146209
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-09-17T17:58:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80ab4d3b7ac...
14d12211-00dc-4328-886b-eb98106955ec
drifticee/pizzacheeese1
baekjoon_cpp/cpptest2/cpptest2/main.cpp
#include <iostream> #include <stack> using namespace std; int res = 0; void nq(int N, int row, deque<int> dq) { if (row == N) { res += 1; // for (int i = 0; i < N; i++) // cout << dq[i] << " "; // cout << "\n"; return; } // 종료 조건 else if (row == 0) { for (int i = 0; i < N; i++) { dq.push_back(i)...
ALGO
0.999979
4.063513
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-04-07T16:53:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2400c420d...
91144f74-97cf-42d8-b35e-8458144eb2c5
ishandutta2007/codeforces-s
spacewalker/normal/781/A.cpp
#include <bits/stdc++.h> using namespace std; void assign(int v, int p, vector<vector<int>> &tree, vector<int> &ans) { int cc = 0; for (int nxt : tree[v]) { if (nxt == p) continue; while ((p != -1 && ans[p] == cc) || (ans[v] == cc)) ++cc; ans[nxt] = cc++; assign(nxt, v, tree, a...
ALGO
0.999953
4.836797
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53f9b5aca33a...
384937ee-1c4b-4d51-9601-67d8ccf1f1bf
EmmanuelEmu/DSA_-_leetcode
Leetcode/leetcode_424. Longest Repeating Character Replacement.cpp
#include <bits/stdc++.h> using namespace std; int characterReplacement(string s, int k) { int n = s.size(); int right = 0, left = 0; int maxlen = 0; int maxf = 0; int hash[26] = {0}; while (right < n) { hash[s[right] - 'A']++; maxf = max(maxf, hash[s[right] - 'A']); ...
ALGO
0.999987
4.807019
{ "github_metadata": { "branch": "master", "commit_count": 1070, "repo_created_at": "2024-07-12T20:20:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a55566f...
11014b5b-2337-4bab-bed1-172101042d32
JeffreyMaurer/Barcodes
full_pipeline/5_Remove_Paluncec_Twins/TwinToss.cpp
//TODO: make parallel #include<iostream> #include<fstream> #include<string> #include<time.h> #include"Check.h" using namespace std; struct codeword { length_t word; vector<length_t> bad; //codeword(string a) : word(atoi(a.c_str())) {} codeword(string a) : word(fromQuad(a.c_str())) {} }; struct codebo...
ALGO
0.993356
3.637171
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2018-10-25T23:32:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "adf9dbc7d...
fb4527ff-051c-4e19-8295-d060752c7231
bossmaru/2024_05_30_Unreal_AY
00_C++/Pointer/Pointer/Lotto.cpp
#include <iostream> using namespace std; int lotto[45] = {}; // 45개가 0으로 초기화 됨 // 앞에서 함수 선언만 해놓을 수 있음 -> 오류 안남 void Swap(int& a, int& b); void Shuffle(int arr[], int size, int count); void SelectionSort(int arr[], int begin, int end); void PrintArr(int arr[], int size); void Swap(int& a, int& b) { int temp = b;...
ALGO
0.999059
3.74452
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-06-21T01:08:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94e9b8f4853...
5c7e79c5-0988-4c30-b0d5-23261a02211e
BBSSJJ/BOJ
2667.cpp
#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <string> using namespace std; int N; int map[25][25]; int visited[25][25]; int dx[4] = {1, -1, 0, 0}; int dy[4] = {0, 0, 1, -1}; queue<pair<int, int>> q; bool OOB(int x, int y) { if (x < 0 || y < 0 || x >= N || y >= N) re...
ALGO
0.999987
4.126243
{ "github_metadata": { "branch": "main", "commit_count": 209, "repo_created_at": "2022-06-21T13:38:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "193981b39a...
78597c84-5537-4402-96a2-2ddc1b9e9afc
jason-marshall/STLIB
stlib/levelSet/PatchCountNegative.h
// -*- C++ -*- /*! \file levelSet/PatchCountNegative.h \brief Patch for counting points with negative distance. */ #if !defined(__levelSet_PatchCountNegative_h__) #define __levelSet_PatchCountNegative_h__ #include "stlib/levelSet/PatchSquaredDistanceComponents.h" #include "stlib/geom/kernel/Ball.h" namespace st...
TOOL
0.982462
6.990743
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-05-10T18:09:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5d6326f42...
b095e5fd-88d8-4a31-b1aa-e18af5357c6b
gustavo-farani/cp-lib
string-processing/prefix-function/matching-as-ending-position.cpp
#include "prefix-function.cpp" template<class S> vi longestPrefixMatching (const S& s, const S& t) { int n = s.size(), m = t.size(); vi pi(prefixFunction(s)), len(m); int prev = 0; for (int i = 0; i < m; i++) { int j = (prev == n ? pi[n - 1] : prev); while (j > 0 && t[i] != s[j]) { ...
ALGO
0.99984
5.688367
{ "github_metadata": { "branch": "master", "commit_count": 303, "repo_created_at": "2019-12-21T17:32:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8e7a6e4...
5af4a713-f54a-40e6-8d48-e7fb04856218
rajnishgeek/DSandAlgorithmPracticeSolution
Priority Queue/Merge two binary Max heaps.cpp
class Solution { void maxHeapify(vector<int> &arr, int n, int idx) { // Find largest of node and its children if (idx >= n) return; int l = 2 * idx + 1; int r = 2 * idx + 2; int max; if (l < n && arr[l] > arr[idx]) max = l; else ...
ALGO
0.99999
4.649622
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-06-10T06:19:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89d979eb1...
1ebc7909-77aa-41f2-bc12-822e832e5ca0
maxbrundev/Rasterizer
Sources/AmberRenderer/AmberGL/src/AmberGL/SoftwareRenderer/AmberGL.cpp
#include "AmberGL/SoftwareRenderer/AmberGL.h" #define GLM_ENABLE_EXPERIMENTAL #include <algorithm> #include <iostream> #include <glm/gtc/type_ptr.hpp> #include <glm/gtx/compatibility.hpp> #include "AmberGL/Geometry/Line.h" #include "AmberGL/Geometry/Plane.h" #include "AmberGL/Geometry/Point.h" #include "AmberGL/Geome...
TOOL
0.957028
5.273941
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2021-02-27T00:17:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "fef548164b...
f2ef86cc-501c-475d-8804-c8c5d0f492b8
johnBuffer/AutoDrone
include/neural_network.hpp
#pragma once #include <vector> #include "utils.hpp" struct Layer { Layer(const uint64_t neurons_count, const uint64_t prev_count) : weights(neurons_count) , values(neurons_count) , bias(neurons_count) { for (std::vector<float>& v : weights) { v.resize(prev_count); } } uint64_t getNeuronsCount() con...
ALGO
0.985646
5.572365
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2020-11-22T22:09:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 179, "forks": 27, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "0ac92904...
f20767bb-968b-4bc0-9b01-0388fd599df1
ashishch164/DTU-SE-Subjects-work
Software Testing Lab/CC.cpp
#include <iostream> #include<fstream> #include<string.h> #include<stdlib.h> using namespace std; int CyclomaticComlexity(int e, int n, int P) { int V = e - n + 2 * P; return V; } int main() { int cnt = 0; ifstream myfile; string line; myfile.open("triangle.cpp"); if (myfile.is_open()) { int ...
ALGO
0.987709
3.548368
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2021-06-20T07:04:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cb990d8a1...
4ea8de37-9f89-4644-9012-f1223d1afe79
j-karls/P5-Lego
driving/driving.cpp
#include "driving.h" #include "Motor.h" using namespace ecrobot; /** * Output: * * PORT_A Turning Engine * PORT_B Forward Engine */ Motor motorTurn(PORT_A); Motor motorForward(PORT_B); /** * Constructor - TODO: requires motors * @param Motor drive * @param Motor turn */ /*Driving::Driving( Motor drive, Moto...
TOOL
0.903227
5.025324
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-09-06T10:07:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2f33d552...
0f67d21f-f691-4e27-8b8e-06975d3abc7e
Shaownak/Data-Structures
LeetCode/Stack/232_Implement_Queue_using_Stacks.cpp
class MyQueue { public: stack<int>s1; MyQueue() { } void push(int x) { s1.push(x); } int pop() { stack<int>s2; while(s1.size()){ s2.push(s1.top()); s1.pop(); } int x = s2.top(); s2.pop(); whil...
ALGO
0.995547
5.452117
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2021-09-27T19:02:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b03a61bc54f...
aa93d584-c27e-43cd-8b5d-626fd8ec73da
yutaka-watanobe/problem-solving
AOJ/0266/branch/0266.cpp
#include<iostream> #include<string> using namespace std; int simulate(string S){ char cur = 'A'; for ( int i = 0; i < S.size(); i++ ){ int u = S[i]-'0'; if ( cur == 'A' ) cur = u ? 'Y' : 'X'; else if ( cur == 'W' ) cur = u ? 'Y' : 'B'; else if ( cur == 'X' ) cur = u ? 'Z' : ' '; else if ( cur =...
ALGO
0.999934
3.513102
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2017-06-21T04:45:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e462a5f...
7f5bcfa1-b225-4490-a97a-916fd2da798e
EvanWen036/Competitive-Programming-Evn
C++ Workspace/USACO Problems/palpath.cpp
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back #define mp make_pair typedef long long ll; typedef pair<int, int> pii; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int N; cin >> N; string mat[N][N]; for(int i = 0; i < N; i++){ ...
ALGO
0.999982
3.558224
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-02-09T03:46:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2b0fd53b29...
80134a4b-529e-4039-860e-a1798ce3c8a2
artfawl/MADE_hpc
hw3/find_pi.cpp
#include <omp.h> #include <iostream> using namespace std; int main() { float pi = 0.0; int counter = 0, i = 0; const int N = 1000000; float x, y; unsigned int seed = 42; #pragma omp parallel shared(counter) firstprivate(i, x, y, seed) { int tid = omp_get_thread_num(); seed = seed * tid; #...
ALGO
0.999913
4.813534
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-10-14T22:15:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16bbe9684360...
5eaef965-a03a-49ed-9c91-e9e4a3908b88
Sourav61/DSA-Practice
LeetCode/Medium/NumberOfIslands.cpp
// https://leetcode.com/problems/number-of-islands/ #include <bits/stdc++.h> using namespace std; class Solution { public: void dfs(int row, int col, vector<vector<int>> &vis, vector<vector<char>> &grid) { vis[row][col] = 1; int n = grid.size(); int m = grid[0].size(); for (i...
ALGO
0.999968
6.415204
{ "github_metadata": { "branch": "main", "commit_count": 408, "repo_created_at": "2021-09-01T08:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7101fb6048...
9598095e-8182-4cf5-b082-0f0648f4f5fd
luizacostam/algorithms-playground
cf-problemset/a-427.cpp
#include <bits/stdc++.h> using namespace std; void search(int numbers[], int of, int pos, int n){ bool flag = false; int j = pos+1; while(of > 0 && j < n){ flag = false; while(j < n && !flag){ if(numbers[j] < 0){ numbers[j] = 0; flag = true; ...
ALGO
0.999993
4.404971
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-06-16T16:36:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "104ea4b955d...
cb1ea948-e65c-480f-b5b4-56b71db0b973
shrudex/DSE
Data Structures/Week 11/Sorting.cpp
#include <iostream> using namespace std; void swap(int* a, int* b) { int t = *a; *a = *b; *b = t; } void printA (int num[], int n) { for (int i=0; i<n; ++i) cout << num[i] << " "; } void bs (int num[], int n) { for (int i=0; i<n-1; ++i) { for (int j=0; j<n-i-1; ++j) { if (num[j...
ALGO
0.999783
4.569284
{ "github_metadata": { "branch": "main", "commit_count": 369, "repo_created_at": "2022-09-20T18:51:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23dea2b971...
39abf6e1-df3c-4ecd-81f5-066ee08190fd
vfina/ros-robotics-fanuc-kinematics
src/fksolver_client/src/main.cpp
/* * ------------------------------------------------------------------- * This module has been developed as an exercise for Robotics course * @ UniSa. * * Title: main.cpp * Author: <NAME> * Date: Dec 2, 2020 * * This node implements a client that requests a service for the * computation of the direct...
TOOL
0.924421
6.043007
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2020-12-05T17:35:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49afcb160247...
19668479-eb7f-4664-b813-2e920e6dcf10
KataevaVeronika/parallel_algorithms
Assignment0.cpp
#include <iostream> #include <sstream> #include <vector> #include <sstream> using namespace std; // replace every occurrence of substring with another substring string replace_substring(string line, string replacement, string to_replace) { size_t n = 0; while ((n = line.find(replacement, n)) != string::npos) ...
ALGO
0.96847
4.792062
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-12-18T09:55:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2d1026bf8ac...
68212f9b-18f8-4772-a5fb-b1367bc1005e
Zhoujun0615/PAT-Advanced-Level
1077.cpp
#include <stdio.h> #include <string.h> int main() { freopen("in1077.txt", "r", stdin); int N, min_pos, flag; min_pos = 256; flag = 0; char first[260], str[260]; scanf("%d", &N); getchar(); gets(first); int len_f = strlen(first); for(int i = 0; i < N - 1; i++) { gets(str); int len_s = strlen(str); in...
ALGO
0.999959
3.012998
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-21T14:29:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76f03f8369...
99b47551-662b-43bd-bcd8-262bd504f202
feev1x/Competitive-Programming-Sources
IOIP/2021-2022/A/sol.cpp
/** * author: feev1x * created: 07.11.2024 10:32:27 **/ #include "bits/stdc++.h" using namespace std; #ifndef ONLINE_JUDGE #include "/debug.h" #else #define debug(...) #endif using ll = long long; using ld = long double; signed main() { int n; scanf("%d", &n); vector<pair<ll, int>> sum(10); vector<boo...
ALGO
0.999973
4.582439
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-11-04T16:23:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69fa62701bc...
339f0701-b0fe-4ffc-92bc-40f7d51f1eec
sagar1024/mycppjourney
CP/Codeforces/11. Random 800s from recent contests/36. Rudolf and the Ticket(accepted).cpp
// <NAME> and the Ticket // time limit per test1 second // memory limit per test256 megabytes // Rudolf is going to visit Bernard, and he decided to take the metro to get to him. The ticket can be purchased at a machine that accepts exactly two coins, the sum of which does not exceed k. Rudolf has two pockets with co...
ALGO
0.999938
4.741264
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-08-23T11:34:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7aa8c855bc...
fd421557-dd43-4c21-9c70-1143a8da64a1
yesitsreallyhumbert/intro_courseworrk_C-
compute_sin.cpp
#include <iostream> #include <cmath> using namespace std; int fact(int); // declares a function the skeleton defines for you. int main(int argc, char *argv[]) { // Declare any variables you need here double userInput = 0; // Prompt the user cout << "Enter x in radians: "; // get input cin ...
ALGO
0.999942
4.76467
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-10-11T21:11:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d729e0eee...
5b4f761a-7035-4aa4-9fa4-8d824c7802dd
nikhilsourav/Data-Structures-and-Algorithms
10. Strings/11. Reverse words/reverse.cpp
/* Reverse given sentence eg: hi there => there hi */ #include <bits/stdc++.h> using namespace std; // Reverse given word using vector string reverseWord(string str) { // init string stream stringstream cin_s(str); string word; // init vector vector<string> reversed; // input all str...
ALGO
0.999956
4.953238
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2021-07-09T05:37:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 70, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8893a3...
a365bc7b-94d5-44d9-b855-2f4944ed4d6b
JONBUB-SUK/UDACITY-SELF_DRIVING_CAR_ENGINEER-NANODEGREE-project7.Highway-Driving
src/main.cpp
#include <uWS/uWS.h> #include <fstream> #include <iostream> #include <string> #include <vector> #include "Eigen-3.3/Eigen/Core" #include "Eigen-3.3/Eigen/QR" #include "helpers.h" #include "json.hpp" #include "spline.h" // for convenience using nlohmann::json; using std::string; using std::vector; int main() { uWS:...
WEB
0.908129
4.223866
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-04-22T20:49:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c1ccca6e...
175d4878-ef18-450d-99c5-ee765d116da8
fricai/competitive-programming
codeforces/1586/H.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i, a, b) for (auto i = (a); i < (b); ++i) #define per(i, a, b) for (auto i = (b); i-- > (a); ) #define all(x) begin(x), end(x) #define rall(x) (x).rbegin(), (x).rend() #define sz(x) int((x).size()) template<class ...
ALGO
0.999976
4.545957
{ "github_metadata": { "branch": "master", "commit_count": 2301, "repo_created_at": "2021-09-29T18:57:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3659c9d...
84a1afa2-488b-4fd6-91ed-22a4d20ab5e4
PedroDariva36/Desktop
Contests/939/a/a.cpp
#include <bits/stdc++.h> #include <vector> #define ll long long #define endl '\n' #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define pb push_back using namespace std; int main (int argc, char *argv[]){ cin.tie(0)->sync_with_stdio(0); int t; cin >> t; while (t--) { ...
ALGO
0.99985
3.159781
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-03-30T23:55:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c00f7a725b...
f02842ce-c0ee-4864-a2bc-2013da991680
mrdrivingduck/leet-code
118.PascalsTriangle.cpp
/** * @author <NAME>. * @version 2020/12/06 */ /* Given a non-negative integer numRows, generate the first numRows of Pascal's triangle.In Pascal's triangle, each number is the sum of the two numbers directly above it. Example: Input: 5 Output: [ [1], ...
ALGO
0.999949
6.167586
{ "github_metadata": { "branch": "master", "commit_count": 195, "repo_created_at": "2019-08-01T14:06:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c381471...
0c5fc1ec-4e24-4166-8747-0efb8cd07f8d
italoherbert/italo-xadrez-cpp
Src/logica/jogada/rei_peca_jogada.cpp
#include "rei_peca_jogada.h" #include <cstdlib> #include <iostream> #include "../jogada_roque.h" void ReiPecaJogada::calculaJogadasPossiveis( PecaJogadaParams* params ) { Jogo* jogo = params->getJogo(); JogadaLista* lista = params->getJogadas(); int posX = params->getPosX(); int posY = params->getPosY(); bool...
ALGO
0.999494
6.125396
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2022-06-09T15:37:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "848ffb0cdbb...
e5a25f79-eb9c-48e2-9886-ed887dd10696
jainrishabh98/CP
cf1165A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int x, y, n; cin >> n >> x >> y; int a[n]; char xx; for (int i = 0; i < n; i++) { cin >> xx; a[i] = xx - '0'; } int cn = 0; int cnt = 0; for (int i = n - 1; i >= n - x; i--) { cn++; if...
ALGO
0.999929
3.490917
{ "github_metadata": { "branch": "master", "commit_count": 262, "repo_created_at": "2018-09-30T05:49:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b84aca3...
5481d560-44f2-473d-af5f-c923246aa18a
mpresident14/compiler
src/assembly/interference_graph.cpp
#include "src/assembly/interference_graph.hpp" #include <prez/print_stuff.hpp> using namespace std; using namespace assem; namespace { auto removeNode( unordered_map<int, unordered_set<int>>& graphCopy, const unordered_map<int, unordered_set<int>>::const_iterator& iter) { for (int temp : iter->second) { ...
ALGO
0.96593
6.381722
{ "github_metadata": { "branch": "main", "commit_count": 581, "repo_created_at": "2020-03-11T04:59:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8017a6cd54...
c9b1a9de-a1bf-4b04-893b-af91a9ebcd14
paul-tqh-nguyen/one_off_code
old_sample_code/image_processing/bilateral_filter/main.cpp
#include <chrono> #include "util.h" #include <png++/png.hpp> #define CLAMP_FLOAT(p) ( MIN(1.0,MAX(0.0,p)) ) #define CLAMP_INT(p) ( MIN(255,MAX(0,p)) ) #define CLAMP(val,min,max) ( MIN(max,MAX(min,val)) ) #define PIXEL(r,g,b) ( png::rgba_pixel(CLAMP_INT(r),CLAMP_INT(g),CLAMP_INT(b),255) ) using std::cout; using std::...
ALGO
0.952925
5.722726
{ "github_metadata": { "branch": "master", "commit_count": 3426, "repo_created_at": "2016-12-19T20:46:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6fd6075...
c8afbb8f-729e-4af8-8bd7-39405d0cc77e
scratchapixel/scratchapixel-code
rasterization-practical-implementation/raster3d.cpp
// Copyright (C) 2012 www.scratchapixel.com // Distributed under the terms of the CC BY-NC-ND 4.0 License. // https://creativecommons.org/licenses/by-nc-nd/4.0/ // clang++ -o raster3d.exe raster3d.cpp -O3 #define _USE_MATH_DEFINES #include "geometry.h" #include <fstream> #include <chrono> #include "cow.h" static ...
ALGO
0.950894
6.187215
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-12-24T11:19:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 372, "forks": 77, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "7fecbf99...
85e2a375-886e-4c27-afc0-8ca9cf4d813e
PeiLeizzz/Algorithm-PAT-A
链表/1074(精简) Reversing Linked List (25分).cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 100005; struct node { int data, next; } nodes[maxn]; void print(int head) { while (head != -1) { printf("%05d %d ", head, nodes[head].data); head = nodes[head].next; if (head == -1) { printf("-1\n"); } else { printf("%05d\n", head); } ...
ALGO
0.999955
3.404708
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-08-28T12:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12024c18de...
d7aae6fc-c16d-4278-b618-61d9bd7cdf43
quandy2020/LTSLAM
xslam/xslam/opencv/geometry_transform/epnp_eigen.cpp
#include "xslam/opencv/geometry_transform/epnp_eigen.h" #include <fstream> #include <iostream> #include <vector> #include <algorithm> namespace xslam { namespace opencv { namespace geometry_transform { void EPnPEigen::RunDemo(const std::string& filename) { EPnPEigenDebugTool eigen_debug_tool; Eigen::MatrixXd Pw(...
ALGO
0.999431
5.852057
{ "github_metadata": { "branch": "master", "commit_count": 295, "repo_created_at": "2021-12-22T01:35:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 393, "forks": 69, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "a9cf8...
c1ec92dd-75c2-46be-824b-39348d34ddea
ArinPrajapati/msc
question/pivotIndex.cpp
#include <vector> #include <iostream> using namespace std; class Solution { public: int pivotIndex(vector<int> &nums) { vector<int> prefix(nums.size(), 0); prefix[0] = nums[0]; int n = nums.size(); for (int i = 1; i < n; i++) { prefix[i] += prefix[i - 1] + nums[i]; }; for (int...
ALGO
0.999972
6.029068
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2025-05-29T04:28:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "824afe99b...
7b3109f9-cf25-4651-87bb-830c9d043442
seushin/problem-solving
baekjoon/graph/1005.cpp
/* * https://www.acmicpc.net/problem/1005 * ACM Craft */ #include <algorithm> #include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; #define MAXN 1001 int T, N, K, W; int D[MAXN], indegree[MAXN], res[MAXN]; vector<int> adj[MAXN]; queue<int> q; void solve() { while (!q.empt...
ALGO
0.999977
4.338197
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2021-07-13T12:51:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "028050c13...
40c26593-365c-40ba-bf97-d33b21e84207
Saltykub/CP
cses/dp/coincom1 .cpp
#include<bits/stdc++.h> #define ll long long #define pii pair<ll,ll> #define st first #define nd second #define pb emplace_back using namespace std; const int N = 1e6+3, mod = 1e9+7; int main(){ ll n,x; cin >> n >> x; ll c[n]; for(int i = 0; i < n; i++) cin >> c[i]; vector<int> dp(N,0); // dp...
ALGO
0.999978
4.588643
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-05-12T11:10:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "857a2a1d42b...
69520947-161c-4cbe-831a-68d5e0ae7a09
buiquochuy2508/CPP_CODE_PTIT
BT1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<pll> vll; typedef vector<ll> vl; typedef vector<vl> vvl; #define ms(s,n) memse...
ALGO
0.999206
4.233963
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-11-25T23:49:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aea5460b391...
c1b63169-3911-4734-a3ff-fc96b3c86a21
turesnake/leetPractice
src/_leetcode/leet_1277.cpp
/* * ====================== leet_1277.cpp ========================== * -- tpr -- * CREATE -- 2020.05.21 * MODIFY -- * ---------------------------------------------------------- * 1277. 统计全为 1 的正方形子矩阵 */ #inclu...
ALGO
0.999823
5.56789
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2020-05-13T04:27:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61e7fac63...
0faec54b-93b9-485d-b59c-fbad754a0940
Mansurow/bmstu-iu7-7sem-Information-Protection
lab-04/main.cpp
#include <iostream> #include <fstream> #include <sstream> #include "rsa.h" #include "sha1.h" #define MENU "1. Generate keys\n2. Create signature\n3. Check signature\n0. Exit" void print_vector64(std::vector<int64_t>& vector) { for (auto val : vector) { std::cout << val << " "; } std::cout << "\...
TOOL
0.972315
4.489604
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-10T12:51:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63a202b5d0...
ddff4e76-a32e-4774-bbea-cef262bec713
JabirMahmud/uva-solved
Uva/929 - Number Maze(A).cpp
#include<stdio.h> #include<string.h> #include<math.h> #include<ctype.h> #include<stdlib.h> #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<iostream> #include<cctype> #include<map> #include<stack> #include<cstdlib> #include<queue> #include<vector> #include<algorithm> #include<bitset> #includ...
ALGO
0.99966
3.121359
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-08T17:04:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74e5b31165...
f0d2403a-29a5-4468-8b29-32ac04c0d7d7
Aesthetician/leetC
253.cpp
//253. Meeting Rooms II /** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int s, int e) : start(s), end(e) {} * }; */ class Solution { public: int minMeetingRooms(vector<Interval>& intervals) { /* sort ...
ALGO
0.999914
5.953671
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-03T19:59:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57d575769a...
c93d4dcd-2b54-4254-8917-eb94e77d201e
yeominstall/algo
PS/remap_chess.cpp
/** * boj 1018 */ #include <iostream> char board[50][50]; void initBoard(void) { for (int i = 0; i < 50; i++) { for (int j = 0; j < 50; j++) { board[i][j] = '\0'; } } } int main (void) { int N, M, min = 65; std::string ip; std::cin >> N >> M; initBoard(); for...
ALGO
0.9997
3.732864
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2017-04-14T17:35:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "632a2f4e...
8ea7087e-31f3-4866-9486-3119274b2e37
AhJo53589/leetcode-cn
problems_test/14-II-lcof/SOLUTION.cpp
////////////////////////////////////////////////////////////////////////// class Solution { public: int cuttingRope(int n) { if (n <= 3) return n - 1; int a = n / 3, b = n % 3; int mod = 1e9 + 7; if (b == 0) return pow1(3, a, mod, 1); if (b == 1) return pow1(3, a - 1, mod, 4...
ALGO
0.999989
4.880595
{ "github_metadata": { "branch": "master", "commit_count": 891, "repo_created_at": "2019-04-22T05:43:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 252, "forks": 39, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1a813...
6b3725b6-34ce-4dbc-b531-913a1d085b43
SFU-HiAccel/uBench
case_study/KNN/baseline_14PE/src/krnl_partialKnn.cpp
#include "krnl_config.h" extern "C" { #define INPUT_DIM 2 #define SP_LEN 256 #define DIS_LEN 128 const int NUM_OF_TILES = 32774/NUM_KERNEL; void load(int flag, int tile_idx, INTERFACE_WIDTH* local_SP, volatile INTERFACE_WIDTH* searchSpace) { #pragma HLS INLINE OFF if (flag){ for (int i(0); i<SP_LEN; ++i){ #pra...
ALGO
0.998362
3.111439
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2020-12-02T19:17:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 31, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6ad9b29989...
3075cbc0-e9ed-4471-988b-cd5b1862e73e
UCLA-VAST/AutoSA
src/autosa_trans.cpp
#include <string> #include <exception> //#include <chrono> //using namespace std::chrono; #include "autosa_trans.h" #include "autosa_utils.h" #include "autosa_schedule_tree.h" #include "autosa_comm.h" #include "autosa_codegen.h" #include "autosa_print.h" #include "cpu.h" /* A program is legal to be transformed to sys...
ALGO
0.997174
5.637421
{ "github_metadata": { "branch": "master", "commit_count": 1125, "repo_created_at": "2020-05-08T00:39:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 221, "forks": 33, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "0bf2...
fbc8f0de-e94e-4edb-b478-dc3b00b373cc
Davoleo/Advent-of-Code
2024/day08/day_08.cpp
#include <iostream> #include <fstream> #include <map> #include <set> #include <list> #include <unordered_set> #include <vector> #include <string> #include <cmath> #include <algorithm> struct PosYX { int y; int x; PosYX& operator=(const PosYX& pos) { this->x = pos.x; this->y = pos.y; ...
ALGO
0.999646
4.818001
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2020-12-01T17:12:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15cf009de...
22a61e6c-dec2-416a-b382-2cb3b7748739
MarkusMathiasen/CP4_Kattis_Solutions
chapter4/graph_traversal/bipartite_or_cycle_check/hoppers/main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int N, M, comps = 0; vector<vi> graph; vi leaders, vis, color; void dfs(int v) { if ...
ALGO
0.999936
4.41439
{ "github_metadata": { "branch": "master", "commit_count": 813, "repo_created_at": "2021-12-07T13:34:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaa50997...
ce8cb289-906e-48c0-91d9-5b37b0e0c0ea
HONGJICAI/LeetCode
cpp/450.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { // Runtime: 32 ms, faster than 87.87% of C++ online submissions for Delete // Node in a BST. Memory Usa...
ALGO
0.999992
6.581833
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2017-04-09T13:26:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "988cca49...
0e4ef18f-5006-4c8b-a94c-0cca3796f1aa
ishandutta2007/codeforces-a
andreasyan/normal/1392/F.cpp
#include <bits/stdc++.h> using namespace std; #define m_p make_pair #define all(x) (x).begin(),(x).end() #define sz(x) ((int)(x).size()) #define fi first #define se second typedef long long ll; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); mt19937 rnf(2106); const int N = 1000006; int n; ll a[N]...
ALGO
0.999878
3.375131
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da9fa893e76c...
fa3481c2-74b7-49cf-91f8-4c5c73184927
gunaa12/Competitive-Programming
CSHS-Competition/cpp/prob4.cpp
// Imports: // Basic Imports #include <iostream> #include <cstring> #include <assert.h> #include <limits> // Data Structures #include <vector> #include <list> #include <deque> #include <queue> #include <stack> #include <unordered_map> #include <map> #include <set> // Algorithms #include <math.h> #include <algorithm> ...
ALGO
0.999889
3.63951
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-05-16T19:29:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82bc0b4c85...
ea5c0c17-850a-4f32-b32d-3a605fee905a
ahmedsamir010/Datastructres-C-Plus-Plus
Single Linked List.cpp
//اذا مررت من هنا فادعوا الله ان ييسر لي امري ويصلح لي شاني #include<iostream> using namespace std; struct node { int data; node* next; }; class linked { private: node* head = NULL; public: void insertfirst(int value); void insertlast(int value); void insertpos(int vlaue, int pos); void delt...
ALGO
0.999745
3.219633
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-10-26T22:22:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5458e5fed8d...
8938553f-6755-450d-9414-9eca824b6db9
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0717/personal_submission/cf243b_yawn_sean.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m, h, t; cin >> n >> m >> h >> t; vector<vector<int>> path(n); while (m --) { int u, v; cin >> u >> v; u --, ...
ALGO
0.999958
3.901841
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "86ec...
44631021-e3d0-4bd6-a9e7-8813b120b998
amanhex/SDE-Sheet
Linked List-II/Find intersection point of Y LinkedList/Optimal Approach 2/intersection(Optimal2).cpp
#include <bits/stdc++.h> #include "../../Node.h" using namespace std; Node* intersectionOp2(Node* head1, Node* head2){ Node* dummy1 = head1, *dummy2 = head2; while (dummy1 != dummy2){ if (!dummy1) dummy1 = head2; if (!dummy2) dummy2 = head1; dummy1 = dummy1 -> next; dummy2 = dummy2 -> next; } return ...
ALGO
0.999575
4.559541
{ "github_metadata": { "branch": "main", "commit_count": 222, "repo_created_at": "2023-07-15T11:44:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce99bcc719...
13d9679e-2bfc-4717-b7fa-1b568bb459ce
Surajgupta001/COMPETITIVE-PROGRAMMING
CSES/Permutations.cpp
/* A permutation of integers 1,2,....,n is called beautiful if there are no adjacent elements whose difference is 1. Given n, construct a beautiful permutation if such a permutation exists. Input The only input line contains an integer n. Output Print a beautiful permutation of integers 1,2,\ldots,n. If there are sev...
ALGO
0.999991
4.663941
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2025-02-18T19:39:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "821f0eac687...
4727cc3e-068f-41e7-ab5b-830562a68225
qwebnm7788/algorithm
Codeforces/#387 Div2/D.Winter_Is_Coming(Greedy,Dp).cpp
/* 우선은 영하인 날이 k 보다 크다면 불가능해 (왜냐면 영하인 날에는 무조건 winter tire를 써야하니깐) 그리고 나서 보면 영하인 날이 연속되는 뭉텅이를 cnt라 하면 최대한 많이 갈아끼우면서 탈 수 있는 것은 모든 영상 날씨에는 summer를 끼는 거야 그래서 영하일때 winter 가다가 영상을 만나면 summer로 다시 winter로 반복하는 방법이 있지 -> 구하는 정답은 minimum 인데 이건 maximum 인 경우 이때는 cnt*2번을 갈아끼워준다는 것을 알 수있어 (뭉텅이의 시작점,끝점에서 갈아끼우니깐) 그리고 k는 winter의 일수만큼 일...
ALGO
0.996428
4.96256
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-01-04T06:50:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "add5f82c3...
3a09467c-172a-4f26-b364-9eac15b746ca
ArshdeepKaur04/100-DOC---2024
Day 01/1.cpp
/* Question: Rohan and Raju have a candy where each square has a number. Rohan wants to find out how many ways she can break the bar into a contiguous segment such that: 1. The segment length matches Raju's birth month. 2. The sum of the numbers in the segment equals Raju's birth day. Write a code for the same which ...
ALGO
0.999873
4.664796
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2024-07-16T21:31:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9a86efe2d5...
fa619d13-a3ea-4e09-bf8d-63abfde67b8f
Dhruv-Rathi/Code
starters43/d.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; typedef vector<ll> vll; typedef vector<int> vii; typedef vector<vector<int>> vvii; typedef vector<vector<ll>> vvll; typedef vector<vector<pi...
ALGO
0.999689
4.709758
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-07-14T17:56:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "edd0ca6f8b...
7bc45f7d-7b45-4fef-8fb3-4e9bf70c1f70
Macafry/Tetrominoes-V2
Tetrominoes V2/BitOperations.h
#pragma once #include <bitset> using std::bitset; //for reference template <typename T> T setPos1(T x, int pos) { return (1 << pos) | x; } template <typename T> T setPos0(T x, int pos) { return ~(1 << pos) & x; } template <typename T> T flipPos(T x, int pos) { return (1 << pos) ^ x; } template <typename T> T s...
ALGO
0.998829
5.988505
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-11-11T05:51:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1430ff3551...
fd042f17-cd14-4d43-bfa8-db41782ad3f3
thanhnghiaa5/PTTKTT
sdmjbfhdjisbf.cpp
#include<stdio.h> typedef int keytype; typedef int othertype; typedef struct{ keytype key; othertype otherfields; }recordtype; void swap(recordtype &x, recordtype &y){ recordtype temp; temp = x; x = y; y = temp; } int FindPivot(recordtype a[], int i, int j){ keytype b; int k; k = i + 1; b = a[i].key; while((...
ALGO
0.999995
4.22716
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-10-29T16:28:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13b1273d33d2...
915ab95d-76fc-412b-bd7b-f3538ee5fa04
jkjan/MysteriousCPPCodes
Baekjoon/13414/main.cpp
#include <string> #include <map> #include <queue> #include <cstring> using namespace std; typedef struct _H { char* h; int seq; } H; bool operator < (H a, H b) { return a.seq > b.seq; } struct cmp { bool operator() (char const *a, char const *b) const { return strcmp(a, b) < 0; } }; int...
ALGO
0.999947
3.056872
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-07T02:38:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18b5cc8f7b...
f24025af-d601-4ba3-ac3a-bfc0e82186f9
codewithaman07/codeforces
1352A.cpp
#include <bits/stdc++.h> using namespace std; int main() { #ifndef a freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; cin >> t; vector<int> arr(t); for (int i = 0; i < t; i++) { cin >> arr[i]; } for (int i = 0; i < t; i++) { ...
ALGO
0.999894
4.842072
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2024-06-28T04:30:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3a75b9264a...
002069fc-208e-4148-9802-f65497f8d618
shmohammadi86/SCINET
inst/include/stats/prob/plnorm.ipp
/*################################################################################ ## ## Copyright (C) 2011-2018 <NAME> ## ## This file is part of the StatsLib C++ library. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with ...
ALGO
0.992846
5.939928
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-07-15T22:40:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 5, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "8a352e0f...
579a2c16-89db-4573-91bc-d43682596906
Aphrodicez/POSN
POSN17/Camp3/Dynamic_Programming/Matrix_Chain_Multiplication/TopDown/Pairs_Of_Four-TopDown.cpp
/* Author : ~Aphrodicez School : RYW Lang : CPP Algo : Matrix Chain Multiplication [Top Down] Status : Accepted */ #include <bits/stdc++.h> using namespace std; #define i first #define j second #define pb push_back #define eb emplace_back #define all(a) (a).begin(), (a).end() #define SZ(a) (int)(a...
ALGO
0.999982
4.069827
{ "github_metadata": { "branch": "master", "commit_count": 270, "repo_created_at": "2020-11-21T02:11:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e82a835e...
ec36c016-c705-4f65-aa51-922d4203fec0
xhaktmchl/Algorithm_study
BOJ/최소 공통 조상(LCA)/[백준 11437 c++ VVV] LCA.cpp
#include <iostream> #include <algorithm> // fill_n, min,max, swap //#include <map> // 중복 x //#include <string> // getline //#include <cstring> // memset, strok, strstr #include <vector> #include <queue> // priority_queue<자료형, 구현체, 비교 연산자> (중복허용), //#include <set> // 트리, 중복 x , multiset //#include <unordered_set> //#i...
ALGO
0.999986
5.06002
{ "github_metadata": { "branch": "main", "commit_count": 1267, "repo_created_at": "2021-01-26T15:27:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9d72ce35...
d09fe624-71f1-49c7-995d-f9e4f94263ed
robocomp/perception
components/objectDetectionRockin2/src/shapes/basic/rectprism.cpp
#include "rectprism.h" RectPrism::RectPrism() { center.push_back(0.0); center.push_back(0.0); center.push_back(0.0); rotation.push_back(0.0); rotation.push_back(0.0); rotation.push_back(0.0); Wx=1.0; Wy=1.0; Wz=1.0; } RectPrism::RectPrism(const QVec &center, const QVec &rotation, double Wx, do...
TOOL
0.944094
3.35068
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2014-06-16T08:15:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "667ef6690...
bf3327bd-a4a9-4670-b5fb-2fc3af78aa0a
BlinkingStar7/Problem_Solving
OnlineJudge/ACM_ICPC_NET/2468.cc
#include <bits/stdc++.h> using namespace std; #define PI 2*acos(0.0) #define INF 1e8 #define EPSILON 1e-8 #ifdef DEBUG #define DPRINTF(x) printf x #else #define DPRINTF(x) ; #endif typedef pair<int, int> pii; typedef pair<int, pair<int, int> > piii; typedef vector<int> vi; typedef vector<pii> vpii; typedef vector<bool...
ALGO
0.99884
3.441913
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2016-02-09T11:46:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3fc78a383...
dfec6d63-c3cb-4ea0-bf23-fd7b7643a408
HoratioPrime/InvestMachineTask
InvestMachineTask/Source.cpp
#include <fstream> #include <iostream> #include <vector> #include <list> #include <algorithm> int maxKarma(int k, std::vector<std::pair<int, bool>> contests); int maxKarma2(int k, std::vector<std::pair<int, bool>> contests); int main() { int k; std::vector<std::pair<int, bool>> contests; std::ifstream fin("input.t...
ALGO
0.999497
3.699282
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-09-24T15:44:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbd6b0c1cd...
fb2495ae-bb5f-41ea-a498-346188e8cf1b
Akshat-Goyal/Semester4
prog-verf/assignment1/sketch-1.7.5/sketch-frontend/test/sk/seq/miniTestb240.cpp
#include <cstdio> #include <assert.h> #include <iostream> using namespace std; #include "vops.h" #include "miniTestb240.h" namespace ANONYMOUS{ void stenSK14(int N, int a, float* in/* len = N * N */, float* _out/* len = N * N */) { for (int __sa0=0;(__sa0) < (N);__sa0 = __sa0 + 1){ assert (((__sa0) >= (0)) && (...
ALGO
0.987356
3.37152
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-03-09T15:27:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "263b5da2c...
84007992-380a-44d2-8d35-5b9e47e5cc1a
edward130603/BayesSpace
src/compare_enhanced.cpp
// [[Rcpp::plugins("cpp11")]] // [[Rcpp::depends(RcppArmadillo)]] #include <RcppArmadillo.h> #include <cmath> #include <iostream> #ifdef _OPENMP #include <omp.h> #endif template <typename T> class RedMat { private: arma::Mat<T> memb; public: RedMat() = delete; RedMat(const RedMat &) ...
ALGO
0.999215
6.530899
{ "github_metadata": { "branch": "devel", "commit_count": 335, "repo_created_at": "2020-06-23T20:22:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 146, "forks": 25, "issues": 49, "pull_requests": 0 }, "file_meta": { "content_id": "4288c...
a975bf31-f2a8-4a8c-8fb5-55d4420b77da
xuguocong/LeetCodeAnswer
leetCodemianshi/24.cpp
#include<iostream> #include<vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* swapPairs(ListNode* head) { if(head == NULL || head->next == NULL) return head; ListNode *ptr = head, *prept...
ALGO
0.999996
5.670056
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2020-02-24T12:24:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d03076e3...
29b7c7c4-deea-4795-8500-3682cf133e85
Moontasir1091/Competetive_PRGRM
Problem Solving (Rating Based)/R - 1100/B. Fedor and New Game.cpp
#include <bits/stdc++.h> using namespace std; // New Thing int countDifferentBits(int a, int b) { int x = a ^ b; // XOR অপারেশন int count = 0; while (x) { count += (x & 1); // সর্বশেষ বিট চেক করা x >>= 1; // ডানদিকে এক ধাপ সরানো } return count; } int main() { int n...
ALGO
0.999984
4.653698
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2024-10-30T12:44:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f90eccacbd...
2f0f0fd5-a548-46cd-87dc-ced2b77e3e6a
yhylord/OJ
Codeforces/113 - Codeforces Beta Round #86 (Div. 1 Only)/D.cpp
#include <algorithm> #include <cstdio> using namespace std; const int MAXN = 33, MAXM = 555; double g[MAXN][MAXN], c[MAXM][MAXM], ans[MAXM]; int d[MAXN]; int main() { int n, m, a, b; scanf("%d%d%d%d", &n, &m, &a, &b); while (m--) { int x, y; scanf("%d%d", &x, &y); ++d[--x]; ...
ALGO
0.999858
3.409895
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2014-02-24T10:57:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "672c29086...
0c4b1048-1912-4d04-95ac-8ffe5000d82b
PX4/PX4-Autopilot
src/modules/mc_att_control/AttitudeControl/AttitudeControl.hpp
/**************************************************************************** * * Copyright (c) 2019 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistri...
TOOL
0.956495
7.125124
{ "github_metadata": { "branch": "main", "commit_count": 47555, "repo_created_at": "2012-08-04T21:19:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9767, "forks": 14212, "issues": 1547, "pull_requests": 574 }, "file_meta": { "content_id"...
68c7f067-47a8-4563-8d08-d7acb421a7de
phanhuytran/Base-TechniquesProgramming
Programming Techniques/BTH03_BT09.cpp
//Project: BTH03_BT09.cpp #include<iostream> using namespace std; void nhap(int **a, int r, int c) { for (int i = 0; i < r; i++) { cout << "Nhap " << c << " gia tri cho dong thu " << i + 1 << ": "; for (int j = 0; j < c; j++) cin >> a[i][j]; } } void xuat(int **a, int r, int c) { for (int i = 0; i < r; i++)...
ALGO
0.998431
3.792534
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-18T11:19:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "050185664ce3...
137b4f28-d7b6-47b3-9a2b-2bb1484a58fe
wateret/ps
solutions/codeforces/505A.cpp
#include <iostream> #include <algorithm> #include <string> #include <map> #include <vector> #include <queue> using namespace std; string trytry(string s, int d) { int len = s.size(); int ins = -1; for (int i = 0; i < len; i++) { if (s[i] != s[len-1-i]) { ...
ALGO
0.999944
4.033002
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2016-03-29T08:16:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5bd1d11d4...
b1c4559d-d6da-489a-a104-363b203b806d
tiffanu/bot
cpp_programmes/contest/graph/zheglov.cpp
#include <iostream> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); int n; std::cin >> n; int** d = new int*[n]; for (int i = 0; i < n; ++i) { d[i] = new int[n]; } for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) ...
ALGO
0.999962
5.039391
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-06-22T22:25:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "136734b5f51f...
0ed81695-7312-4428-bb36-827cb418d720
GaisaiYuno/matrix.h
applications/DBSCAN.cpp
#include "matrix.h" #include "euclid.h" #define MAXN 1005 using namespace std; Matrix<long double>pt[MAXN]; long double dis[MAXN][MAXN]; int belong[MAXN]; bool core[MAXN],vis[MAXN]; int cluster; vector<int>adj[MAXN]; void dfs_paint(int u,int color){ vis[u]=true; belong[u]=color; for (int v:adj[u]){ ...
ALGO
0.999991
3.73324
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2022-11-14T14:50:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49b34f03616...
a44b1a13-3daf-4b89-9050-f1d7b100f5cc
AlexeyShik/Algorithms-and-data-structures
Year-2-Term-4-Work-2/I.cpp
// // Created by <NAME> on 23.04.2021. // #include <iostream> #include <vector> using namespace std; typedef long long ll; #define fastio ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed) #pragma GCC optimize("O3", "unroll-loops", "fast-math") const int ALPHABET_S...
ALGO
0.999838
4.596435
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-11-23T21:12:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e2ed42d5...
7057cef0-d0b3-473e-a8a8-127df33c6bde
CelalTEMIZ/CSE-241-Object-Oriented-Programming
All HWs/C++ 2015 Homeworks/HW2/HW02_101044070_Celal_Temiz/HW02_101044070_Celal_Temiz.cpp
/*******************************************************************/ /* Object Oriented Programming */ /* Fall 2015 */ /* Homework # 2 */ /* */ /* */ /* <NAME> ...
ALGO
0.993764
4.162159
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-12T11:14:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0282c5b2a...
a7112cf8-e80d-4bf7-8b82-72d09a938a6f
ApolloAuto/apollo
modules/perception/common/algorithm/point_cloud_processing/common.h
/****************************************************************************** * Copyright 2018 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
TOOL
0.922482
6.906729
{ "github_metadata": { "branch": "master", "commit_count": 19341, "repo_created_at": "2017-07-04T19:03:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25847, "forks": 9793, "issues": 895, "pull_requests": 104 }, "file_meta": { "content_id...
8bf3be15-7a96-4ad3-832b-81c5e5916346
k48shah/Assignments
General Coding/ThreeNumSort/DescendingOrder.cpp
//<NAME> & <NAME> #include <iostream> #include <cmath> using namespace std; bool sort_three_numbers(float & num_1, float & num_2, float & num_3) { int swapVariation = 0; while (num_1 <= num_2 || num_2 <= num_3) { float temp = num_1; if (swapVariation % 2 == 0) { num_1 = num_3; num_3 = temp; } ...
ALGO
0.999934
4.552641
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-03-17T03:51:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e7ed67f24...
6c882e84-7d91-41ff-aa75-fbfc7e3e5929
hiroshi-maybe/csacademy
solutions/R78-LonelyPoints.cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <string> #include <sstream> #include <set> #include <map> #include <iostream> #include <utility> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <unordered_set> #incl...
ALGO
0.999976
4.139029
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-04-25T13:40:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0072f38a...
6ebb577e-aae4-4ef8-b9fa-74c8b31d7b0c
mxllc/OJ_Training
图论/Kruskal-MST.cpp
#include <iostream> #include <vector> #include <algorithm> //关键:kruskal算法计算最小生成树 //注意:srot中的比较。 小于号,而不是小于等于 using namespace std; #define NODE_NUM 1000 int Tree[NODE_NUM]; int FindRoot(int pos) { if (Tree[pos] == -1) return pos; else { int tmp = FindRoot(Tree[pos]); Tree[pos] = tmp;//修改根结点,路径压缩 return tmp;...
ALGO
0.999992
4.432448
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-04-16T14:40:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69c9cdfe0f...
a9a74481-5a1c-46a8-bd48-db23c91683d3
davidjojic/minesweeper
main.cpp
#include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <SFML/System.hpp> #include <SFML/Window.hpp> #include <SFML/Network.hpp> #include <iostream> #include <queue> #include<random> #include <cstdlib> #include <ctime> using namespace std; int main() { sf::Sprite sprite; int cellsize = 50; srand(static_cast...
TOOL
0.938977
3.70703
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-29T10:34:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11e05aa6b95e...
aea42ac0-9ba0-46e5-a37d-cb1470e9b475
R-Stalker/data-structures
1链表/3.有序链表去除重复元素/RemoveRepeatElement.cpp
/* 有序链表去除重复元素,只保留一个 (该算法删后面) */ #include <iostream> using std::cin; using std::cout; using std::endl; template <typename Type> class Node{ public: Type data; Node<Type> *next; Node(Type _data){ data = _data; next = NULL; } }; template <typename Type> class LinkedList{ private: Node<Type> *head; public: Link...
ALGO
0.999948
4.514574
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-01-05T13:35:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "671b64f64...
17f0a8da-afb4-4d73-b5cf-42cf18a45b6d
Christian-Nunnally/wings3
src/common/Graphics/Effects/expandingColorOrbEffect.cpp
#include "../../Graphics/Effects/expandingColorOrbEffect.h" #include "../../Graphics/palettes.h" #include "../../Graphics/perPixelRadiusTransformMaps.h" #include "../../Utility/fastRandom.h" const uint8_t MaxNumberOfColorOrbs = 10; const int MaxColorOrbRadius = 100; const int MaxColorOrbFlashSpeed = 100; const int Mi...
ALGO
0.983017
5.848234
{ "github_metadata": { "branch": "main", "commit_count": 145, "repo_created_at": "2023-03-30T00:41:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff35282209...
85767d9b-257a-41a9-b9a4-04f197d2d762
dinhcanh303/contest-leetcode
Bi130/4.cpp
// Fail class Solution { public: const int MOD = 1e9+7; vector<int> gen(int x){ vector<int> a; int b = 1; while(x > 0){ if(x & 1){ a.push_back(b); } x >>= 1; b <<= 1; } return a; } int cal(vector<int>...
ALGO
0.999969
5.511338
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-04-21T15:04:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "125081001d89...
12d231c4-26bd-491b-b31e-c5089c15ff65
tyagiakash926/Level-up-Dec
SearchingSorting/l001.cpp
#include<iostream> #include<vector> #include<algorithm> #include<unordered_map> using namespace std; //Binary Search int binarySearch(vector<int>& arr, int data){ int n = arr.size(); int si =0; int ei = n-1; while(si<=ei){ int mid = si + (ei-si)/2 ; if(arr[mid]==data) return mid; ...
ALGO
0.999864
4.573288
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-04-17T13:45:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87ffcac4c5...
82efe09c-4036-4b52-aec7-b472339fd500
LLNL/RAJAPerf
src/basic/MULTI_REDUCE-Cuda.cpp
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Copyright (c) 2017-25, Lawrence Livermore National Security, LLC // and RAJA Performance Suite project contributors. // See the RAJAPerf/LICENSE file for details. // // SPDX-License-Identifier: (BSD-3-Clause) //~~~~~~~~~~~~~~~~~~~~~~~~~~...
TOOL
0.996938
6.58559
{ "github_metadata": { "branch": "develop", "commit_count": 3087, "repo_created_at": "2017-09-25T20:18:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 118, "forks": 42, "issues": 45, "pull_requests": 15 }, "file_meta": { "content_id": "cf...
5ac42591-bc5e-4f47-870a-e7cf935acdae
openhpc/ohpc
tests/apps/prk/tests/GRAPPA/Synch_p2p/p2p.cpp
//////////////////////////////////////////////////////////////////////// // Copyright (c) 2013, Intel Corporation // Copyright (c) 2014, <NAME> // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistr...
ALGO
0.999138
5.075133
{ "github_metadata": { "branch": "3.x", "commit_count": 12766, "repo_created_at": "2015-09-28T18:20:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 917, "forks": 199, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "dd369b...