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 |
|---|---|---|---|---|---|---|---|
35db51e8-70d4-44f2-bd13-26924639b926 | SHIVANSH-A/DSA | Vectors/Hashing/LeetCode/MostFrequentNumberFollowingKeyInanArray.cpp | // You are given a 0-indexed integer array nums. You are also given an integer key, which is present in nums.
// For every unique integer target in nums, count the number of times target immediately follows an occurrence of key in nums. In other words, count the number of indices i such that:
// 0 <= i <= nums.length... | ALGO | 0.999993 | 5.974287 | {
"github_metadata": {
"branch": "main",
"commit_count": 233,
"repo_created_at": "2024-12-07T04:52:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d342e7ce2... |
c744e3fa-a0fa-4cab-80ea-b8248c66430c | UrNA1VE/DataStructure-Algorithm | C++/DynamicProgramming/MinimumTotalSpaceWastedWithKResizingOperations.cpp | // https://leetcode.com/problems/minimum-total-space-wasted-with-k-resizing-operations/
class Solution {
public:
int inf = 200*1e6;
int dp[200][200] = {};
int minSpaceWastedKResizing(vector<int>& nums, int k) {
int n = nums.size();
memset(dp, -1, sizeof(dp));
return dfs(nums, 0, n,... | ALGO | 0.999975 | 5.937461 | {
"github_metadata": {
"branch": "master",
"commit_count": 506,
"repo_created_at": "2022-06-27T16:43:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4825fecb... |
58fba42d-8873-4be0-a7ea-4671f79bd018 | ameybh/competitive-programming | cses/graph/counting-rooms.cpp | // Author: <NAME> - ameybhavsar24@(github & twitter)
// IDE: Geany on Ubuntu 20.04
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(auto i=a;i<b;i++)
#define repD(i,a,b) for(auto i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define ... | ALGO | 0.999768 | 5.038413 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2021-06-23T13:44:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd63e9cd744... |
08c28e74-8321-4482-b1af-dc94be024863 | MathProgrammer/AtCoder | C Programs/C Programs - 3/Cake 123.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#define all(v) (v).begin(), (v).end()
typedef long long LL;
using namespace std;
void read_and_sort(vector <LL> &A, int n)
{
A[0] = 1e15;
for(int i = 1; i <= n; i++)
cin >> A[i];
sort(all(A), greater <LL>());
}
int main()
{
int no_... | ALGO | 0.999901 | 3.467101 | {
"github_metadata": {
"branch": "master",
"commit_count": 443,
"repo_created_at": "2017-07-15T13:50:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 35,
"forks": 20,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "59ff61... |
f0be6a52-ec8d-4ff0-87f7-d86ff3396725 | yuanjilee/SwordOffer | JZ45扑克牌顺子/is_continuous.cpp | #include <iostream>
#include <set>
#include <vector>
using namespace std;
/**
* 题目:现在有2副扑克牌,从扑克牌中随机五张扑克牌,我们需要来判断一下是不是顺子。
* 有如下规则:
* 1. A为1,J为11,Q为12,K为13,A不能视为14
* 2. 大、小王为 0,0可以看作任意牌
* 3.
* 如果给出的五张牌能组成顺子(即这五张牌是连续的)就输出true,否则就输出false。
* 例如:给出数据[6,0,2,0,4]
* 中间的两个0一个看作3,一个看作5 。即:[6,3,2,5,4]
* 这样这五张牌在[2,6]区间连续,输... | ALGO | 0.999482 | 5.135457 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2021-04-26T02:21:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5da05daa5e8... |
5920110a-f133-415c-8713-f94e5297b1df | Fangui/path-tracing | src/parse.cc | #include "kdtree.hh"
#include "parse.hh"
#include "triangle.hh"
#include "light.hh"
#include "material.hh"
#include "matrix.hh"
#include "json.hpp"
#include <algorithm>
#include <exception>
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <unordered_set>
#include <vec... | TOOL | 0.972635 | 4.667134 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2019-02-11T18:44: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": "f389d51ad... |
42c0dfe0-6bb8-468e-a3db-d553fbac0876 | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/13/62/5.cc | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
void hull(const vector<int>& v, vector<int>& hx, vector<int>& hy, int mul) {
for ... | ALGO | 0.999903 | 5.005505 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e23b023e... |
d9d76bb6-b2a2-41da-8f2a-06dc7a07dfb3 | savetree-1/GitConnectX | cpp_algorithms/graph.h | #ifndef GRAPH_H
#define GRAPH_H
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <limits>
#include <algorithm>
#include <stdexcept>
class Graph {
private:
std::unordered_map<int, std::vector<std::pair<int, double>>> adjList;
std::unordered_set<int>... | ALGO | 0.995364 | 6.6647 | {
"github_metadata": {
"branch": "main",
"commit_count": 86,
"repo_created_at": "2025-03-11T10:57:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "86753c4a260... |
0fd3ecdb-d187-4def-b906-81a245e58530 | matumoto1234/atcoder | atcoder_sub/JOI/2012_yo/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define range(i, l, r) for (int i = (int)(l); i < (int)(r); (i) += 1)
#define rrange(i, l, r) for (int i = (int)(r)-1; i >= (int)(l); (i) -= 1)
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) { a = (a > b ? a : b); }
template <typename T1, typename T2> in... | ALGO | 0.999959 | 4.174304 | {
"github_metadata": {
"branch": "master",
"commit_count": 109,
"repo_created_at": "2021-06-18T16:26: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": "1880afec... |
eb0bcaa1-51cd-47bb-a401-9d92512e5d2b | drlongle/leetcode | algorithms/problem_0656/other3.cpp | class Solution {
static const int MAXN = 1010;
public:
vector<int> cheapestJump(vector<int>& A, int B) {
int next_stop[MAXN];
int payment[MAXN];
int i = A.size() - 1;
deque <int> dq;
next_stop[i] = 0;
payment[i] = A[i];
vector <int > ret;
if (A[... | ALGO | 0.999977 | 4.236662 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2017-02-08T14:00: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": "b091acf... |
7cc3428b-7a57-4f5d-beb0-87e6c66f2794 | zhiyisun/xdnn-reloaded | sgemm_f32f16f32.cpp | #include "sgemm_f32f16f32.h"
#include "debug_print.h"
#include <vector>
#include <cmath>
#include <thread>
#include <algorithm>
// To pack matrix B (row-major KxN output)
void xdnn_sgemm_f32f16f32_packb(bool transB, int N, int K, const XDNN_FP16* B, int ldb, XDNN_FP16* packedB) {
DEBUG_PRINT();
}
// Basic compute... | ALGO | 0.976775 | 7.019007 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2025-05-14T23:35: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": "cf1ba0c6ba9... |
8a75327b-edc5-4fc4-a5f8-b9461a7dad66 | DinisKhafizov/Computational-Mathematics | tests/2sem/task2.cpp | #include "../src/Matrixes/StandardMatrix.hpp"
#include "../src/UsefulOperations/VectorOperations.hpp"
#include <cmath>
#include <fstream>
void WriteToFile(Matrix &A, double gamma);
double max_val_diag(Matrix &A);
int main() {
// Константы
const double L = 10, gamma = 5. / 3, v_l = 0, v_r = 0, rho_l = 13, rh... | ALGO | 0.999691 | 4.096854 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2023-10-04T19:42: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": "6e062a3fad... |
67d28e61-31a7-41c2-be5b-e5f551bfa739 | bm-mit/VinhDinhCoder | 5311_PASSW2.cpp | //* 817093 09/08/2023 14:16:36 Minh4893IT PASSW2 - MẬT THƯ - HSG 22-23 GNU C++20 Accepted 46 ms 1140 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ss stringstream
#define endl "\n"
#define LLMAX INT64_MAX
#define IF(cond, t, f) (cond ? t : f)
#define OFILE(finp, fout) freopen(finp, "r... | ALGO | 0.999912 | 4.140141 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2023-05-09T06:15:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "056ed4919... |
54cdff97-288c-4a6d-9d0a-2e7f1fbbbd51 | task4233/contest | AtCoder/speed/revival/03/d.cpp | #include <bits/stdc++.h>
// statics
using namespace std;
using int64 = long long;
using PAIR = pair<int64, int64>;
constexpr int INF = 1 << 30;
constexpr int64 LINF = 1LL << 60;
constexpr int MOD = 1e9 + 7;
constexpr int MAX_N = 3e5 + 1;
// init/input
#define int int64
#define INIT ios::sync_with_stdio(false);cin.tie(... | ALGO | 0.999976 | 3.679576 | {
"github_metadata": {
"branch": "master",
"commit_count": 143,
"repo_created_at": "2018-03-08T13:28:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "846d6f0e... |
488f342b-e6d2-406e-8b07-1d20d70a0a70 | farhanishtiyak/Problem-Solving-CP | Codeforces/C_Permutation_Counting.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define Sezar ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define tc(t) int t; cin >> t; while (t--)
#define ll long long
typedef vector... | ALGO | 0.999929 | 4.301822 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2022-08-15T11:54: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": "3533f788f... |
3e4e981f-9fc9-4ab6-88d4-2864e5187023 | ishandutta2007/codeforces-r | robezh/normal/1491/F.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#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;
const int N = 2005;
bool ask_pre(int l, int r, int... | ALGO | 0.998436 | 3.336979 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58: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": "c3e690d85025... |
2269f639-6abd-4084-845e-b13c3956a14c | jazzsterq/programs | CPP/A_Treasure_Chest.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define be begin()
#define en end()
#define pb push_back
#define pyes cout << "YES\n"
#define pno cout << "NO\n"
#define ce cout << '\n'
#define endl '\n'
#define rev(v) reverse(v.begin(), v.end())
#define srt(v) sort(v.begin(), v.end())
#define all(v)... | ALGO | 0.999949 | 3.560533 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-05-21T14:38: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": "0b3bbc9f17c... |
f0156af7-7c7c-4306-8570-3b6824bb7373 | hgneer/PAT | 1013.cpp | #include <cstdio>
#include <vector>
#include <iostream>
using namespace std;
const int MAX = 1004;
const int INF = 1000000000;
int numCities,numRemaining,numToBeCheck;
int city1,city2;
int concern;
vector<int> Adj[MAX];
int father[MAX];
bool vis[MAX] = {false};
void init()
{
for(int i = 1;i < MAX;i++){
f... | ALGO | 0.999904 | 3.756725 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-01-21T13:46:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5ffb578452... |
29a5d6ae-ba32-42ef-b631-e59afcf938bb | rafaelcsva/CompetitiveProgramming | code/uva/10800.cpp | //23, 07, 2018, 15:40:16 Rafaelcs cpp
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
map<pii, char>mp;
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
for(int ... | ALGO | 0.999717 | 3.630535 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2017-08-30T23:18:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b93a804f... |
685ad6f5-0394-40f1-80ef-ca13f4b44aab | flaviomarcilio/course-information-systems | ED/beecrowd/03 - Camisetas/main.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
using namespace std;
class Camiseta
{
private:
string nome_;
string cor_;
char tam_;
public:
Camiseta();
Camiseta(string nome, string cor, char tam);
string ... | ALGO | 0.99154 | 4.357501 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2022-12-17T12:18: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": "da6f016b255... |
30f4c125-4ae6-4553-b4b1-30fded2c4302 | ishandutta2007/codeforces-l | lgswdn/normal/1659/E.cpp | #include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pii> vp;
typedef unsigned long long ull;
typedef bitset<509> bset;
typedef pair<bset... | ALGO | 0.999942 | 4.276755 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed39f8862b69... |
f4dfc405-59ac-4423-80c7-86c773e8f3ca | rokicki/cube20 | src/twophase.cpp | /*1:*/
#line 13 "twophase.w"
const char*BANNER=
"This is twophase 1.1, (C) 2010-2012 <NAME>. All Rights Reserved.";
#include "phase1prune.h"
#include "phase2prune.h"
#include <pthread.h>
#include <iostream>
#include <map>
#include <cstdio>
using namespace std;
/*2:*/
#line 44 "twophase.w"
int verbose= 1;
int nu... | ALGO | 0.999031 | 3.520448 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-06-02T15:57:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e9e81b93c... |
ffd950cf-a57e-469a-ad67-8905d43e8549 | zamfiroiu/SDD2020 | 1056_seminar02.cpp | #include<iostream>
struct Calculator {
char* producator;
int RAM;
float capacitate;
int deschis;
};
Calculator initCalculator(const char* prod, int RAM, float capacitate, int deschis) {
Calculator c;
c.producator = (char*)malloc(sizeof(char*)*(strlen(prod) + 1));
strcpy(c.producator, prod);
c.RAM = RAM;
c.ca... | TOOL | 0.930522 | 4.058742 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-02-23T19:24:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7ada20512... |
b6408e05-c176-469f-83cc-1609cd7f5b54 | Sabuj-Kumar/MyCodes | Uva oline/Binary search/Uva 11621 Small Factors.cpp | /**
<NAME>
17101139
University Of Asia Pacific
**/
#include<bits/stdc++.h>
#define pi acos(-1)
#define ll long long
#define ull unsinged long long
#define db double
#define ldb long double
#define pii pair< int,int >
#define pll pair< ll,ll >
#define ft first
#define sd second
#define pb push_back
#define ... | ALGO | 0.999873 | 3.823032 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-07-13T16:40:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ece2b857756... |
9e6816b2-aa9f-41ef-bddf-19ae16322b9b | nbourre/1SX_robotique | cours_08_encodeurs/ranger_straight/ranger_straight.ino | // Demonstrate how to use the gyro and encoders to go straight
// using a PD controller to correct the angle
// The application use a simple state machine to change the state
// Author: <NAME>
#include <MeAuriga.h>
enum AppState {STOP, STRAIGHT, TURNING};
AppState currentState = STOP;
#define DIST_WHEEL 151
#define... | TOOL | 0.969686 | 5.360852 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2022-08-22T19:42:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e31477aaa... |
416175a9-8c92-4012-8feb-2622d40264c7 | nafis195/URI | URI 2334/Main.cpp | // <NAME>
// URI_2334
// Little ducks
//Note: for this program I used "unsigned long long int" to work with 10^19 value. See below.
#include<iostream>
using namespace std;
int main ()
{
unsigned long long int P, LD;
cin >> P;
if (P == -1)
{
system ("pause");
return 0;
}
while (P != -1)
{
if (P == -1)
... | ALGO | 0.999766 | 3.803857 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2019-12-23T07:43: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": "fcd65208e... |
c823966f-344d-44aa-8e4f-f16664054b52 | kironbot/AtCoder | ABC/ABC161/b.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vc = vector<char>;
using vvc = vector<vc>;
using pll = pair<ll, ll>;
using stkll = vector<pll>;
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#de... | ALGO | 0.999985 | 3.366652 | {
"github_metadata": {
"branch": "master",
"commit_count": 743,
"repo_created_at": "2018-06-24T09:41: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": "60ae5bf4... |
53005048-787e-480e-b61d-452ac8ee51ea | Omer283/CPSubmissions | Codeforces/Educational Codeforces Round 115 (Rated for Div. 2) - (D) Training Session.cpp | #define _CRT_SECURE_NO_WARNINGS
#define fast ios::sync_with_stdio(false); cin.tie(0);
#define foru(i, k, n) for (int i = k; i < n; i++)
#define ford(i, k, n) for (int i = k; i >= n; i--)
#define ff first
#define ss second
#include <iostream>
#include <algorithm>
#include <vector>
#include <bitset>
#include <set>
#incl... | ALGO | 0.999979 | 4.110485 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-05-07T13:13:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6106dc126b8... |
15764de7-9ce9-461f-81ce-1689dd457d91 | pablofernandezorg/image-recognition | src/misc_utilities/tagplates.cpp | /*
* Copyright (c) 2015 OpenALPR Technology, Inc.
* Open source Automated License Plate Recognition [http://www.openalpr.com]
*
* This file is part of OpenALPR.
*
* OpenALPR is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License
* version 3 as publi... | TOOL | 0.906487 | 5.052926 | {
"github_metadata": {
"branch": "master",
"commit_count": 1210,
"repo_created_at": "2016-03-18T03:57:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 54,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb5ed... |
86a0a95b-2d01-4451-95a6-60c2e5f7830f | gaumn/PersonalRealizationOfDataStructureAndAlgorithm | data_structure/cpp/QueueList/QueueList.cpp | /*
* @Description:
* @Author: gaumn
* @Date: 2021-02-23 13:08:57
* @LastEditTime: 2021-02-23 15:19:40
* @LastEditors: gaumn
*/
template <class T>
QueueList<T>::QueueList(int len)
{
LinkNode<T> *Cur;
for (int i = 0; i < len; i++)
{
Cur = new LinkNode<T>();
if (i == 0)
{
... | TOOL | 0.979171 | 4.174109 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2021-03-14T13:49: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": "4c4be5eab3c... |
9289ad48-9fe2-4407-816b-3feb43759e57 | Sharma-Group/Dice-QMC | QMC/FCIQMC/runFCIQMC.h | /*
Developed by <NAME>
Copyright (c) 2017, <NAME>
This file is part of DICE.
This program is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) an... | ALGO | 0.998338 | 5.708888 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-04-06T21:31:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "60fecb8da90... |
36672fb6-5c2d-476e-9128-fd8d7f0bea7e | ssyze/Codes | Nowcoder Multi-University/8/A1.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e6 + 7, INF = 0x3f3f3f3f;
const ll LNF = 0x3f3f3f3f3f3f3f3f;
struct E {
int u, v, t;
} e[N];
int cnt;
#define lc ch[x][0]
#define rc ch[x][1]
struct LCT {
int fa[N], ch[N][2], st[N];
int mm[N], id[N], val[N];
bool rev[N... | ALGO | 0.999901 | 3.65564 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-07-24T14:09: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": "a621feef60... |
180a6e54-7887-48fd-a9b1-3fef5107f7ba | showbhitjain/TUM_SJ_ObstacleAvoidanceLib | obstacleAvoidanceOptmisationModified/codegen/lib/inverseKinematicsOAModified/computeQ_.cpp | //
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
// File: computeQ_.cpp
//
// MATLAB Coder version : 23.2
// C/C++ source code generated on : 04-Feb-2025 ... | ALGO | 0.99984 | 4.70466 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2025-06-22T17:09: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": "2d576be54... |
0250661b-24c9-4fdc-8ea4-23c4203e5bbc | mysql/mysql-server | extra/boost/boost_1_85_0/boost/geometry/srs/projections/proj/tmerc.hpp | // Boost.Geometry - gis-projections (based on PROJ4)
// Copyright (c) 2008-2015 <NAME>, Amsterdam, the Netherlands.
// Copyright (c) 2023 <NAME>, Lodz, Poland.
// This file was modified by Oracle on 2017, 2018, 2019, 2022.
// Modifications copyright (c) 2017-2022, Oracle and/or its affiliates.
// Contributed and/or m... | TOOL | 0.936148 | 3.047419 | {
"github_metadata": {
"branch": "trunk",
"commit_count": 186679,
"repo_created_at": "2014-09-26T09:31:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11540,
"forks": 4072,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "... |
0f75a144-5f3b-464b-84e9-ba992fddf236 | atharvabhide/SPPU-COMP-2019-PRACTICALS | DSA/08_obst.cpp | #include<bits/stdc++.h>
using namespace std;
int sum(int freq[], int i, int j);
int optCost(int freq[], int i, int j)
{
if (j < i)
return 0;
if (j == i)
return freq[i];
int fsum = sum(freq, i, j);
int min = INT_MAX;
for (int r = i; r <= j; ++r)
{
int cost = optCost(freq,... | ALGO | 0.999931 | 4.817388 | {
"github_metadata": {
"branch": "main",
"commit_count": 224,
"repo_created_at": "2021-12-12T05:12:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 81,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2becf4a3... |
d9016e5a-288a-44ee-a1bc-f3a4c610a367 | zhihuiLiang/code-exe | ojexe/exam/huawei0426-1.cpp | #include <queue>
#include <unordered_map>
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
unordered_map<int, int> depends_num;
unordered_map<int, vector<int>> depended;
queue<int> no_depend;
for(int i = 1; i <= n; ++i){
int num = 0;
cin... | ALGO | 0.999611 | 3.901276 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-04-02T13:20:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9be5755609ef... |
571a5706-517f-4df5-b99e-226d404b78a4 | piyushrawat369/GeeksForGeeks | Data Structure/Graph/Shortest Source to Destination Path/code.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
class Solution {
public:
int shortestDistance(int N, int M, vector<vector<int>> A, int X, int Y) {
if(A[0][0] == 0){
return -1;
}
... | ALGO | 0.99996 | 5.65505 | {
"github_metadata": {
"branch": "main",
"commit_count": 165,
"repo_created_at": "2022-12-27T13:56: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": "ed8c5e460d... |
72ebb6f4-247e-488b-b3c3-4cdd520e076e | Excalibur79/Competitive-Programming | Graphs/01BFS.cpp | // Author: <NAME>
// Linkedin: https://www.linkedin.com/in/ankur-saha/
// Github: https://github.com/Excalibur79
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pai... | ALGO | 0.999989 | 4.322736 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2021-07-28T07:09:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e383b97c0... |
1bbf2808-5452-45c6-b541-1bbcc3afa050 | Wankupi/xcpc-code-lib | graph/MinCostMaxFlow.cpp | int n = 0, m = 0, S = 0, T = 0;
int head[maxn], nxt[100010], to[100010], val[100010], cost[100010], cnt = 1;
bool in[maxn];
int dis[maxn], pre[maxn];
bool spfa() {
memset(in, 0, sizeof(in));
memset(dis, 0x3f, sizeof(dis));
memset(pre, 0, sizeof(pre));
queue<int> q;
q.push(S); in[S] = true; dis[S] = 0;
while (!q.e... | ALGO | 0.999767 | 3.636756 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-11-22T04:40:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3598e05b738d... |
c2527f2a-226a-4ac2-afa5-1697077214c9 | prashkothawade/CppIntQue | bubblesort.cpp | // Q8. Bubble sort program
//
// Author - <NAME>
// Date - 10-04-2016
#include <iostream>
using namespace std;
// Bubble sort function
void sort(int arr[], const int sz){
bool change = true;
// Outer pass (size-1) times
// If there wasn't any change in last iteration
// then we are done with sorting
for(int i=0;... | ALGO | 0.998693 | 4.501832 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2016-04-07T17:26:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "038d990c3... |
68b98f12-e4ce-45af-96ef-b86447a00f03 | 0starzyk/long-lived-tracking-challenge | LocalTrackReco/MooreEnhanced/Tr/TrackExtrapolators/src/TrackDistanceExtraSelector.cpp | /*****************************************************************************\
* (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration *
* *
* This software is distributed under the terms of the GNU General Public *
... | TOOL | 0.930687 | 6.959893 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-01-17T08:14:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "27f67b53e8... |
9b1196dc-fbb7-4023-a250-8b98c96e1e18 | Mohamedeid-11/ACM | Level 1/weeks/week 3/sheet/Sort the Array.cpp | #include <iostream>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int arr[n];
bool sorted = true;
for (int i = 0; i < n; i++)
{
cin >> arr[i];
if (i && arr[i] < arr[i - 1])
sorted = false;
}
i... | ALGO | 0.999986 | 3.820124 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-03-10T14:45: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": "62e746d467d4... |
330c5531-e4bc-4671-b601-2e6d4606c8c9 | karabatov/adventofcode2020 | day15_2.cpp | #include <chrono>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <unordered_map>
// https://adventofcode.com/2020/day/15#part2
struct Pair {
int one{-1}, two{-1};
bool HasBoth() { return one != -1; }
int Diff() { return two - one; }
void Push(int num) {
one = two;
... | ALGO | 0.999634 | 5.530733 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2020-12-01T21:25:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "401cd344b... |
cee3eaba-837b-40bd-85f4-27818c2d6627 | superj6/CPcode | c++ sol/CSES/Range Queries/range_queries_and_copies.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <math.h>
#include <vector>
using namespace std;
#define endl '\n'
struct segTree{
int l, r;
segTree *left, *right;
long val;
bool chg = 0;
segTree(int a, int b){
l = a;
r = b;
if(l != r){
int mid = (l + r) / 2;
left = new segTre... | ALGO | 0.999742 | 4.196101 | {
"github_metadata": {
"branch": "master",
"commit_count": 441,
"repo_created_at": "2019-09-09T05:55:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 129,
"forks": 37,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7315b... |
2a899bd0-f284-4e8d-9472-0da2a1cfe7e3 | VcDevel/Vc | src/avx_sorthelper.cpp | /* This file is part of the Vc library. {{{
Copyright © 2011-2015 <NAME> <<EMAIL>>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list... | ALGO | 0.998908 | 6.727038 | {
"github_metadata": {
"branch": "1.4",
"commit_count": 5010,
"repo_created_at": "2014-02-25T09:07:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1505,
"forks": 153,
"issues": 81,
"pull_requests": 8
},
"file_meta": {
"content_id": "62bda... |
43f4ca00-4adf-462f-854a-e8f323e55e07 | necst/iron | src/hls/mutual_info.cpp | /******************************************
*MIT License
*
# *Copyright (c) [2022] [<NAME>, <NAME>, <NAME>, <NAME>, <NAME>]
*
*Permission is hereby granted, free of charge, to any person obtaining a copy
*of this software and associated documentation files (the "Software"), to deal
*in the Software without restriction,... | ALGO | 0.999615 | 5.908881 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2020-11-25T08:25:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 21,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "183fedb8f032... |
44c5859d-bb5b-4056-a8f4-97fb78386e5e | PUIPUI-MOLCAR/atcoder | abc/116/c.cpp | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
int ma... | ALGO | 0.999969 | 3.943228 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2021-02-04T11:01: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": "d19968a566... |
be357ac9-74cd-4ab7-bf4a-a5e08016538e | siddharthgusain/CODING_PRACTICE | Stack/8.Siliding_window_maximum.cpp | #include <iostream>
#include <vector>
#include <deque>
std::vector<int> maxSlidingWindow(const std::vector<int> &nums, int k)
{
std::deque<int> dq; // Deque to store indices of elements
std::vector<int> result;
for (int i = 0; i < nums.size(); i++)
{
// Remove indices that are out of the windo... | ALGO | 0.999941 | 7.356569 | {
"github_metadata": {
"branch": "main",
"commit_count": 354,
"repo_created_at": "2022-02-13T19:32:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4af08d8301... |
f95fb723-ec00-45c8-84a2-e132be337b6b | metulburr/compiler | compiler.cpp | #include <iostream>
#include <vector>
#include <sstream>
#include <string>
#include <algorithm>
class String{
public:
std::string str;
std::vector<std::string> tokens;
char delim;
String(std::string string, char delimiter='\n'){
str = string;
delim = del... | TOOL | 0.985103 | 4.111533 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2013-11-05T18:56:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "34f006cf6b... |
564829fa-8202-4f05-906f-57f363d6af3e | Ketroel/Test_homework_7_CPP | ConsoleApplication7.cpp | #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian"); // Даём возможность пользоваться в консоли русским языком
int A_B = 0; // Переменная отвечает за расстояние из точки A в точку B
int B_C = 0; // Переменная отв... | ALGO | 0.996209 | 3.420714 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-02T17:57: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": "f3079845f0d6... |
cf0a4832-da16-4960-9e87-4558ceaa4548 | urparvezali/codes | cds1/F_-_Sort_the_Array.cpp | // <NAME>, ICE-13 of PUST
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<char> vchar;
typedef vector<string> vstr;
#define endl '\n'
void Y(){cout<<"YES"<<endl;}
void N(){cout<<"NO"<<endl;}
void IOS(){... | ALGO | 0.999912 | 3.490515 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2023-10-08T18:33: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": "1993b5d49ba... |
d84cd967-10ae-44a6-9f12-d99da42720f8 | wegamekinglc/Derivatives-Algorithms-Lib | dal/math/aad/blocklist.hpp | /*
* Modified by wegamekinglc on 2020/12/13.
* Written by <NAME> in 2018
* This code is the strict IP of Antoine Savine
* License to use and alter this code for personal and commercial applications
* is freely granted to any person or company who purchased a copy of the book
* Modern Computational Finance: AAD an... | TOOL | 0.948505 | 6.689024 | {
"github_metadata": {
"branch": "master",
"commit_count": 1334,
"repo_created_at": "2017-12-19T06:44:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2639e... |
718f1134-6615-46cc-93a3-bdaee9b6b608 | aatanas/PCP-FreeRTOS | PCP-FreeRTOS.ino | #include <Arduino_FreeRTOS.h>
#include <semphr.h>
#define RES_SIZE 4
#define ITER 5
#define RTParam 5
#define printff(args...) printf(args); fflush_SERIAL()
#define printlnf(x) println(x); Serial.flush()
int serial_putchar(char c, FILE* f) {
if (c == '\n') serial_putchar('\r', f);
return Serial.write(c) == 1? ... | TOOL | 0.991742 | 4.5632 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-03-31T00:30:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b1211f4667ee... |
f808e79a-3611-4eda-bb2b-87afe9d65b75 | ishandutta2007/codeforces-k | kostia244/normal/809/B.cpp | #pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
using namespace std;
using ll = long long;
using vi = vector<ll>;
using pi = pair<ll, ll>;
const int maxn = 3e5 + 55, mod = 1e9 + 7;
mt19937... | ALGO | 0.999951 | 3.275377 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06: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": "14c73a75944b... |
6ae80944-9718-4094-becf-b3cc6c4672fa | cosmic-boy0111/Preparation | SheetProblems/Backtracking/5_Nqueens.cpp | #include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vs vector<string>
#define vb vector<bool>
#define pi pair<int,int>
#define mi map<int,int>
#define umi unordered_map<int,int>
#define qi queue<int>
#define vpi vector<pi>
#define vvi vector<vi>
#define ff first
#define ss second
#define inc(... | ALGO | 0.999978 | 4.557454 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-03-22T04:58:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "56afe52e4a8... |
f59b72d6-84f7-4ed1-a82e-56059bff256d | VladCincean/infoarena | infoarena/reuniune.cpp | #include <cstdio>
#include <cstdlib>
typedef struct {
long long x1, y1, x2, y2;
} rectangle;
inline long long max(long long a, long long b) {
return a > b ? a : b;
}
inline long long min(long long a, long long b) {
return a < b ? a : b;
}
inline long long _abs(long long a) {
return a > 0 ? a : -a;
}
inline lon... | ALGO | 0.998652 | 3.530644 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-12-24T20:52: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": "13d19a5322... |
7572d389-8669-4970-9b71-1f4925e91c9d | NormanBrandon/ProtecoHardware | Brazo-Mecánico/BrazoMecanico/BrazoMecanico.ino | #include <VarSpeedServo.h>
#include <math.h>
VarSpeedServo base;
VarSpeedServo hombro;
VarSpeedServo codo;
VarSpeedServo muneca_1;
VarSpeedServo muneca_2;
VarSpeedServo pinza;
int contador = 0;
int rutina[6][8];
int secuencia[][8] = {
{88,67,160,94,22,180},
{88,67,160,94,22,110},
{88,113,123,94,22,110},
{0,113,12... | ALGO | 0.95261 | 4.468237 | {
"github_metadata": {
"branch": "master",
"commit_count": 101,
"repo_created_at": "2019-03-23T18:39:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc04962b... |
fe99303a-9f7c-46dc-b9d1-368a60abdfe1 | der-himmel/Alphabot-MAI | Source/Cam.cpp | #include "opencv2/opencv.hpp"
#include <iostream>
#include <string>
#include <math.h>
#include "Cam.h"
using namespace cv;
using namespace std;
Cam::Cam(int i)
{
cap.open(i);
if (!this->cap.isOpened())
{
cout << "Error. Can't open the video source." << endl;
}
else
{
cout <<... | TOOL | 0.981914 | 5.087011 | {
"github_metadata": {
"branch": "main",
"commit_count": 87,
"repo_created_at": "2023-02-28T04:06:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a95fdeb1c6... |
c032aaf0-411a-4beb-867b-aea82d31e37d | Golovanov399/cryptozoology-team-notebook | graphs/components.cpp | struct Graph {
void read() {
int m;
cin >> n >> m;
e.resize(n);
for (int i = 0; i < m; ++i) {
int u, v;
cin >> u >> v;
--u; --v;
e[u].push_back(v);
e[v].push_back(u);
}
}
/* COMMON PART... | ALGO | 0.999775 | 4.71859 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2018-01-15T16:58:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb7313eeb... |
51530428-225c-4094-b13c-4f9c4c474124 | zealtez/Algorithm | BaekJoon/7576.cpp | /*https://www.acmicpc.net/problem/7576 */
#include <iostream>
#include <queue>
using namespace std;
#define FOR(i,to)for(int i = 0; i<to ; i++)
#define MAX(a,b)(a>b?a:b)
const int moveX[] = { -1,1,0,0 };
const int moveY[] = { 0,0,-1,1 };
int N, M, cnt = 0;
int tomato[1005][1005];
int main(void) {
int i = 0, j = 0,... | ALGO | 0.999997 | 3.7143 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2016-10-04T12:57: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": "87e4fe57... |
499917fe-c258-4503-bc1d-ee1baa078856 | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/15/04/12.cpp | #include <iostream>
#include <numeric>
#include <iterator>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <bitset>
#include <stack>
#include <string>
#include <sstream>
#include <math.h>
#define REP(i,n) for(int i = 0; i<(n); i++)
#define ITER(i,v) for(auto i : v)
#defin... | ALGO | 0.99983 | 3.528073 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "60b6b931... |
1d64f791-a116-46a0-a6b1-0386e9c8bc48 | SuseelKumarG/cpsolns | E_Character_Blocking.cpp | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll;
typedef pai... | ALGO | 0.999525 | 4.579602 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2024-05-26T12:31: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": "81def657307... |
4a683b35-5309-4011-8684-8bf6d31c2e90 | liuweiky/GPLT | L3-014/main.cpp | #include <cstdio>
#include <vector>
#include <climits>
#include <algorithm>
#include <queue>
#define MAX_N 128
#define MAX_M 128
#define MAX_STOP 10240
using namespace std;
struct edge
{
int s, t, d;
edge(int _s, int _t, int _d): s(_s), t(_t), d(_d) {}
};
struct prio_qnode
{
int s, d;
prio_qnode(int... | ALGO | 0.999961 | 3.891435 | {
"github_metadata": {
"branch": "master",
"commit_count": 118,
"repo_created_at": "2019-02-19T05:45:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c939ec3a... |
441572b1-2b08-469d-8490-bca0d74ab485 | tonyz74/CompetitiveProgramming | Problems/USACO/Gold/CircularBarn.cpp | #include <iostream>
#include <vector>
#include <set>
using namespace std;
#define MAX_A ((int) (5 * 1e6 + 4))
using i64 = long long;
bool table[MAX_A];
set<i64> primes_by_mod[4];
void sieve() {
table[1] = true;
primes_by_mod[1].insert(1);
for (i64 i = 2; i < MAX_A; i++) {
if (!table[i]) {
... | ALGO | 0.999956 | 3.934577 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-04-23T01:15: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": "43f463577bcb... |
c3473ad9-a485-4e0c-95ea-aa7aac406cc2 | isha0612/DAA_lab_assignments | Week 7/Ques1/Ques1.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 6;
vector<pair<int, int>> graph[N];
void dijkstra(int source) {
vector<bool> vis(N, 0);
vector<int> dis(N, INT_MAX);
dis[source] = 0;
set<pair<int, int>> s;
s.insert({0, source});
while(!s.empty()) {
auto node = *s.begin();
... | ALGO | 0.999828 | 4.063771 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2022-03-04T03:50:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37be86dee... |
9cc80b2e-a1a9-43de-9421-6bf1a5806d33 | bira37/problem-solving | Codeforces/Official Rounds/Educational Round 40/F.cpp | #include <bits/stdc++.h>
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define endl '\n'
#define pb push_back
#define ii pair<int,int>
#define vii vector< ii >
#define LL_MAX LLONG_MAX
#define LL_MIN LLONG_MIN
#d... | ALGO | 0.999957 | 3.388847 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2019-07-09T22:50:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 33,
"forks": 5,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "876dc1f... |
8caf4bdc-3b14-4e58-8cb4-68f9d0d7e333 | AnilChalia/CPP-codes | GreedAlgo.cpp | // #include<bits/stdc++.h>
// using namespace std;
// int main() {
// int row = 8;
// int col = 15;
// int tower = 3;
// vector<pair<int,int>> loc(3);
// loc.push_back({3,8});
// loc.push_back({11,2});
// loc.push_back({8,6});
// vector<int> Xdim;
// Xdim.push_back(0);
// Xdim.... | ALGO | 0.99988 | 4.725467 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-07-15T07:45: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": "09c71dde2ae7... |
5f74e899-ee44-4100-b64d-fea923a5d384 | mgruppi/parallelmeshsimplification | SimpVertexClustering.cpp | #include "SimpVertexClustering.h"
#include <iostream>
using namespace std;
SimpVertexClustering::SimpVertexClustering(Surface* surf, int grid_dim)
{
gdim = grid_dim;
s = surf;
dim[0] = s->bbox.getXLen()/grid_dim;
dim[1] = s->bbox.getYLen()/grid_dim;
dim[2] = s->bbox.getZLen()/grid_dim;
cell = new vector<Po... | ALGO | 0.969714 | 4.016203 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2016-04-20T16:38:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "472572d2... |
1ddb643f-7751-4961-a18c-bbb0a56b5ef1 | yaannnik/my-leetcode-solutions | Union-Find/1319.Number-of-Operations-to-Make-Network-Connected.cpp | #include <vector>
#include <numeric>
#include <unordered_map>
using namespace std;
/*
* 对于k个partitions,需要k-1条线连通。
* 对每个partition的size,只需要size-1条线。
* 检查每个partition内冗余的线的总数量和是否大于k-1即可
*/
class Solution {
public:
int makeConnected(int n, vector<vector<int>>& connections) {
groupSize = vector<int>(n, 1);
... | ALGO | 0.999707 | 5.230735 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2021-10-10T16:45:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fe2d714899... |
8d6783d7-80ef-4ee1-ab48-00ad182a3427 | Felipe-Tagawa/C03 | Treino/Treino Insertion Sort.cpp | #include <iostream>
using namespace std;
void insertionsort(int valores[], int n)
{
int i, j, key;
for(j = 1; j < n; j++)
{
key = valores[j];
i = j - 1;
while(i >= 0 && valores[i] > key) // valores na posição anterior a j(que é i, pois i = j-1), maiores do que a chave, esse valor maior entra em i+1 que é j.
... | ALGO | 0.999919 | 4.929133 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-09-26T19:11:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "521bfd0c4c3a... |
f547121f-1254-4bef-8643-bd2dff2c370c | f2rkan/intro-to-Programming-w-c-plus-plus | part-4/3/pzr10.cpp | #include<iostream>
long double probability(unsigned numbers, unsigned picks);
int main(void)
{
using namespace std;
double total, total_powerball, choices, choices_powerball;
cout << "izin verilen kart sayisini ve bahis sayisini gir: ";
while((cin >> total >> choices) && choices <= total)
{
... | ALGO | 0.927168 | 4.079471 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-07-03T10:58: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": "7d0e9d64841... |
fdf5092d-c76d-41af-9d2a-4375cf872ba8 | abhishek-217/DSA_Questions | 2493-reverse-odd-levels-of-binary-tree/2493-reverse-odd-levels-of-binary-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99999 | 5.995134 | {
"github_metadata": {
"branch": "main",
"commit_count": 1206,
"repo_created_at": "2024-09-18T16:11: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": "d1d06f69c... |
3af4c3b9-6b4f-477c-9e81-ff18d638ae1b | fhormoz/caviar | CAVIAR-C++/armadillo/include/armadillo_bits/fn_eig_pair.hpp | // Copyright (C) 2015-2016 National ICT Australia (NICTA)
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// -----------------------------------------------------... | ALGO | 0.985616 | 6.568933 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2014-12-05T22:46:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 60,
"forks": 25,
"issues": 17,
"pull_requests": 1
},
"file_meta": {
"content_id": "acc7a... |
91909c14-e2cb-4c57-ad45-84ca3e82335d | gs22006/Baekjoon | 백준/Silver/2167. 2차원 배열의 합/2차원 배열의 합.cc | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef __int128 lll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pld;
#define MAX 9223372036854775807LL
#define MIN -9223372036854775807LL
#define INF 0x3f3f3f3f3f3f3f3f
#define fi first
#define se second
#define fastio ios... | ALGO | 0.999706 | 4.002087 | {
"github_metadata": {
"branch": "main",
"commit_count": 810,
"repo_created_at": "2022-09-22T00:45: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": "bf645e189e... |
4f59db17-a7d3-4f59-ae08-0854e0a09925 | BenjyWP/csrn-maze-traversal | src/MAZE_CELLULAR_SRN_FEEDBACK.cpp | #include <math.h>
#include "mex.h"
void maze_neighbor(long maze_size, long cell_num, long direction, long &r, long &c)
// from a given row, col in the maze, returns row and col of
//its neighbor
{
long row, col;
row = (cell_num-1) / maze_size + 1;
col = cell_num - (row-1)*maze_size;
//mexPrintf("row %d col %d\n", row,c... | ALGO | 0.999996 | 4.219263 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-03-01T07:28:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cd9c4630d... |
487a3667-430c-419c-8d03-03d509a65c2b | charles-ison/sv_term_project | learnply/contour_and_crit_point.cpp | #include "contour_and_crit_point.h"
#include "color_and_height_transform.h"
#include "polyhedron.h"
#include "polyline.h"
#include "GL/freeglut.h"
#include <iostream>
#include <algorithm>
extern int NUM_CONTOURS;
extern Polyhedron* poly;
extern std::vector<POLYLINE> polylines;
extern std::vector<CRITICAL_POINT> critic... | ALGO | 0.904725 | 4.491848 | {
"github_metadata": {
"branch": "main",
"commit_count": 91,
"repo_created_at": "2022-11-18T06:33: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": "5de06d2021c... |
09b02b17-1a21-4ad9-b55d-cd76366fa7b9 | joseleite19/competitive-programming | codeforces/400/C.cpp | #include <bits/stdc++.h>
using namespace std;
// xxxxxxxxxxxxxxxxxxx
// ^ ^
// b a
// a - b = x
// a - x = b
int n;
long long sum[100005], v[100005], k;
long long target[100];
map<long long, long long> cnt;
int main(){
scanf("%d %lld", &n, &k);
for(int i = 0; i < n; i++)
scanf("%ll... | ALGO | 0.999929 | 3.823679 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2016-04-28T15:19:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "920b62288... |
52450df2-3037-40d9-bdda-763f76dedd7f | lifasheng/leetcode | cpp-version/implement-strstr.cpp | class Solution {
public:
// test case: [NULL, NULL], ["a", NULL"], [NULL, "a"], ["", ""], ["a", ""], ["", "a"], ["a", "a"], ["a", "ab"], ["ab", "b"]
// ["", ""] and ["a", ""] should return 0
#define M1
#ifdef M1
// O(n*m) time, O(1) space
int strStr(char *haystack, char *needle) {
if (!needle) return 0;
... | ALGO | 0.999882 | 5.157538 | {
"github_metadata": {
"branch": "master",
"commit_count": 488,
"repo_created_at": "2015-01-14T08:23:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0c1e18a... |
2c1648b6-b9a1-47bd-91f7-b8966a063833 | cmuparlay/parlaylib | examples/quickhull.cpp | #include <iostream>
#include <string>
#include <random>
#include <parlay/primitives.h>
#include <parlay/random.h>
#include <parlay/internal/get_time.h>
#include "quickhull.h"
// **************************************************************
// Driver code
// **********************************************************... | ALGO | 0.995492 | 5.44626 | {
"github_metadata": {
"branch": "master",
"commit_count": 221,
"repo_created_at": "2019-12-10T19:52:11.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 369,
"forks": 71,
"issues": 17,
"pull_requests": 3
},
"file_meta": {
"content_id": "ffd52... |
52a43587-9a94-40c6-97e5-6571d4333b21 | ShahidAkhtar777/DS-Algo | Array/1698P_LtCode_V5.cpp | /*
Problem Statement:
You are given a string S of length N. You have to find the count of all distinct substrings of this string.
Input Format:
- The first line contains an integer T, denoting the number of test cases.
- Each test case contains a string S of length N.
Output Format:
For each test case, print the c... | ALGO | 0.999886 | 6.059597 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2023-01-29T14:36: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": "69b88f37c... |
9a64da1d-d5fb-4b4a-aadf-d300aa95e834 | pkse1213/algorithm | SWExpertAcademy/SWEA_1953_RE.cpp | /*
1953. 탈주범 검거 다시풀기
*/
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
int T, N, M, R, C, L, board[50][50], cnt = 0;
bool visited[50][50];
bool dir[4];
int dr[4] = {-1,0,1,0};
int dc[4] = {0,1,0,-1};
bool movable(int dir, int t)
{
i... | ALGO | 0.999579 | 4.484859 | {
"github_metadata": {
"branch": "master",
"commit_count": 206,
"repo_created_at": "2019-12-23T06:52:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3e42e342... |
76605a68-9eea-4dba-85dc-d4cbc7f25bbf | khiemluong/GraphLearning | Medium/FloodFill/test.cpp | #include <bits/stdc++.h>
using namespace std;
void dfs(vector<vector<int>> &img, int x, int y, int prevClr, int newClr)
{
if (img[x][y] != prevClr)
return;
img[x][y] = newClr;
int m = img[x].size();
int n = img.size();
if (x - 1 >= 0)
{
dfs(img, x - 1, y, prevClr, newClr);
... | ALGO | 0.999706 | 5.626374 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-01-23T01:30: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": "a0dec3df4e5f... |
a85a7430-bc23-41d2-b50e-272e5d8fc3ca | aospapp/aosp | external/ComputeLibrary/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp | /*
* Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* ri... | ALGO | 0.929269 | 6.127121 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-11-22T06:39:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 16,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6719f4665b... |
4e8aebaf-24bb-46ee-89f7-0fa5f6ed24e9 | Ginakira/Code-Archive | HZOJ/DataStructrue/heap_sort.cpp | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define swap(a, b) \
{ \
__typeof(a) __temp = a; \
a = b; \
b = __temp; \
}
//自上向下调整
void down_update(int *arr, int n, int ind) {
while ((ind << 1) <= n) {
... | ALGO | 0.999922 | 4.506177 | {
"github_metadata": {
"branch": "master",
"commit_count": 2104,
"repo_created_at": "2019-11-10T06:03:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e82ac21... |
6c4db7ed-cdeb-4953-8927-d9442f5e5ec8 | wooworld/my-random-cpp-libraries | projects/undergraduate/cs153/program7/bubblesort.h | /*******************************BEGINNING OF FILE*****************************/
//Author: <NAME>
//Date: 10/23/07
//Purpose: To sort an array using the bubblesort method
/* Templated bubbleSort function will sort primitive data types with no
overloading of operators.
Pre: Operator > is defined for passed type, C < th... | ALGO | 0.999606 | 5.100424 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2015-04-08T07:18:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f0653b51... |
534a1115-8f17-492a-87fa-19ce2af76c64 | gwYun/2023-April-coding-study | taehunlee/2020카카오인턴십_보석쇼핑.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> solution(vector<string> gems) {
unordered_set<string> ss;
for (string g : gems) {
ss.insert(g);
}
int n = ss.size();
int sz = gems.size();
ss.clear();
int l = 0, r = 0;
int ml = 0;
int mr = sz;
unordered_map<string, int> sm;
while ... | ALGO | 0.999969 | 4.752863 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2023-04-01T12:42:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7608749a95f... |
2999c813-029e-4b6f-a8bb-79f4fa7d56d8 | liuruoze/EasyPR | thirdparty/LBP/lbp.hpp | /*
* Copyright (c) 2011. <NAME> <bytefish[at]gmx[dot]de>.
* Released under terms of the BSD Simplified license.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above ... | ALGO | 0.937775 | 3.139502 | {
"github_metadata": {
"branch": "master",
"commit_count": 582,
"repo_created_at": "2014-09-19T11:46:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6407,
"forks": 2498,
"issues": 77,
"pull_requests": 9
},
"file_meta": {
"content_id": "5... |
b7346a26-88b6-48c0-8c16-ee66235b0d45 | AndrewImalion/MyCppCodes | Gerg2Sexa.cpp | //Gerg2Sexa。
//将格里高利历转化为干支纪年
//公元3年前不适用
//@BaronChang,AllRightsReserved.2018
//TODO:fix BC isue
#include "stdafx.h"
#include<iostream>
#include<string>
using namespace std;
bool IsLeapYear(int year)
{
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
return true;
else
return false;
};
string FindTianGa... | ALGO | 0.999578 | 3.817663 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2016-07-08T12:45: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": "7eb4f6ebf... |
c1a02e20-edd9-4dad-9f4e-4bf1bb5a2836 | mdnur/Aiub-introduction-programming-lab | Lab-2-User-Input-Operators-and-Expressions/lab-task/program-4.cpp | /** Write a program to check odd or even number
* (a) using modulus operator \
* (b) using bitwise operator
* (c) without using bitwise and modulus operator
* (d) using conditional operator.
* */
#include <iostream>
using namespace std;
int main()
{
int num;
cin >> num;
// check for problem a
... | ALGO | 0.987482 | 3.963089 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2021-02-25T08:30: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": "8eadc3e94ac... |
d4e7013a-5681-45e4-adc4-c5d03e9cbee4 | gillespiepeterj/ParticleExplosion | src/main.cpp | //===================================== =======================================
// Name : main.cpp
// Author : <NAME>
// Version : v1
// Copyright : Your copyright notice
// Description : Particle Explosion simulation using SDL
//========================================================================... | TOOL | 0.969362 | 5.668601 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-10-14T00:00:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ecb0fdb1bc... |
c4b413bf-710f-47b0-aede-46d017537c2b | Tanmoytkd/programming-projects | UVA/10689 - Yet another Number Sequence/main.cpp | /*
ID: tanmoyk2
PROG:
LANG: C++11
*/
#include <bits/stdc++.h>
#define pf printf
#define sf scanf
#define pb push_back
#define Pb pop_back
#define sf1(x) scanf("%d", &x)
#define sf2(x,y) scanf("%d %d", &x, &y)
#define sf3(x,y,z) scanf("%d %d %d", &x, &y, &z)
#define pf1(x) printf("%d\n", x)
#define PI acos(-1.00)
#defi... | ALGO | 0.999907 | 3.527256 | {
"github_metadata": {
"branch": "master",
"commit_count": 195,
"repo_created_at": "2015-09-15T12:04:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "348f7bd1... |
6190d10a-af3b-45c7-960d-296ea988d0d2 | tec-csf/tc2017-algoritmos-avidos-NotEmilioAG99 | mochila.cpp | #include <iostream>
#include <vector>
using namespace std;
struct elementos{
int peso;
int beneficio;
} ;
void imprimirEst(elementos *e,int n)
{
cout<<"Elementos que se tienen ordenados por mayor beneficio"<<endl;
for(int i=0;i<n;i++)
{
cout<<"peso: "<< e[i].peso<<" ";
cout<<"Beneficio: "<<... | ALGO | 0.999863 | 4.01895 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-03-27T13:56:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ced9e2396f... |
e038c0f8-b697-43d8-9409-e71de514b1d0 | ishandutta2007/codeforces-k | kostka/normal/730/A.cpp | //<NAME>
// You are not prepared!
#include "bits/stdc++.h"
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
vector <string> M;
int n;
cin >> n;
vector <int> a(n);
for(int i=0; i<n; i++)
cin >> a[i];
while(true)
{
if(*max_element(a.begin(), a.end()) == *min_element(a.begin(), a... | ALGO | 0.999665 | 3.177003 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06: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": "bfe440772f63... |
a8b90fe8-ad16-4604-8765-543bd6a63a75 | jrbustosm/uva-solved-exercises | 23 Out of 5/10344.cpp | /*
23 Out of 5
<NAME>
*/
#include <iostream>
#include <algorithm>
using namespace std;
bool test(int* v);
int calc(int* v, int* ops);
int calc(int a, int b, int op);
bool next(int* v, int N);
int main(){
int v[5];
cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4];
while(!(v[0]==0 && v[1]==0 && v[2]==0 && v[3]==... | ALGO | 0.999803 | 4.011244 | {
"github_metadata": {
"branch": "master",
"commit_count": 187,
"repo_created_at": "2012-07-25T17:37:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a82edaaa... |
e215d249-6dcf-4482-aa60-5cbc25812653 | ishandutta2007/codeforces-m | marckess/normal/679/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<in... | ALGO | 0.999591 | 3.797596 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "49e6d306dc9a... |
986017f3-a0c7-4df7-b1d1-bb91ccbdd970 | Leobuaa/LeetCode | C++/Best Time to Buy and Sell Stock IV/main.cpp | class Solution {
public:
int maxProfit(int k, vector<int>& prices) {
int size = prices.size();
if (size <= 1) return 0;
vector<vector<int>> dp(2, vector<int>(size, 0));
int cur = 0, next = 1;
if (k > size / 2)
{
int res = 0;
for (int i = 1; i ... | ALGO | 0.999959 | 5.627383 | {
"github_metadata": {
"branch": "master",
"commit_count": 221,
"repo_created_at": "2016-04-11T13:14:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd4a8e45... |
74a8db0b-c96d-4c82-81e3-658cb1c8adc0 | kamkow10/PUT | sem6/PRoz/Projekt zaliczeniowy/code/output/sortOutput.cpp | #include <iostream>
#include <list>
#include <fstream>
#include <string>
using namespace std;
typedef struct {
int lamport;
int procId;
string lineText;
} OutputLine;
string getString(char x) {
string s(1, x);
return s;
}
bool compLamport(OutputLine x, OutputLine y) {
return x.lamport < y.la... | ALGO | 0.998225 | 4.687179 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2019-04-06T10:07:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "46905d22e... |
9a237d56-095e-4763-86c8-e4fa2ad69f46 | cycasmi/proyectos-VS | Verano 2016/Matematicas computacionales/Prueba_Recursion/Prueba_Recursion/versionAnterior.h | #include <iostream>
#include <string>
using namespace std;
void remplazar(string soluciones[], int *solucion, string *word, char letter, string abecedarioElem, string abecedario[], int *abc)
{
int first = 0;
for (int i = 0; i < (*word).size(); i++)
{
cout << "Para i = " << i << "y letra " << letter << " " << (*w... | ALGO | 0.999439 | 3.790257 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-10-27T22:17:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a974dae1c7... |
1731475c-bf8e-48d6-a62c-5e638803c900 | databricks/megablocks | csrc/cumsum.h | #undef CUB_WRAPPED_NAMESPACE
#define CUB_WRAPPED_NAMESPACE megablocks
#include <cstdint>
#include <cub/cub.cuh>
#include <c10/cuda/CUDAStream.h>
#include <torch/extension.h>
#define CUDA_CALL(code) \
do { \
cudaError_t status = code; ... | ALGO | 0.99497 | 7.165757 | {
"github_metadata": {
"branch": "main",
"commit_count": 268,
"repo_created_at": "2023-01-26T00:24:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1387,
"forks": 204,
"issues": 38,
"pull_requests": 3
},
"file_meta": {
"content_id": "e4a08... |
48e9ffae-53b2-4f96-a5ec-be696f0cfb00 | qnvudch03/InhaTest | Makemaze/Maze/Player.h | #pragma once
class Player
{
public:
// 내가 바라보는 방향의 다음 좌표
Pos delta[(int)MoveDir::MOVE_MAX] =
{
Pos(-1, 0), // 왼쪽
Pos(1, 0), // 오른쪽
Pos(0, -1), // 위쪽
Pos(0, 1), // 아래쪽
Pos(-1, -1), //좌상단
Pos(1, -1), //우상단
Pos(-1, 1), //좌하단
Pos(1, 1) //우하단
};
void SetBoard(class Board* board) { _board = board;... | ALGO | 0.98247 | 3.739829 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2025-05-21T01:02:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2edf7c41a80... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.