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 |
|---|---|---|---|---|---|---|---|
8a6684d7-d2f3-4ada-9dff-7c1d37026584 | hckrtst/notesnsnippets | linkedin_cpp_concurrency/starvation_demo_potential_fix1.cpp | /**
* Too many philosophers, thinking and eating sushi
*/
#include <thread>
#include <mutex>
int sushi_count = 5000;
//this solution is not great because it relies on the OS scheduling
// see condition variables for a better fix
void philosopher(std::mutex &chopsticks, int i) {
int consumed = 0;
// let's t... | ALGO | 0.972417 | 4.51842 | {
"github_metadata": {
"branch": "main",
"commit_count": 337,
"repo_created_at": "2023-06-18T17:32: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": "8cd6bf5019... |
674b927f-7b8f-4eb3-b613-812161bbabd9 | meooow25/competitive-programming | DynamicLiChao.cpp |
// LiChao Segment Tree
// Supports insertion of lines and min queries
// https://e-maxx-eng.appspot.com/geometry/convex_hull_trick.html
namespace LiChao {
const long long INF = 1e18;
const int MAX_NODES = 1e6;
struct line {
long long m, c;
inline long long eval(long long x) { return m * x... | ALGO | 0.999737 | 5.172294 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-03-04T21:16:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fecbb9dce... |
bc880a07-c7b7-4750-b624-edf403f1d956 | mollnn/XCPCHandbook | _old/template_v1/数学/bigint.cpp | struct Biguint {
int a[2000005], len;
Biguint() {
memset(a, 0, sizeof a);
len = 0;
}
void read() {
string str;
cin >> str;
memset(a, 0, sizeof a);
len = str.length();
for (int i = 0; i < str.size(); i++)
a[i] = str[str.length() - i - 1] - '0';
}
void print() {
for (int i = len - 1; i >= 0; i... | ALGO | 0.999834 | 3.86944 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-01-22T13:21: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": "cf7c39d22fb... |
12176023-2cb6-4703-beec-1d4b12a453d2 | jsnln/WNNC | ext/wn_treecode/wn_treecode_cpu/wn_treecode_cpu_torch_interface.cpp | /*
MIT License
Copyright (c) 2024 <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, including without limitation the rights
to use, copy, modify, merge, ... | DATA | 0.989789 | 4.955564 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-04-21T03:35:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 39,
"forks": 4,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "f62ff73acf... |
069e198c-0b5d-4690-984f-17e70c4b43fd | BinnyDaBin/DNA-Frequency | dna_freq.cpp | #include <iostream>
#include <fstream>
#include <omp.h>
using namespace std;
int main(int argc, char const *argv[])
{
std::ifstream myFile;
std::string line;
std::string allDNA = "";
// Open file in reading mode
myFile.open ("dna2.txt", std::ifstream::in);
int countA = 0;
int countC = 0;
int countG =... | DATA | 0.992354 | 4.859365 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-02-20T00:13: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": "96a410a28a... |
4d22f7ef-6193-4a85-8fde-f05e5bd507cf | yudhik11/google_kickstart | 2018/g/product_triplets.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
voi... | ALGO | 0.999537 | 3.522805 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-08-19T06:39:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30c58b02a... |
688fd072-6e9e-4da5-a3fd-eac84774a400 | Prometheus7-creator/DAA | Week9/Floyd-Warshall.cpp | #include <iostream>
#include <climits>
#include <string>
#include <vector>
#define N 10
using namespace std;
const int INF = 1e9;
int main()
{
int n;
vector<vector<int>> graph(N, vector<int>(N, INF));
cout << "Enter number of vertices: ";
cin >> n;
cout << "Input adjacency matrix:" << endl;
... | ALGO | 0.999578 | 4.054289 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2021-07-16T19:14: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": "e4e961090a2... |
6deabe71-a110-4ffd-ab97-afe06d2a82c0 | KitFung/competitive-programming | hdu5572.cpp | #include <cstdio>
#include <cstring>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
const double eps = 1e-8;
int dcmp(double x) {
if (fabs(x) < eps) return 0;
return x < 0 ? -1 : 1;
}
double mySqrt(double x) {
return sqrt(max((double)0, x));
}
struct Point {
double x, ... | ALGO | 0.999786 | 4.32436 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2016-06-15T12:02: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": "5a285cb49... |
da749627-e60c-4342-9ea7-f3df4584b86c | wfnuser/leetcode | lcp22.paintingPlan.cpp | class Solution {
public:
int factorial(int n) {
if (n <= 1) return 1;
return n*factorial(n-1);
}
int comb(int m, int n) {
return factorial(n) / factorial(m) / factorial(n - m);
}
int paintingPlan(int n, int k) {
if (n * n == k) return 1;
int ans = 0... | ALGO | 0.999969 | 5.44042 | {
"github_metadata": {
"branch": "master",
"commit_count": 795,
"repo_created_at": "2018-07-31T03:15:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 45,
"forks": 14,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "cbde5c... |
cf1ecac4-2615-4547-b327-ef095b74f2cc | spillai/articulation_learning | software/utilities/opencv-utils/math_utils.hpp | #ifndef OPENCV_MATH_UTILS_H__
#define OPENCV_MATH_UTILS_H__
#include <math.h>
#include <stdio.h>
#include <opencv2/opencv.hpp>
namespace opencv_utils {
double l2_dist(const cv::Point& p1, const cv::Point& p2);
double l2_dist(const cv::Point2f& p1, const cv::Point2f& p2);
double l2_dist(const cv::Point3f& p1, const c... | ALGO | 0.989491 | 5.822753 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2015-07-02T20:50:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5caf3252fd... |
95a2e8f2-5506-426c-8727-9f67e119bcd4 | xurongchen/AlgorithmProblem | atcoder/agc047/a/main.cpp | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>
#include <cmath>
#define LL long long
using namespace std;
struct Factor
{
int f2;
int f5;
Factor(int _zero) : f2(-_zero), f5(-_zero) {}
Factor(){}
};
Factor fa[200005];
bool ... | ALGO | 0.999162 | 3.602086 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2021-02-25T16:15: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": "0c5d5e115... |
e6fa59f4-6f86-4e4b-9406-53844fa2db6b | youngyol/Problem-Solving | baekjoon/11053.cpp | // https://www.acmicpc.net/problem/11053
#include <iostream>
#include <string>
#include <deque>
#include <algorithm>
#include <sstream>
#include <vector>
using namespace std;
int main(int argc, char **argv) {
int n;
vector <int> coin;
vector <int> result;
int tmp;
int res = 0 ;
int fn = 0;
cin >> n ... | ALGO | 0.99991 | 4.052495 | {
"github_metadata": {
"branch": "master",
"commit_count": 214,
"repo_created_at": "2017-05-27T13:46:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "77d984fd... |
1b57c9a2-6a01-49a9-b171-238f7d06c39e | Bartiam/Anagrams | src/main.cpp | #include <iostream>
#include <string>
#include <Windows.h>
#include <map>
bool is_correct_input_data(const std::string& line)
{
for (int i = 0; i < line.length(); ++i)
if ((line[i] < 'a' || line[i] > 'z') && (line[i] < 'à' || line[i] > 'ÿ')) return false;
return true;
}
bool is_anagram(const std::string& firstLi... | ALGO | 0.99899 | 4.782505 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-08-12T07:30: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": "fd71a7275d... |
b327d888-f7fd-40d9-acea-4c4871566bc0 | hqztrue/ponyai | common/utils/math/vec2d.h | // Copyright @2018 Pony AI Inc. All rights reserved.
#pragma once
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <limits>
#include <sstream>
#include <string>
#include <Eigen/Core>
#include "common/utils/containers/array_view.h"
#include "common/utils/math/common.h"
namespace math {
// Presentatio... | TOOL | 0.933923 | 7.690538 | {
"github_metadata": {
"branch": "master",
"commit_count": 168,
"repo_created_at": "2018-03-08T07:51:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f855aa13... |
56008101-d9ce-49b1-8873-42300162304b | liujiaqi1989/learnOpencv | Chapter8/harrisdetector.h | #ifndef HARRISDETECTOR_H
#define HARRISDETECTOR_H
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>
using namespace std;
using namespace cv;
class HarrisDetector
{
private:
Mat cornerStrengt... | ALGO | 0.949893 | 5.818347 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-03-02T16:02: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": "10b451cbde... |
1c40c88d-4ed9-4a83-a055-961bcfe979d4 | jcpwfloi/msr-borg | src/rtimer.cpp | #include "generation.hpp"
#include <cassert>
#include <iostream>
#include <algorithm>
#include <numeric>
#include <random>
#include <tuple>
#include <vector>
#include <ranges>
#include <cmath>
#include <map>
long long steps = 1e5;
std::vector<double> lambda, mu, clock_rate;
std::vector<long long> Q;
std::vector<doubl... | ALGO | 0.999826 | 4.800955 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-03-24T18:31: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": "f3686eab977e... |
bb5582e8-0c67-4e03-a4f8-9af6577a27e6 | pablo-Acha/Progra-Competitiva | vjudge/GrafosDFSBFSu/c.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(), x.end()
int n,m;
int X[]= {-1,-1,0,1,1,1,0,-1};
int Y[] = {0,-1,-1,-1,0,1,1,1};
int dfs(int y, int x, vector<string> &srr, vector<vector<int>> &vis){
if(y<0 || y>=n || x<0 || ... | ALGO | 0.999682 | 4.293681 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-07-03T20:54:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f230c1052... |
cd8c0242-84cc-4146-81b6-51b76e0a79c4 | tanus786/CP-Codes-HackOctober-Fest-2023 | Linked List 1/Find a node in linked list.cpp | /*
Find a Node in Linked List
You have been given a singly linked list of integers. Write a function that returns the index/position of integer data denoted by 'N' (if it exists). Return -1 otherwise.
Note : Assume that the Indexing for the singly linked list always starts from 0.
Input format :
The first line contai... | ALGO | 0.99983 | 5.553137 | {
"github_metadata": {
"branch": "main",
"commit_count": 1586,
"repo_created_at": "2022-09-26T12:28:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 139,
"forks": 383,
"issues": 21,
"pull_requests": 51
},
"file_meta": {
"content_id": "b88... |
e22477e0-0dcb-4912-95c2-e2d142706f3a | jun-5/Programmers | Lv1/Project1/더해서 소수되는 경우의수 level2.cpp | #include <vector>
#include <iostream>
using namespace std;
int MAX = 3000;
vector<int> chk;
int arr[3000];
bool visit[1000];
vector<int> nums;
bool check() {
int cnt = 0;
int sum = 0;
for (int i = 0; i < nums.size(); i++) {
visit[i] = false;
}
for (int i = 0; i < nums.size(); i++) {
if (!visit[i]) { cnt++; ... | ALGO | 0.999774 | 3.985943 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2019-04-27T12:31: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": "6b6249d241... |
1a4aa8c5-21c3-4252-8994-9c841457f303 | JoanaPadron/suma-resta-multiplicaci-n-y-divisi-n-c- | operaciones.cpp | /*
<NAME>
CLASES SUMA, RESTA, MULTIPLICACION Y DIVISION
27/04/2021
*/
#include <iostream>//libreria de objetos de entrada y salida de datos
using namespace std;//uso de funciones estandar
class suma{//clase suma
public:
float N1;//variables de tipo flotante de nombres N1,N2 y Res
float N2;
float Res;
... | TOOL | 0.935791 | 3.690181 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-09-08T18:10: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": "9fe646e28156... |
96fb9ff9-77e5-4286-a5dd-abc9c152b434 | JimmyWang0417/Algorithm-Competitive-Codes | Universal Online Judge/#274. 【清华集训2016】温暖会指引我们前行.cpp | #include <bits/stdc++.h>
#define lowbit(x) ((x) & (-(x)))
#define re register
#define ll long long
#define ull unsigned long long
#define rep(i, a, b) for (re int i = a; i <= b; ++i)
#define per(i, a, b) for (re int i = a; i >= b; --i)
template <typename T>
inline void read(T &x)
{
x = 0;
char s = (char)getchar... | ALGO | 0.999917 | 4.034583 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2019-08-30T06:36:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19478ae9... |
90773f7d-2a35-4ec0-944c-b1f971d6bb08 | karoliinabelinda/college-record | a×x+b×y=GCD(a,b).cpp | #include <iostream>
#include <tuple> // std::tuple, std::make_tuple, std::tie
using namespace std;
// Recursive function to demonstrate the extended Euclidean algorithm.
// It returns multiple values using tuple in C++.
tuple<int, int, int> extended_gcd(int a, int b)
{
if (a == 0) {
return make_tuple(b, 0, 1);
}
... | ALGO | 0.999552 | 6.390483 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-09-24T10:40: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": "130be4585501... |
4bd8e696-7fdb-447d-b1bf-4c240505e8e0 | Dream-kid/graph-theory | min vertex cover.cpp |
//https://uva.onlinejudge.org/external/102/10243.pdf
#include <list>
#include <set>
#include <map>
#include <ctime>
#include <stack>
#include <queue>
#include <cmath>
#include <deque>
#include <limits>
#include <string>
#include <cctype>
#include <cstdio>
#include <vector>
#include <bitset>
#include <numeric>
#includ... | ALGO | 0.998803 | 3.18594 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2017-06-09T14:34:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "3bd3a1146... |
286ea63d-7210-4ce8-a270-be64223abc21 | Ariful-Islam010/Codeforces-Solutions | 1560A-Dislike of Threes.cpp | #include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
// Loop through each test case
while (t--) {
int k;
cin >> k;
int count = 0; // To count how many liked numbers we have found
int current = 1; // Starting number
// ... | ALGO | 0.999849 | 5.144158 | {
"github_metadata": {
"branch": "main",
"commit_count": 307,
"repo_created_at": "2024-02-26T17:27:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f19f71741... |
068059d8-8cda-41ff-83c6-13b1f56117f1 | nya3jp/icpc | unknown/src/practice/20070426/b.cc | #include <iostream>
#include <vector>
#include <string>
#include <map>
#include <sstream>
#include <utility>
#include <algorithm>
#include <cstdio>
using namespace std;
#define REP(i,n) for(int i = 0; i < (int)(n); i++)
#define ALLOF(c) (c).begin(), (c).end()
#define FOR(it,c) for(__typeof((c).begin()) it = (c).begin... | ALGO | 0.999564 | 3.546238 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2012-05-15T15:59:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af8735d54f... |
5a6916ba-6621-4a5c-901d-836f6e26cc6c | maahirtaneja/MyCodefolio | SegmentTree.cpp | #include<iostream>
#include<vector>
using namespace std;
class SGT {
private:
vector<int> seg;
int n;
void build(int idx, int l, int r, const vector<int>& a) {
if (l == r) {
seg[idx] = a[l];
return;
}
int mid = (l + r) / 2;
build(2 * idx + 1, l, mid,... | ALGO | 0.999908 | 5.736977 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-26T11:49:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8acd57c68cdb... |
28b2cc37-f7bb-4a93-a347-12a4646147d6 | VishalBhat07/striver-dsa-course | Linked list/Singly Linked List/12_intersection_of_LL.cpp | #include <iostream>
#include <map>
using namespace std;
struct Node
{
int data;
Node *next;
Node(int val)
{
data = val;
next = nullptr;
}
Node(int val, Node *ptr)
{
data = val;
next = ptr;
}
};
Node *getIntersectionNode(Node *headA, Node *headB)
{
/... | ALGO | 0.999542 | 4.734582 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-10-02T05:29:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d14754e3251f... |
c541d7eb-dcbf-4e1f-a79f-b1c773c59ed8 | JoanaMota/LearnCPP | Algorithms/Others/k_closest_point_to_origin.cpp | #include <iostream>
#include <vector>
#include <map>
#include <math.h>
std::vector<std::vector<int>> kClosest(std::vector<std::vector<int>> &points, int k)
{
if (points.size() == k)
{
return points;
}
std::multimap<double, std::pair<int, int>> distances;
for (int i = 0; i < points.size(); ... | ALGO | 0.999988 | 5.718373 | {
"github_metadata": {
"branch": "main",
"commit_count": 130,
"repo_created_at": "2020-12-06T18:46: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": "234608a28f... |
a951136e-af3f-46f0-877a-44435f82d6ec | akshaydubey05/Leetcode_Solutions | 733-flood-fill/flood-fill.cpp | class Solution {
public:
vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int color) {
int rows = image.size();
int cols = image[0].size();
vector<vector<int>> flooded = image;
queue<pair<int,int>> flood;
int prev_color = flooded[sr][sc];
if(... | ALGO | 0.998951 | 6.630442 | {
"github_metadata": {
"branch": "main",
"commit_count": 847,
"repo_created_at": "2023-10-30T11:11: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": "b642b136fe... |
83be3bda-7eba-45e0-b8ac-8a3231360561 | minutel163/offer | listnode/listNode.cpp | #include <iostream>
using namespace std;
struct ListNode {
int val;
struct ListNode *next;
struct ListNode *last;
ListNode(int x) :
val(x), next(NULL),last(NULL) {
}
};
class Solution {
public :
Solution(){}
ListNode* deleteDuplication(ListNode* pHead){
ListNode *currentNodeP = p... | ALGO | 0.999719 | 4.103352 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2017-05-22T02:31:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5a0119d3a... |
3dadd4ea-8267-43db-9ec6-35b4514c1213 | Hoikoro/procon | AtCoder/AGC/006C.cpp | #include <iostream>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cassert>
#include <algorithm>
#include <iterator>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <tuple>
#include <queue>
#... | ALGO | 0.999981 | 3.044364 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2017-06-18T08:31: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": "2ffa0f383... |
8b9a1f8a-e2fa-4e1b-93f2-a239d68de647 | zjin-lcf/HeCBench | src/gerbil-cuda/src/gerbil/SequenceSplitter.cpp | /*
* SequenceSplitter.cpp
*
* Created on: 20.05.2015
* Author: marius
*/
#include "../../include/gerbil/SequenceSplitter.h"
#define SS_MMER_UNDEFINED 0x80000000
#define SS_BIN_UNDEFINED 0xffff
#define SS_MMER_VAL_UNDEFINED 0x80000000
gerbil::SequenceSplitter::SequenceSplitter(
const uint32 &superBundl... | ALGO | 0.958489 | 3.969728 | {
"github_metadata": {
"branch": "master",
"commit_count": 4592,
"repo_created_at": "2020-08-06T17:44:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 248,
"forks": 89,
"issues": 1,
"pull_requests": 3
},
"file_meta": {
"content_id": "a959... |
2e61ac74-e826-4ac7-ad28-1a7f774d079e | ngemily/opencv-object-detection | src/main.cpp | /**
* OpenCV prototype of edge detection.
*
* @file main.c
* @author <NAME>
* @date Feb 11 2016
*/
#include <assert.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <opencv2/core.hpp>
#include "debug.h"
#include "img_proc.h"
#include "kernel.h"
#include "utils.h"
/**
* Trackbar callback.... | TOOL | 0.928402 | 3.61353 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2016-02-11T15:31: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": "aa62738d5... |
9dff10d5-92b3-459c-8cdd-06a44ed9722f | FazeelUsmani/Scaler-Academy | 041 Dynamic Programming 8/HW3 Repeating SubSequence.cpp | /*
Repeating Sub-Sequence
Problem Description
Given a string A, find if there is any subsequence that repeats itself.
A subsequence of a string is defined as a sequence of characters generated by deleting some characters in the string without
changing the order of the remaining characters.
NOTE: Sub-sequence lengt... | ALGO | 0.999949 | 3.61143 | {
"github_metadata": {
"branch": "master",
"commit_count": 795,
"repo_created_at": "2020-01-28T18:13:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 252,
"forks": 172,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4964... |
b72aefc5-44c0-4c34-b8cf-130852feac0b | CIA66/Competitive-Programming | Kattis/bank/27979867_AC_10ms_0kB.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
typedef pair<int, int> pi;
int main(){
int N, T;
cin >> N >> T;
int c, t;
// priority_queue <pair<int, int> > pq;
priority_queue <pi, vector<pi>, greater<pi> > pq;
for(int i = 0; i < N; i++){
cin >> c ... | ALGO | 0.999948 | 3.344747 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2020-10-30T06:48: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": "118ec70a233e... |
4f4ad11a-bc9a-4442-b448-e1ef68a04410 | doctormin/CS241 | Assignment/Assignment9/Exercise2/Assignment9_exercise2_main.cpp | //
// Created by 18123 on 2019/11/17.
//
#include <iostream>
#include <vector>
#include <random>
#include <algorithm>
using namespace std;
const int MAX_ITERATION_TIMES = 5000;
class Population{//种群(只含有一代)
private:
vector<vector<int> > generation;
vector<double> Fitness;
vector<double> sum_of_Fitness;
... | ALGO | 0.999982 | 4.714559 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2019-09-30T03:16:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "40b7c162d... |
44fab2ee-2b3e-428b-8cdb-339e29c7f934 | githubharald/CTCWordBeamSearch | cpp/Beam.hpp | #pragma once
#include "HashFunction.hpp"
#include "LanguageModel.hpp"
#include <vector>
#include <memory>
#include <unordered_map>
#include <limits>
#include <stdint.h>
#include <cstddef>
class Beam
{
public:
// CTOR
Beam(const std::shared_ptr<LanguageModel>& lm, bool useNGrams, bool forcastNGrams, bool sampleNGram... | ALGO | 0.994868 | 6.725221 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2018-03-01T09:58:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 568,
"forks": 163,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a06be... |
9fb2591d-4e54-4c1e-8d38-eca3a4acc63e | vpra711/langs | c_cpp/data_structures/binarysearchtree.cpp | #include <iostream>
#include <queue>
class Node
{
public:
int data;
Node *leftNode;
Node *rightNode;
};
Node *newnode();
void insertion(Node *);
void preoreder(Node *);
void inoreder(Node *);
void postoreder(Node *);
int search(Node *);
int depthwisetravasal(Node *);
int breathwisetravasal... | ALGO | 0.999895 | 4.44601 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2023-12-17T12:24: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": "f12eb9dc8... |
6005441d-a229-441d-9484-82e1ee147b22 | dolphin-emu/dolphin | Source/Core/Core/DSP/Jit/x64/DSPJitMultiplier.cpp | // Copyright 2010 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Additional copyrights go to Duddie and Tratax (c) 2004
// Multiplier and product register control
#include "Core/DSP/Jit/x64/DSPEmitter.h"
#include <cstddef>
#include "Common/CommonTypes.h"
#include "Core/DSP/DSPCore.h"
us... | ALGO | 0.94996 | 5.014997 | {
"github_metadata": {
"branch": "master",
"commit_count": 44003,
"repo_created_at": "2013-07-22T09:07:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13918,
"forks": 2828,
"issues": 0,
"pull_requests": 338
},
"file_meta": {
"content_id":... |
46f74dc9-b080-4363-8266-a3480c80b0ca | hvrlxy/KATTIS | CreditCardPayment/problems/probF/iq.cpp | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
// m = number of equations, n = number of variables,
// a[m][n+1] = coefficients matrix
// Returns vector<double> ans containing the solution, if there is no
// solution returns vector<double>()
const double eps = 1e-7;
bool zero(double a){... | ALGO | 0.999738 | 3.673933 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2020-08-04T02:28: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": "eaaa86193... |
979612f4-1988-41d3-aae4-9c5e7bfa5671 | emilgoldsmith/heuristics-desertfoxes | expanding-nim/algorithm.cpp | #include <algorithm>
using namespace std;
const int MAX_STONES = 1010; // It's actually 1001
const int MAX_CUR_MAX = 50; // It's actually 46
const int MAX_RESETS = 7; // It's actually 5
const int MAX_FLAG_VALUES = 4; // It's actually 2
// First MAX_RESETS is resets left for next player, second one is for previous pl... | ALGO | 0.99977 | 4.410881 | {
"github_metadata": {
"branch": "master",
"commit_count": 367,
"repo_created_at": "2017-09-13T02:25:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1dc2494a... |
c9bb2751-02ba-4639-89f4-be1042e3551b | OpenXRay/xray-16 | src/xrGame/cover_evaluators.h | ////////////////////////////////////////////////////////////////////////////
// Module : cover_evaluators.h
// Created : 24.04.2004
// Modified : 24.04.2004
// Author : <NAME>
// Description : Cover evaluators
////////////////////////////////////////////////////////////////////////////
#pragma once
#include "re... | ALGO | 0.93861 | 6.761634 | {
"github_metadata": {
"branch": "dev",
"commit_count": 8240,
"repo_created_at": "2014-09-05T04:28:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3256,
"forks": 472,
"issues": 220,
"pull_requests": 23
},
"file_meta": {
"content_id": "790... |
1feeecde-d15f-44b6-b45d-62478a4b5649 | minhle0105/LeetCodePracticeCode | src/com/minhle/practiceleetcode/RotatingTheBox.cpp | #include "AllNecessaryHeaders.h"
class Solution {
public:
vector<vector<char>> rotateTheBox(vector<vector<char>>& box) {
int nRows = box.size();
int nCols = box[0].size();
vector<vector<char>> res(nCols, vector<char>(nRows, '.'));
for (auto &row : box)
{
for (int... | ALGO | 0.999728 | 5.952629 | {
"github_metadata": {
"branch": "main",
"commit_count": 1287,
"repo_created_at": "2021-04-11T15:24: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": "a36ebcf4e... |
dc12bbed-645c-4b76-ab2f-87236a9d3991 | cvanaret/Uno | uno/ingredients/subproblem_solvers/MA57/MA57Solver.hpp | // Copyright (c) 2018-2024 <NAME>
// Licensed under the MIT license. See LICENSE file in the project directory for details.
#ifndef UNO_MA57SOLVER_H
#define UNO_MA57SOLVER_H
#include <array>
#include <vector>
#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp"
#include "linear_algebra/... | ALGO | 0.987901 | 6.697712 | {
"github_metadata": {
"branch": "main",
"commit_count": 2164,
"repo_created_at": "2021-09-29T17:46:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 359,
"forks": 28,
"issues": 12,
"pull_requests": 10
},
"file_meta": {
"content_id": "297b... |
dbf188c2-ff5c-4520-b5f6-a024a94b5cfb | jube/mapmaker | src/lib/smooth.cc | /*
* Copyright (c) 2014, <NAME>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS A... | ALGO | 0.991504 | 5.236881 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2014-02-22T10:32:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 30,
"forks": 4,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "ad88414... |
74c96cc8-4ac9-4aa7-83f5-85d75a8aaef8 | bubbercn/LeetCode | C++/Solved/986_IntervalListIntersections.h | #pragma once
#include "Common.h"
class Solution
{
public:
vector<vector<int>> intervalIntersection(vector<vector<int>> &firstList, vector<vector<int>> &secondList)
{
auto i = firstList.begin();
auto j = secondList.begin();
vector<vector<int>> result;
while (i != firstList.end() ... | ALGO | 0.999749 | 6.242108 | {
"github_metadata": {
"branch": "master",
"commit_count": 685,
"repo_created_at": "2016-04-24T12: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": "bf95214d... |
38dd9484-51d0-4719-92b6-b7d10ff41ee9 | santi3223/PreseleccionIOI | Codeforces/Problemas/Otros/Potions_Easy.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vl vector<ll>
#define vs vector<string>
#define vb vector<bool>
#define vc vector<char>
#define ull unsigned long long
#define pll pair<ll, ll>
#define pb push_back
#define fi first
#define se second
#define ff(i, p, x) for(ll i = p; i < x; i++)... | ALGO | 0.999987 | 4.194101 | {
"github_metadata": {
"branch": "main",
"commit_count": 286,
"repo_created_at": "2024-10-08T01:46:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2df0fdd97c... |
9effda76-c823-444f-91fc-4a95782b4cf6 | Brinews/jacky | C/C-Heap/fall2015net/proj1/Code_DHT.cpp | /*
* Date : 2015-10-26
* StuNumber: 301213518
* StuName : <NAME>
*
* @basic DHT simulation
*/
#include <stdio.h>
#include <stdlib.h>
typedef struct id_node_t* id_node;
typedef struct key_node_t* key_node;
struct key_node_t {
int keys; //hashed keys
key_node next;
};
struct id_node_t {
int ids; ... | ALGO | 0.998952 | 3.812016 | {
"github_metadata": {
"branch": "master",
"commit_count": 201,
"repo_created_at": "2013-11-16T09:35:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d1229d9... |
0030c7ad-2c7c-49fc-9294-ee93632a2cbf | yuan-xiong/xycode | leetcode/round4-2020/11-insert-position.cpp | #include <algorithm>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#include <queue>
using namespace std;
template<typename T>
void printVector(vector<T> vec) {
//cout << "[-] " << __func__ << endl;
for(int i = 0; i < vec.size(); ++i) {
cout << vec[i] << " ";
}
cout << endl;
}
templat... | ALGO | 0.999926 | 5.532187 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2018-12-30T04:19: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": "f154d7029... |
3f0d969e-9dc9-4ba0-af21-e95eb758e2a9 | satyammishra99/Coding-Ninja-Competitive-Programming-Problem- | Recursion/first_index.cpp | /*
Problem statement
Given an array of length N and an integer x, you need to find and return the first index of integer x present in the array. Return -1 if it is not present in the array.
First index means, the index of first occurrence of x in the input array.
Do this recursively. Indexing in the array starts fro... | ALGO | 0.999981 | 4.745558 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-03-03T17:23:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3107361136a... |
3dbedc7e-44e5-44b1-aee2-c02bb73883f8 | bedasshentai/Project-Euler | 0001~0100/021~030/23.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int primes[N], d[N], p[N], cnt;
bool st[N];
int dp[N];
int n = 28123;
int main() {
for (int i = 2; i <= n; i ++ ) {
if (!st[i]) primes[cnt ++ ] = i, d[i] = p[i] = i + 1;
for (int j = 0; primes[j] * i <= n; j ++ ) {
st[... | ALGO | 0.999861 | 4.150797 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2025-05-30T02:33:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "12967f594f... |
4f7a14f1-43f3-4b38-bb49-64f4cc5378aa | Simon-48/20-bit-RISC-processor-ISA | assembler.cpp | #include <bits/stdc++.h>
using namespace std;
#define checkBit(n,p) (bool)(n&(1<<p))
map<string,string> getMap(string path)
{
string word,value;
map<string,string> m;
ifstream file(path);
while(file>>word>>value)
{
m[word] = value;
}
file.close();
return m;
}
string decToBi... | ALGO | 0.910588 | 3.679508 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-11-11T19:43: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": "359c3dcf7b3e... |
8f4a3d3e-00c9-49bd-aba8-35f5d8ac3d42 | amumu-dev/nokuno | cc/topcoder/KindAndCruel.cpp | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include... | ALGO | 0.999579 | 3.948181 | {
"github_metadata": {
"branch": "master",
"commit_count": 502,
"repo_created_at": "2011-09-23T04:43:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1b0cacd1... |
d744eba4-66e4-444a-a7fe-d885a4d0c962 | FlorianLuetticke/pathTracer | src/primitives/polygon.h | #pragma once
#include <array>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <optional>
#include <ostream>
#include <stdexcept>
#include "hitInfo.h"
#include "math/ray.h"
#include "math/transformation.h"
#include "math/vector.h"
class TPolygon {
TPoint _origin;
TVector _u;
TVector _v;
... | ALGO | 0.981825 | 6.540603 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2023-04-15T20:49: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": "f9304cfdb... |
2740908e-5f34-4d41-8789-44f1d17fcd6a | Stray-Modding/HK_Project | Plugins/JoyLibrary/Source/JoyLibraryRuntime/SplineTools.h | #pragma once
class USplineComponent;
// Unreal includes
#include <CoreMinimal.h>
#include <Components/SplineComponent.h>
// Plugins include
// Game includes
#include "SplineTools.generated.h"
JOYLIBRARYRUNTIME_API float FindDistanceAlongSplineClosestToWorldLocation(const USplineComponent* _spline, const FVector& _... | ALGO | 0.991837 | 6.8628 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2022-07-21T00:16:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "56873290d1e3... |
2684262f-4fc3-4548-afcf-edd5266782e6 | llvm/llvm-project | lldb/source/Plugins/Platform/Android/PlatformAndroid.h | //===-- PlatformAndroid.h ---------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | TOOL | 0.960001 | 7.321742 | {
"github_metadata": {
"branch": "main",
"commit_count": 545188,
"repo_created_at": "2016-12-07T09:39:33.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 33545,
"forks": 14484,
"issues": 5000,
"pull_requests": 5000
},
"file_meta": {
"content_... |
f8dd0685-ce58-42ca-a6ac-5497c7f45365 | deepikasin/Ram-Ram-Bhai-Sareya-Ne-With-Frienducation-Deepika | minimum_sub.cpp | class Solution {
public:
bool check(map < char, int > mpt, map < char, int > mps) {
for (auto i: mpt) {
if (mps.find(i.first) == mps.end()) return false;
if (mps[i.first] < i.second) return false;
}
return true;
}
string makeString(int i, int j, string s) {
string str = "";
while (i <= j) {
s... | ALGO | 0.999989 | 5.94902 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2024-01-06T10:03: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": "adf7594159e... |
22e7c9c3-053c-4f15-ae36-f546ae2eec25 | shiroizdabezt/IT001 | Struct/08.cpp | /*###Begin banned keyword - each of the following line if appear in code will raise error. regex supported
###End banned keyword*/
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
#define MAXN 100
struct SinhVien {
char MASV[10];
char HoTen[100];
char Ngay... | TOOL | 0.978489 | 3.632504 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2022-02-24T14:48: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": "accec15e693... |
0a869fda-fa7a-4267-9bec-86fcb33ede60 | em3ly/axon_training | There are no wrong turnings-Graphs/Solutions/luismo/F - Missile Silos/F - Missile Silos.cpp | /*
Author: <NAME> (LUISMO)
Problem: F - Missile Silos
Online Judge: codeforces.com
Idea: Dijkstra, then check edges
*/
#include<bits/stdc++.h>
// Types
#define ll long long
#define ull unsigned long long
// IO
#define sf scanf
#define pf printf
#define mkp make_pair
#define fi first
#define se second
#define endl "... | ALGO | 0.999854 | 4.142447 | {
"github_metadata": {
"branch": "master",
"commit_count": 134,
"repo_created_at": "2019-04-30T16:00:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "0e8eb462... |
0e8ddbdd-d29a-4fdb-87c8-9a7f897f7139 | chunrapeepat/learn-algorithm | solutions/12280-digital-satire.cpp | #include <iostream>
#include <vector>
using namespace std;
// 1. preprocess all weight of characters
// 2. check to first line of input is A > B or B > A
// 3. loop 2 sections: store the input and calculate sum
// 4. answer (if "Not" draw)
int calcSum(int n, int total) {
if (n == 0) return total;
int gms = 2... | ALGO | 0.9982 | 3.830607 | {
"github_metadata": {
"branch": "master",
"commit_count": 212,
"repo_created_at": "2019-09-25T14:56:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "99f2f85f... |
2813f8f9-f5f9-4542-a567-a408a4e906e3 | xianyu0623/HIT-2022-DSA | hw/hw5.6/main.cpp | #include <iostream>
#include <algorithm>
typedef struct node{
int data;
node* left;
node* right;
}Node;
class BST{
public:
Node* root;
BST(){
this -> root = nullptr;
}
void insert(int n){
if(root == nullptr){
Node* n_node = new Node;
n_node -> data = n... | ALGO | 0.999792 | 3.691479 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2022-09-28T08:03:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c982eaec3... |
d5f3cbc2-b5b1-49dc-a3b0-60ef0244d8f0 | camibr/Cplusplus_Physics_modelling_simulations | transitions_de_phase_methode_Landau.cpp | /* THERMODYNAMIQUE
Le but est de modeliser les transitions de phase (i.e. changements d'etat : fusion, changement de structure de la matiere).
L'un des modeles les plus importants de transitions de phase est celui de Landau dans lequel l'energie d'un systeme est exprimee comme
un polynome.
*/
#include <iostream>
#incl... | ALGO | 0.999696 | 3.768951 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-11-10T00:24: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": "ba784688cc56... |
a0cb79f8-feb0-4046-abce-6ac57c08ed27 | vedantpatil25/Leetcode-Questions-Solutions | Implement Atoi - GFG/implement-atoi.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:
/*You are required to complete this method */
int atoi(string str) {
//Your code here
int ans = 0;
int first... | ALGO | 0.998207 | 5.101518 | {
"github_metadata": {
"branch": "main",
"commit_count": 474,
"repo_created_at": "2023-01-21T14:13:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8bdf69a487... |
442db1cf-e9c9-4099-96e6-eab8cbd92c8e | Forec/learn | 2017.1/algorithms-review/t142.cpp | #include <iostream>
#include <unordered_set>
#include <vector>
#include <unordered_map>
#include <algorithm>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* detectCycle(ListNode *head) {
ListNode *fast = head, *... | ALGO | 0.99997 | 4.066924 | {
"github_metadata": {
"branch": "master",
"commit_count": 134,
"repo_created_at": "2015-07-30T03:00:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8950288c... |
be7d8d3c-761f-4fa4-bdc7-a4f2444e2580 | amazy2596/Algorithm-Competition | program_2025/program_04/program_11/1007.cpp | #include <bits/stdc++.h>
#define uint uint64_t
#define int long long
using namespace std;
void solve()
{
int n;
cin >> n;
vector<int> v(n), r, b;
for (int i = 0; i < n; i++)
cin >> v[i];
string s;
cin >> s;
for (int i = 0; i < n; i++)
{
if (s[i] == 'R')
r.pu... | ALGO | 0.999458 | 4.976584 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2025-06-20T15:02: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": "29cafafc665... |
fcc37b40-b1b8-4bb1-8a40-9a1708f19854 | jetbrains-academy/CppBasics | ObjectOrientedProgramming/ClassesAndObjects/IntroducingObjects/src/rectangle.cpp | #include "rectangle.hpp"
#include "operators.hpp"
Point2D center(const Rectangle& rect) {
// TODO: explain this C++ initialization syntax
return rect.topLeft + 0.5f * Point2D { width(rect), height(rect) };
}
Rectangle createRectangle(Point2D p1, Point2D p2) {
Rectangle rect;
rect.topLeft = { std::mi... | TOOL | 0.948596 | 6.748658 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2023-02-03T18:24:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 19,
"pull_requests": 9
},
"file_meta": {
"content_id": "6fd3e6654d7... |
4f48ea4e-8dbc-4513-a699-4e0155563c3c | parallelcodefoundry/ParEval | drivers/cpp/benchmarks/stencil/53_stencil_2d_jacobi_5-point_stencil/cpu.cc | // Driver for 53_stencil_2d_jacobi_5-point_stencil for Serial, OpenMP, MPI, and MPI+OpenMP
// /* Compute one iteration of a 5-point 2D jacobi stencil on `input`. Store the results in `output`.
// Each element of `input` will be averaged with its four neighbors and stored in the corresponding element of `output`.
// ... | ALGO | 0.999544 | 6.326714 | {
"github_metadata": {
"branch": "develop",
"commit_count": 41,
"repo_created_at": "2023-10-06T17:25:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 35,
"forks": 10,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "f0b65b3... |
fb314e0c-5672-4eab-913b-eb0ff483bab9 | roytanmay/codeforces-contests | ECR147/c.cpp | #include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
#define int long long
#define pyes cout << "YES" << endl
#define pno cout << "NO" << endl
int count(int n)
{
int res = 0;
while (n)
{
n -= ((n + 1) / 2);
res++;
}
return res;
}
signed main()
{
int t = 1;
c... | ALGO | 0.99997 | 4.154944 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-01-01T18:15:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d8274dec80... |
71df944f-d983-4c83-ae0d-cc8548908381 | viettrungIT3/CTDL-GT | Ly_Thuyet/Bai_tap_STACK/test.cpp | #include <stdio.h>
struct NODE
{
int Key;
NODE *pNext;
};
NODE *CreateNode(int Data)
{
NODE *pNode;
pNode = new NODE;
if (pNode == NULL)
return NULL;
pNode->Key = Data;
pNode->pNext = NULL;
return pNode;
}
bool AddHead(NODE *&pHead, int Data)
{
NODE *pNode;
pNode = Create... | ALGO | 0.999195 | 3.725223 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-04-15T06:16: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": "48bbcfbebece... |
e01faa18-e700-4eaa-860d-13a413a283b6 | NVIDIA/MatX | include/matx/operators/hist.h | ////////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (c) 2021, NVIDIA Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are... | TOOL | 0.954564 | 7.537529 | {
"github_metadata": {
"branch": "main",
"commit_count": 933,
"repo_created_at": "2021-09-14T22:49:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1339,
"forks": 102,
"issues": 36,
"pull_requests": 5
},
"file_meta": {
"content_id": "f5ff2... |
2e973674-ffdb-4e7a-95de-3d36788e7e2d | kelvinswrianto/Competitive-Programming | UVa/UVa-10295-Hay-Points(AVLTREE).cpp | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node{
char JOB[30];
long KEY;
long height;
struct node *left;
struct node *right;
};
long max(long a, long b){
return (a < b) ? b : a;
}
long getHeight(struct node *localRoot){
if(localRoot == NULL) return 0;
return localR... | ALGO | 0.999833 | 3.299054 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-11-02T17:30: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": "ddf4948620... |
8b91afeb-a3b4-4a47-a372-d7f465a6f2ee | Brandon-bollozos/GAME1011_Lab3_BollozosBrandon | GAME1011_Lab3_BollozosBrandon/Source.cpp | #include <iostream>
#include "SimpleVector.h"
#include "SearchVect.h"
#include "SortableVector.h"
using namespace std;
int main()
{
const int SIZE = 5;
SearchableVector<int> iTable(SIZE);
SortableVector<int> iTable2(SIZE);
for (int i = 0; i < SIZE; i++)
{
iTable[i] = (i * 2);
}
cout << "iTable:\n";
iTabl... | ALGO | 0.978825 | 3.941502 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-03-14T23:32: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": "a36f5d400f... |
f3c046ae-b085-4403-98d5-6fb96f67f72a | NguyenHoangHaiD21PTIT/INT1306_CAU_TRUC_DU_LIEU_VA_GIAI_THUAT_HK20222 | CODE ICPC 2024/TUAN 6/I. THU HOACH TAO.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
#define ii pair<int, int>
const int N = 2e5+5, M = 1e3+5, MOD = 1e9+7, inf = 1e18;
int n, m, x, y, res, test, cnt, sum, k, d;
int h[N], vis[N], f[M][M], c[M][M], num[M][M], a1[M];
char a[M][M];
ii b[N];
int xr[4] = {-1, 0, 1, 0}, yr[... | ALGO | 0.999792 | 3.827566 | {
"github_metadata": {
"branch": "main",
"commit_count": 971,
"repo_created_at": "2024-03-09T15:33:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "59113ade83... |
51728041-824d-458d-98c3-ff1eeded5e85 | LimitPointSystems/SheafSystem | fields/refiners/edge_centered_refiner_family.cc |
//
// Copyright (c) 2014 Limit Point Systems, Inc.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... | TOOL | 0.949573 | 3.621034 | {
"github_metadata": {
"branch": "master",
"commit_count": 567,
"repo_created_at": "2014-02-06T22:44:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae9960ab1... |
3261d7ca-a678-448d-bc31-2145c9eb9a3d | M0D4/Competitive-Programming-Problems-Solutions | Atcoder/C++14 (GCC 5.4.1)/arc061_a/11652009.cpp | #include <bits/stdc++.h>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;
#define all(v) v.begin(), v.end()
#define endl "\n"
#define pb push_back
#define F first
#define S second
#define THINK_TWICE_CODE_ONCE cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
#define isOdd(n) (n&1)
#de... | ALGO | 0.999986 | 3.846852 | {
"github_metadata": {
"branch": "main",
"commit_count": 3590,
"repo_created_at": "2022-06-03T20:54:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0957eaece... |
27d2a7d9-428b-4cf1-9c58-53aaf82777eb | ishandutta2007/codeforces-r | reyna/normal/813/E.cpp | // In the name of God
#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
#incl... | ALGO | 0.999898 | 4.191801 | {
"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": "dcdadfd29571... |
6f4a5263-8926-47ff-a299-fff20c4c9127 | tanyarajhans/LeetCode | concatenated-words/concatenated-words.cpp | struct TrieNode {
bool isWord;
unordered_map<char, TrieNode*> children;
TrieNode(): isWord(false) {};
};
TrieNode* root=new TrieNode();
void insert(string& word) {
auto run = root;
for(char c: word) {
if(run->children.find(c) == run->children.end())... | ALGO | 0.999945 | 6.171921 | {
"github_metadata": {
"branch": "main",
"commit_count": 1801,
"repo_created_at": "2021-01-10T12:56:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 944,
"forks": 202,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "80f83... |
af7909f7-b8ea-45b2-a6cd-53738fadf2aa | wenbowen123/BundleTrack | src/Thirdparty/igl/copyleft/cgal/point_solid_signed_squared_distance.cpp | // This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2016 <NAME> <<EMAIL>>
//
// 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.... | ALGO | 0.998719 | 6.737136 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-10-12T02:03:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 659,
"forks": 70,
"issues": 11,
"pull_requests": 1
},
"file_meta": {
"content_id": "9005fe... |
df90ce68-7c82-4982-94d6-a8f263f54a47 | apurvawani/LP-1 | A4(b).cpp | #include <mpi.h>
#include <iostream>
using namespace std;
int n = 12;
int a[] = {1,2,3,4,7,9,13,24,55,56,67,88};
int key = 55;
//Temporary Array for Slave Process
int buffer[20];
int binarySearch(int *array, int start, int end, int value) {
int mid;
while(start <= end) {
mid = start + (end-start)/2;
... | ALGO | 0.999993 | 5.242168 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2021-06-18T11:21: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": "7f5485a7355... |
04b3e9c1-c233-4a43-9ffb-e3b622542aa7 | raocong95/QtGraphicsViewer | source/CoreLib/Plane.cpp | #include "Plane.h"
#include "Line.h"
#include <Eigen/Eigen>
Plane::Plane()
{
Constant = Vector3(0,0,0);
Normal = Vector3(0,0,1);
}
Plane::Plane( Vector3 c, Vector3 n )
:Constant(c), Normal(n)
{
Normal.normalize();
}
double Plane::signedDistanceTo( Vector3 p )
{
Vector3 dv = p - Constant;
return QVector3D::... | ALGO | 0.995133 | 5.583899 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-11-09T14:37:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4d6df3d68... |
de5f8235-7ff8-404e-b3b3-82ebaed06323 | sccn/lsl_archived | LSL/liblsl/external/lslboost/range/algorithm/permutation.hpp | // Copyright <NAME> 2009. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.lslboost.org/LICENSE_1_0.txt)
//
//
// For more information, see http://www.lslboost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORI... | ALGO | 0.997591 | 7.196186 | {
"github_metadata": {
"branch": "master",
"commit_count": 590,
"repo_created_at": "2015-04-04T00:02:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 243,
"forks": 133,
"issues": 102,
"pull_requests": 0
},
"file_meta": {
"content_id": "d02... |
65b1ab7c-c80e-4b4f-9d78-e9b8f54ab7ad | Vikash8101/CATALOG_assignment | Solution.cpp | #include <iostream>
#include <fstream>
#include <json/json.h>
#include <vector>
#include <cmath>
using namespace std;
long long decodeValue(const string &value, int base) {
long long result = 0;
for (char ch : value) {
int digit;
if (ch >= '0' && ch <= '9') digit = ch - '0';
else if ... | ALGO | 0.995434 | 5.210782 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-10-25T05:26: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": "bb1ca0f1f393... |
6f216720-2060-4a65-b201-728494e6ba26 | thecode00/Algorithm-Problem-Solve | Leetcode/C++/637. Average of Levels in Binary Tree/solution.cpp | // https://leetcode.com/problems/average-of-levels-in-binary-tree/description/
/**
* 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... | ALGO | 0.999966 | 6.8246 | {
"github_metadata": {
"branch": "main",
"commit_count": 596,
"repo_created_at": "2022-06-27T14:27:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "53e76789f5... |
dee86593-196c-46d4-a241-b8652125c589 | rupertsteel/advent-of-code-2022 | day23/day23.cpp |
#include <fmt/format.h>
#include <iostream>
#include <fstream>
#include <ranges>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <chrono>
#include <regex>
#include <map>
#include <set>
#include <deque>
#include <functional>
#include <queue>
#include <variant>
#include <thread>
#inc... | ALGO | 0.999574 | 5.996738 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2022-12-01T09:02: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": "d55c39cfe5b... |
857f0026-5656-4644-a43f-efdc449edb97 | cyril-gao/wheel | Algorithms/leetcode/C++/largest_rectangle_in_histogram_test.cpp | #include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <algorithm>
#include <iterator>
#include <random>
#include <vector>
#include "check.h"
/*
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the hist... | ALGO | 0.999823 | 6.690943 | {
"github_metadata": {
"branch": "master",
"commit_count": 443,
"repo_created_at": "2019-11-26T23:41:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 11
},
"file_meta": {
"content_id": "cad7bf3... |
564e8c2a-b26e-4ca5-911f-97c2c5bf5466 | Pranavgit6167/cpp_r | mergesort_random.cpp | #include <iostream>
#include <vector>
#include <ctime>
#include <omp.h>
using namespace std;
// Function to print the array
void printArray(const vector<int> &arr) {
for (int num : arr) {
cout << num << " ";
}
cout << "\n";
}
void merge(vector<int> &arr, int low, int mid, int high) {
vector<... | ALGO | 0.999991 | 6.261942 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-04T16:27: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": "fdbc302e1dc9... |
28bfb637-ab82-47a1-a327-544e02d5b9ca | GithubPrankster/Vaportrace | headers/tracing.h | bool sceneIntersection(Ray ray, std::vector<Object*> stuff, hitHistory &history){
float stuff_dist = std::numeric_limits<float>::max();
for(auto &object : stuff){
float dist_i = 0.0f;
if(object->intersect(ray, dist_i) && dist_i < stuff_dist){
stuff_dist = dist_i;
glm::vec3 hitPoint = ray.origin + ray.direct... | ALGO | 0.982424 | 4.678596 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-05-21T00:48:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac1475ada... |
505debca-b709-4e59-969f-6b331e403ee7 | bruno-santos382/exercicios-aula-algoritmo | Exercicio 27/main.cpp | #include <iostream>
#include <algorithm>
#include <ctime>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
int medidas[4][24];
cout << "Informe as medidas da pulsacao dos pacientes: " << endl;
cout << "Pre... | ALGO | 0.998023 | 3.546885 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2024-06-19T01:45:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d3210430933... |
835254aa-e5d7-4454-939d-ae915dd2aa44 | sandipshah-git/Test | cdc/Lab7.cpp | #include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
int main() {
string input, stack = "$e"; // stack initialized with starting symbol
string table[5][6] = {
{"tb", "", "", "tb", "", ""}, // E → T E'
{"", "+tb", "", "", "n", "n"}, // E' → + T E' | ε
... | ALGO | 0.999791 | 4.330381 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-07-15T05:26: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": "43fd31efe92d... |
ff604fda-0bd6-40f9-ac71-5474ca6e5f44 | fresearchgroup/Competitive-Programming | CLPERM.cpp | #include<bits/stdc++.h>
#define gc getchar
#define pc putchar
#define maxm 100005
#define si(n) scanf("%d",&n)
#define sc(c) scanf("%c",&c)
#define sll(n) scanf("%lld",&n)
#define print(n) printf("%d",n)
#define printll(n) printf("%lld",n)
#define loop(i,j,n) for(int(i)=(j);(i)<(n);++(i))
#define rep(i,n) for(int(i)=0;... | ALGO | 0.999966 | 3.407842 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-01-17T06:19:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 12,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "17659ec76... |
5c260b9d-76a8-48d3-be5b-3b78a0564b1f | metaphysis/Code | UVa Online Judge/volume003/329 PostScript Emulation/program1.cpp | // PostScript Emulation
// UVa ID: 329
// Verdict: Accepted
// Submission Date: 2019-11-03
// UVa Run Time: 0.140s
//
// 版权所有(C)2019,邱秋。metaphysis # yeah dot net
#include <bits/stdc++.h>
using namespace std;
double im[3][3] = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1}
};
void multiply(double rm[3][3])
{
doub... | ALGO | 0.960764 | 4.164054 | {
"github_metadata": {
"branch": "master",
"commit_count": 1710,
"repo_created_at": "2016-03-07T13:28:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 229,
"forks": 50,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed6a... |
b4250489-58af-4a23-8871-d2a090cc04a2 | rubytubi/BOJ_Study | 2024/Apr_24/19_2467.cpp | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
vector<int> v;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int t;
cin >> t;
v.push_back(t);
}
int left = 0, right = v.size() - 1;
int ret = 2000000000;
int i, j;
while (left... | ALGO | 0.999997 | 3.785351 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2023-01-03T05:09: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": "659894516f7... |
a2a7066d-cf33-4aa3-abbd-697f3a238cb4 | Abd-AlrahmanHammad/AlgorithmsCourse | power.cpp | #include <iostream>
#include <ctime>
using namespace std;
long long power_iterative(int x, int y) {
if (y < 0) {
return 0; // Handle negative exponents (implementation specific)
} else if (y == 0) {
return 1; // Base case: x^0 is 1
} else {
long long result = 1;
for (int i = 0; i < y; ++i) {
... | ALGO | 0.995405 | 6.65013 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-01T11:06: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": "e28cc3db778c... |
2e07f1b7-8625-4ed2-9395-406fe021f1ff | octavio-navarro/ICPC_training | contests/ICPC_2024/Repechaje/K.cpp | #include <bits/stdc++.h>
using namespace std;
using v_i = vector<int>;
using s_i = set<int>;
using m_ii = map<int, int>;
#define pVI(data){ for(int d : data) cout << d << " "; cout << endl; }
int kitchen_closing(void) {
v_i v(3);
// N_Ingredients, N_dishes, N_Orders
for (int &e : v) cin >> e;
v_i... | ALGO | 0.998917 | 4.079949 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2024-10-19T18:21:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "16e484525ad... |
106918a9-ab87-420e-9d28-0a47dbf29032 | dhruv-jain/hackerrank | oop_person_student.cpp | /* https://www.hackerrank.com/challenges/30-inheritance/problem */
#include <iostream>
#include <vector>
using namespace std;
class Person{
protected:
string firstName;
string lastName;
int id;
public:
Person(string firstName, string lastName, int identification){
this->firstName = firstName;
this->... | TOOL | 0.974358 | 4.395332 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2017-07-09T15:09: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": "c39edd7b2... |
2a0787bc-d959-47c9-b2cc-e91dcc5d8b27 | olekristensen/offrost | frost/frost/src/Plugins/inputs/BlobTracking.cpp | #include "PluginController.h"
#include "ProjectionSurfaces.h"
#include "BlobTracking.h"
#include "Cameras.h"
#include "CameraCalibration.h"
#include "Frostscape.h"
#include "BlobLight.h"
#include "Frostscape.h"
#include "LaLineaFloor.h"
TrackerThread::TrackerThread(){
updateContour = false;
}
void TrackerThread::sta... | TOOL | 0.945898 | 3.855939 | {
"github_metadata": {
"branch": "master",
"commit_count": 283,
"repo_created_at": "2015-03-13T06:46: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": "ea5b50cb... |
82bcb98e-0572-46be-bf75-0382d27ab495 | BychkovArthur/algorithms | leetcode/23.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
struct custom_less {
... | ALGO | 0.999931 | 6.274049 | {
"github_metadata": {
"branch": "main",
"commit_count": 73,
"repo_created_at": "2024-01-31T16:08: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": "b7ceef8a488... |
1c871bfb-3df4-434d-88b5-ff482f8e815b | s-nandi/contest-problems | dynamic-programming/general/string_stretching.cpp | // dp (200^4 fits in time), automata -- conseq. chars at the same level are separated by whole recursive strings
// https://open.kattis.com/problems/stretching
// 2015 NAIPC
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(auto i=(a); i<(b); ++i)
#define trav(a,x) for(auto& a: x)
#define all(x) be... | ALGO | 0.999972 | 4.023823 | {
"github_metadata": {
"branch": "master",
"commit_count": 1205,
"repo_created_at": "2017-12-06T06:51: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": "49656e5... |
7a3298ec-09fb-4d4c-95c5-da2fad1fc5a5 | V-Shah07/PriorityQueue | PriorityQueue/main.cpp | #include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include "PriorityQueue.h"
#pragma warning(disable:4996)
struct testStruct
{
int a;
double b;
char c;
};
int cmpStruct(void* a, void* b)
{
testStruct* x = (testStruct*)a;
testStruct* y = (testStruct*)b;
if (x->a == y->a)
{
if (x->b == y->b)
{
retur... | TEST | 0.993056 | 4.655764 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2022-05-02T23:13:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42ea4b84d... |
c648346b-a28d-4cbc-a52c-20121694a88b | IlyaDzh/SevSU | 1 курс/2 семестр/АиП 4/4++.cpp | #include <stdio.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
const int len_punkt=15;
struct aeroflot
{
char name[len_punkt];
int reys;
int tip;
};
const int size_p=sizeof(aeroflot);
int create_file(FILE *fbin);
int sort_file(FILE *fbin);
int prin... | TOOL | 0.955337 | 3.019582 | {
"github_metadata": {
"branch": "master",
"commit_count": 283,
"repo_created_at": "2019-06-25T23:23:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68e46ceb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.