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 |
|---|---|---|---|---|---|---|---|
02e6a1d3-9cc5-4c00-b36d-57c7f57766b5 | Harshith268268/CSA1622-CD | exp 16 s.cpp | %{
#include <stdio.h>
#include <stdlib.h>
int char_count = 0, line_count = 0, word_count = 0;
%}
%%
[ \t]+ { char_count += yyleng; }
"//".* { char_count += yyleng; }
"/*"([^*]|\*+[^*/])*("*/")? { char_count += yyleng; }
\n { line_count++; char_count++; }
[a-zA-Z_][a-zA-Z0-9_]... | TOOL | 0.963953 | 4.535341 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-02-11T08:20: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": "3460e1c0f333... |
4799ca04-c55c-4398-9dc6-c9841025edd9 | alxsoares/OI | train/TABA/G_std.cpp | #include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define MAXN 10010
#define eps (1e-9)
#define INF 1000000000
#define sqr(x) ((x) * (x))
#define two(x) (1 << (x))
#define X first
#define Y second
typedef long long LL;
int n, ne;
int head[MAXN], k[MAX... | ALGO | 0.999364 | 3.769099 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2013-06-29T20:25:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95006f29de... |
da0b845d-a591-4277-b24d-648e8a9ed151 | ffbh123456/code | 工程/细胞/细胞/源.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <queue>
#include <ctime>
using namespace std;
struct node{
int x, y;
};
int dirs[4][2]={1,0,0,1,-1,0,0,-1};
queue<node> qn;
string num[100];
bool vis[100][100];
int N, M;
bool IN(const node& nn){
return nn.x >= 0 && nn.x < N&&nn.y >= 0 && nn.y < M;
}
v... | ALGO | 0.998422 | 3.185135 | {
"github_metadata": {
"branch": "master",
"commit_count": 186,
"repo_created_at": "2018-02-04T01:42: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": "8e31bf8c... |
3aabea8f-822d-40b9-a3a7-5b64a66e4738 | Alen1ka/function | files.cpp | #include "stdafx.h"
#include <iostream>
#include <string>
#include <fstream>
#include <locale.h>
using namespace std;
string str;
int z = 0;
string path = "function.txt";
int know_size_mass()
{
ifstream file;
file.open(path);
if (file.is_open())
{
while (!file.eof())
{
(file >> str).get();
auto pos = st... | DATA | 0.953736 | 3.555613 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-01-01T09:38: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": "bca7bbe5cc59... |
6ad7a72f-0919-4a06-8188-dca9b478705e | Kumar-laxmi/Algorithms | C++/Maths/GCD and LCM.cpp | /*
•GCD
Greatest common divisor (GCD) of two or more numbers is greatest common factor number that divides them.
•Example
Greatest common divisor of 5 and 10 is 5, because both the numbers are divisible by 5.
5/5 = 1
10/5 = 2
•Method to Find GCD
In order to find gcd of numbers, all factors of the numbers is needed ... | ALGO | 0.999961 | 5.548519 | {
"github_metadata": {
"branch": "main",
"commit_count": 2265,
"repo_created_at": "2022-10-23T02:05:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 338,
"forks": 364,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0f10... |
64c6ac35-9647-428a-8404-7a3feb01b633 | Kraftbar/pose-validation | checkerBoard/record/logsAndCode/cpp/utils/getKeypoints.h | #pragma once
std::vector<std::vector<cv::Vec2d> > cotour_filter(std::vector<cv::Mat> images, double r){
double const pi = 3.14159265;
int areaEst=r*r*pi;
int area_h=areaEst+areaEst*0.7;
int area_l=areaEst-areaEst*0.7;
std::vector<std::vector<cv::Vec2d> > KpCentImages ;
cv::Mat image;
... | ALGO | 0.988491 | 4.675665 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-06-17T19:51: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": "2bd37c906... |
cbb43d2b-526d-4541-b1a1-7a58aa04931c | eliogovea/solutions_cp | Codeforces-Gym/100738 - KTU Programming Camp (Day 2)/K.cpp | // KTU Programming Camp (Day 2)
// 100738K
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const double eps = 1e-7;
LL a, b, p;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> a >> b >> p;
LL lo = 1;
LL hi = 1e18;
LL res = hi;
for (int it = 0; it <= 500... | ALGO | 0.999957 | 4.618413 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-11-16T04:08: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": "e479c4d0d6... |
1141a90d-86eb-473a-8027-ef84c3ef15d3 | handakim25/Algorithm | 프로그래머스/3/43238. 입국심사/입국심사.cpp | #include <string>
#include <vector>
#include <queue>
#include <iostream>
#include <algorithm>
#include <numeric>
// 접근 자체는 항상 비어있는 것을 고르는 탐욕법이다. 항상 가장 짧은 것을 고른다면 그것은 우선순위 큐를 이용할 수도 있다.
// 탐욕법을 이용해서 해결하려고 했는데 기다리는 것을 고려하지 못했다.
// 그러면 기다리는 것까지 고려해서 로직을 우선순위 큐를 만들 필요가 있다.
// 여전히 고민되는 것은 시간을 진행할려면 n번 진행하게 된다는 것이고 그러면 연산이... | ALGO | 0.999957 | 5.809288 | {
"github_metadata": {
"branch": "main",
"commit_count": 70,
"repo_created_at": "2024-12-24T01:50: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": "14f67ef730e... |
22caf0d2-db89-4ea1-b0ce-471cfb773492 | byung-u/PracticeTest | _Algorithm/AlgoSpot_cpp/character_connection_check.cpp | #include <iostream>
#include <stack>
using namespace std;
int main()
{
std::string input;
cin >> input;
int mismatch_cnt = 0;
stack<char> Istack, Tstack;
if (input.length() < 2 || input.length() > 50)
return -1;
for (int i = 0; i < input.length(); ++i) {
if (i > 0) {
... | ALGO | 0.999941 | 3.632452 | {
"github_metadata": {
"branch": "master",
"commit_count": 196,
"repo_created_at": "2016-02-18T07:43:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "96ef5014... |
a3a9ba8f-5cdc-4a56-b9fc-78e280e4af41 | NewMai/LeetCode | LeetCode/middle/numTrees.cpp |
#include "../common.h"
// https://leetcode-cn.com/problems/unique-binary-search-trees/
// AC
#define NULL_NODE (INT_MIN)
// Definition for a binary tree node.
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
TreeNode* createTree(vector<int>& nu... | ALGO | 0.999981 | 5.69021 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2019-09-20T04:38: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": "52b5386c3... |
528b443e-4904-44fb-80a8-09bdd1e4222d | ishandutta2007/codeforces-w | wxhtzdy/normal/1498/E.cpp | /**
* author: milos
* created: 29.03.2021 18:04:00
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector<int> id(n);
iota(id.begin(), id.end(... | ALGO | 0.999923 | 3.35603 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:34: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": "de3283bdbf2b... |
362cb1a3-1519-4967-be1b-ca0c44f0214a | matheux50295/Data-Structures | Arrays/MinLenUnsortedSubArray.cpp | /*
Problem Statement-
Given an unsorted array arr[0..n-1] of size n, find the minimum length subarray arr[s..e] such that sorting this subarray makes the
whole array sorted.
Solution Approach-
a) Scan from left to right and find the first element which is greater than the next element. Let s be the index of such an el... | ALGO | 0.999798 | 3.740926 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2017-06-14T09:48:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d31b00f0... |
00c5d632-b61a-45db-a3d9-ffafd20823a2 | tonyatpeking/SmuSpecialTopic | Engine/Code/Engine/Math/Intersection.hpp | #pragma once
#include "Engine/Math/Vec3.hpp"
#include <vector>
class Plane;
class Segment3;
class OBB3;
class AABB3;
namespace Intersect
{
//returns false if parallel, with 0 or infinite intersections.
bool LinePlane( const Vec3& pointOnLine, const Vec3& lineDir,
const Vec3& pointOnPlane, const Vec3& ... | ALGO | 0.988174 | 5.216388 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2018-05-29T19:33:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e42b459d5... |
5d1f253c-9b4f-4548-a4f7-8caa7cfb4bf5 | robomechanics/quad-sdk | robot_driver/src/controllers/inverse_dynamics_controller.cpp | #include "robot_driver/controllers/inverse_dynamics_controller.h"
InverseDynamicsController::InverseDynamicsController() {}
bool InverseDynamicsController::computeLegCommandArray(
const quad_msgs::RobotState &robot_state_msg,
quad_msgs::LegCommandArray &leg_command_array_msg,
quad_msgs::GRFArray &grf_arra... | ALGO | 0.998947 | 4.647112 | {
"github_metadata": {
"branch": "main",
"commit_count": 150,
"repo_created_at": "2020-08-30T19:19:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 843,
"forks": 148,
"issues": 7,
"pull_requests": 3
},
"file_meta": {
"content_id": "16225be... |
e3c21cea-db90-450b-aaa3-c44471ed5125 | ayushpratap27/DSA-NonStop | Array/Array Prac/canPartitionGrid.cpp | #include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ccomplex>
#inc... | ALGO | 0.99996 | 4.879986 | {
"github_metadata": {
"branch": "main",
"commit_count": 949,
"repo_created_at": "2023-10-15T18:14: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": "1ed31f20d4... |
160a1957-32f2-41a2-a0d6-041f3484ef90 | narraabhigna/line-encoding | line_encoding.cpp | #include <iostream>
#include <graphics.h>
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
using namespace std;
int gd = 5, gm;
int pos_x = 50, pos_y = 100;
string getSignal() {
string signal;
cout << "Enter signal to be encoded" << endl;
cin >> signal;
... | ALGO | 0.979894 | 4.451121 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-12-23T08:02: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": "a60c0a0c2eb4... |
9c272088-b6a5-4d24-9e0f-f9b938ad89cc | metaphysis/Code | UVa Online Judge/volume113/11378 Bey Battle/program.cpp | // Bey Battle
// UVa ID: 11378
// Verdict: Accepted
// Submission Date: 2017-02-25
// UVa Run Time: 0.190s
//
// 版权所有(C)2017,邱秋。metaphysis # yeah dot net
#include <bits/stdc++.h>
using namespace std;
// 点的最大数量。
const int MAXV = 100010;
// “无限大” 距离值,需要根据具体应用设置。
const int MAX_DIST = 10000000;
struct point
{
int ... | ALGO | 0.999947 | 4.59895 | {
"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": "c9e3... |
43b05c4a-75ab-48ee-9d55-3a770bba63f5 | SakshamSahgal/Competitive-Programming | Codeforces + Codechef/B. Valera and Elections2.cpp | #include<bits/stdc++.h>
#define lli long long int
#define ld long double
#define GO_FAST ios_base::sync_with_stdio(0);ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
// basic debugging macros
lli __i__,__j__;
lli inf = 9e18;
#define line_printer(l) cout<<"\n"; for(__i__=0;__i__<l;__i__++){cout<<"-";}cout<<endl;
#define... | ALGO | 0.99998 | 3.885654 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2021-12-26T10:02:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "248580b1311... |
3d26bf92-e334-40d4-8a12-52b947eb034a | httgxx/MyLintCode | 163.unique-binary-search-trees.cpp | /*
* @lc app=lintcode id=163 lang=cpp
*
* [163] Unique Binary Search Trees
*
* https://www.lintcode.com/problem/unique-binary-search-trees/description
*
* lintcode
* Medium (38.00%)
* Total Accepted: 9053
* Total Submissions: 23778
* Testcase Example: '0\n'
*
* Given *n*, how many structurally unique *... | ALGO | 0.999964 | 6.310826 | {
"github_metadata": {
"branch": "master",
"commit_count": 656,
"repo_created_at": "2019-04-11T04:55: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": "587425e0... |
d1abd3f3-0235-4498-b882-8d9b53d3f42d | VolPlita/CTU | PA2/hw05/test.cpp | #ifndef __PROGTEST__
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <deque>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <memor... | TOOL | 0.912812 | 4.100122 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2023-01-21T14:36: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": "572d7c5a2b0... |
4f7e9d12-a6b2-4e10-a56e-75bb07d0f577 | Knabin/TBCppStudy | Chapter13/Chapter13_01/main_chapter131.cpp | #include <iostream>
#include "Cents.h"
using namespace std;
template<typename T>
T getMax(T x, T y)
{
return (x > y) ? x : y;
}
/*
int getMax(int x, int y)
{
return (x > y) ? x : y;
}
double getMax(double x, double y)
{
return (x > y) ? x : y;
}
float getMax(float x, float y)
{
return (x > y) ? x : y;
}
char g... | ALGO | 0.968672 | 4.229952 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2020-04-11T15:08: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": "3c0badcdc... |
061af6f8-ce65-4edd-beba-1fcccb5987b7 | axe-el/Uva-problems | 12243/12243.cpp | //12243 - Flowers Flourish from France
//tautograma oracion cada palabra empieza con la misma letra,
//Tomo la primera letra en minuscula(Si es mayuscula la cambio a minuscula) cada que encuentro espacio reviso el siguiente caracter
//Pues sera el que diga si es tautograma o no
#include <iostream>
#include <string>
us... | ALGO | 0.999523 | 3.42074 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-09-06T00:26: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": "faed39c4af1e... |
57d39559-b6ee-4663-b16e-08e66d1db2d3 | BlueSu007/Luogu-codes | P1967 货车运输.cpp | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <climits>
using namespace std;
#define N 10005
#define M 50005
struct Edge {
int id , u , v , w ;
Edge () : id (0) , u (0) , v (0) , w (0) {} ;
inline bool operator < ( Edge &x ) const {
return w > x.w ;
}
} ... | ALGO | 0.999989 | 4.21483 | {
"github_metadata": {
"branch": "master",
"commit_count": 572,
"repo_created_at": "2020-04-08T07:44: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": "b8a5207c... |
54503a20-e6d7-4cc3-a662-f54f73b13b08 | DamienGygi/Cuda | Student_Cuda/src/cpp/core/04_MonteCarlo/useMonteCarlo.cpp | #include <iostream>
#include "MathTools.h"
#include "MonteCarlo.h"
#include <limits.h>
#include "cudaTools.h"
#include "Grid.h"
#include "Chrono.h"
using std::cout;
using std::endl;
/*----------------------------------------------------------------------*\
|* Declaration *|
\*--------------------------------... | ALGO | 0.994483 | 4.618864 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2017-03-06T10:21: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": "3748f8022... |
d833bbce-3b86-40a6-9e7d-e47704d91882 | sheriby/DandAInLeetCode | Linked_List/5_Partion_List/method1/test.cc | #include "solution.cc"
ListNode *arr2List(int arr[], int len) {
ListNode *head = new ListNode(arr[0]);
ListNode *pos = head;
for (size_t i = 1; i < len; i++) {
pos->next = new ListNode(arr[i]);
pos = pos->next;
}
return head;
}
void printList(ListNode *head) {
std::cout << "Li... | ALGO | 0.999935 | 5.832424 | {
"github_metadata": {
"branch": "master",
"commit_count": 99,
"repo_created_at": "2020-02-07T08:37: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": "1e38e255b... |
c55be3d9-a54f-42a2-9330-b139ff249139 | zim2510/Online-Judge-Solves | UVA/Unique Factorization.cpp | #include <bits/stdc++.h>
#define Read() freopen("in.txt", "r", stdin)
#define Write() freopen("out.txt", "w", stdout)
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define REP(i, a, b) for(int i = a; a<=b; i++)
#define FOR(i, a, b) for(int i = a;... | ALGO | 0.999927 | 3.821005 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-05-29T20:44:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f091a2f98... |
dfc18fed-972b-49f0-9b03-591f99b824e8 | MFW3D/MFrameWork | MFW/MFW/algorithms/random_select.h | #pragma once
#include <generic.h>
namespace MFWAlg {
/**
* the random_select partition routine
*/
template<typename T>
static int partition_(T list[],int begin, int end) {
int pivot_idx = RANDOM(begin,end);
T pivot = list[pivot_idx];
swap(list[begin],list[pivot_idx]);
int i = begin + 1;
int j ... | ALGO | 0.999061 | 5.802714 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2017-09-11T02:27:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3eb4d17b5... |
dccbfdae-9ed5-42fc-85ca-6876e54d5541 | HuanHuanHuanFFF/HuanF-CodeX | Code Instrumentality Initiative/CF/CF 991 d3/E_Three_Strings.cpp | //
// Created by 幻 on 2025/6/29.
//
#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::pair;
using std::vector;
using std::string;
using ll = long long;
using ull = unsigned long long;
using PII = pair<int, int>;
constexpr int MOD = 1e9 + 7;
constexpr int INF = 1e9 + 17;
constexpr i... | ALGO | 0.999979 | 5.408319 | {
"github_metadata": {
"branch": "master",
"commit_count": 255,
"repo_created_at": "2025-04-16T15:06:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "726009e9... |
cd59091a-2759-49c5-88af-c4381eb452a7 | decalnguyen/CarDodgingObstacle | doan.cpp | #include <reg51.h>
#include <math.h>
sbit SENSOR_PIN = P2^4;
sbit IN3 = P2^2;
sbit IN4 = P2^3;
sbit BUTTON_RIGHT_PIN = P3^2;
sbit BUTTON_LEFT_PIN = P3^7;
//Handle get distance
unsigned int get_distance()
{
unsigned int adc_value;
float voltage;
float distance;
// ADC Initialization (Replace with ... | ALGO | 0.973016 | 4.40841 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-05-03T06:57: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": "7372773c35... |
15f3800f-cadd-47e4-807a-ead5d22ad622 | undernones/particles | lib/geom/KdTree.h | // Copyright (c) 2011, Regents of the University of Utah
// All rights reserved.
//
// 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
// notic... | ALGO | 0.996381 | 6.435887 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2012-12-22T23:38: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": "f7c4a1a2c... |
e9fb85e8-2df3-4863-a7e4-01c0e0eec5cd | Mr-Magnificent/ds-algo | class19_graph/hamiltonianPath.cpp | #include <iostream>
#include <vector>
#include <climits>
using namespace std;
class Edge
{
public:
int nbr;
int wt;
};
vector<vector<Edge>> graph;
void hamiltonianPath(int ini, int source, int count, string ans, bool visited[], int len)
{
if (count == len - 1)
{
ans += "->" + to_string(source);
for (int i =... | ALGO | 0.999901 | 4.040758 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2019-07-24T14:35:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9257b5783... |
b28fe7e4-7268-44e7-9720-d8ca08566e37 | ishandutta2007/codeforces-d | dbradac/normal/793/B.cpp | #include <deque>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define TRACE(x) cerr << #x << " = " << x << endl
#define REP(i, n) for (int i=0; i<n; i++)
#define FOR(i, a, b) for (int i=(a); i<(b); i++)
#define _ << " " <<
typ... | ALGO | 0.999881 | 3.791861 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "ab8a153cc287... |
3c4f9570-8bda-4e1e-8a01-bd683df97e9b | raincross7/code-similarity | codes/train_code/problem234/problem234_78.cpp | #include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define erep(i,a,n) for(int i = a;i<=n;i++)
typedef long long ll;
#define int long long
#define vint vector<int>
#define vvint vector<vector<int>>
#define vstring vector<string>
#define vdouble... | ALGO | 0.999943 | 3.559138 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f98e7beb3d2... |
db17e065-7ac4-40c5-bee3-b7eece2b7fab | pkaleta/topcoder | QuickSums.cpp | #include<iostream>
#include<cstdio>
#include<cctype>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<string>
#include<list>
#include<deque>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<utility>
#include<sstream>
#include<cstring>
using namespace std;
const int MA... | ALGO | 0.999724 | 3.570367 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2011-08-01T23:02:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 29,
"forks": 24,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f1532494... |
26364269-3102-4af1-addd-1a994f9cb475 | iglesias/coding-challenges | kickstart/cake.cc | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
using ull = unsigned long long;
vector<vector<ull>> dp;
void presolve(const int N)
{
for (int n = 1; n <= N; n++) dp[1][n] = n;
for (int l = 2; l*l <= N; l++) {
for (int n = 1; n <= N; n++) {
if (n >= l*l... | ALGO | 0.999303 | 4.617077 | {
"github_metadata": {
"branch": "main",
"commit_count": 349,
"repo_created_at": "2012-01-31T20:48:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 5,
"pull_requests": 1
},
"file_meta": {
"content_id": "1816465ee6... |
b3ce0179-75f8-4918-8f50-fe21039db475 | Pursottam6003/DSA_Practice | NeetCode/Day7/min_stack.cpp |
// https://leetcode.com/problems/min-stack/submissions/970813934/
typedef long long int lli;
class MinStack {
public:
lli miniEle;
stack <lli> stk;
MinStack() {
}
void push(int val) {
val = (lli)val;
if(stk.empty())
{
stk.push(val);
miniEle = (... | ALGO | 0.999846 | 6.371101 | {
"github_metadata": {
"branch": "main",
"commit_count": 119,
"repo_created_at": "2022-12-18T04:44:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5191bcca3... |
b76f2c9e-0969-45a9-b549-e3175ebc2fa5 | tensorflow/tensorflow | tensorflow/lite/kernels/segment_sum.cc | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | ALGO | 0.985986 | 7.403707 | {
"github_metadata": {
"branch": "master",
"commit_count": 182413,
"repo_created_at": "2015-11-07T01:19:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 190773,
"forks": 74758,
"issues": 873,
"pull_requests": 553
},
"file_meta": {
"content... |
5aa59964-b7cc-4b09-b656-e0c8570eb6ee | bgin/Radar-ElectroOptical-Simulation | Radiolocation/GMS_em_fields_ymm8r4.cpp |
/*MIT License
Copyright (c) 2020 <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, publish, distri... | ALGO | 0.999335 | 3.798123 | {
"github_metadata": {
"branch": "master",
"commit_count": 5635,
"repo_created_at": "2019-09-27T18:45:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 62,
"forks": 21,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cae0... |
91218c81-3730-4aec-9d42-75a4a46acf60 | miaomiaocoder/CodePractice | acwing/AcWing154.cpp | #include <cstdio>
#include <iostream>
using namespace std;
const int N = 1e6 + 10;
int n, k;
int a[N], q[N];
int main() {
scanf("%d%d", &n, &k);
for (int i = 0; i < n; i++) scanf("%d", &a[i]);
int hh = 0, tt = -1;
for (int i = 0; i < n; i++) {
if (hh <= tt && i - k + 1 > q[hh]) hh++;
... | ALGO | 0.999993 | 3.189994 | {
"github_metadata": {
"branch": "main",
"commit_count": 158,
"repo_created_at": "2022-04-18T04:49:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02f0ef484e... |
5cb80706-c863-48db-bf01-4449fbc784e2 | mrsac7/CSES-Solutions | src/1725 - Dice Probability.cpp | /*
Problem Name: Dice Probability
Problem Link: https://cses.fi/problemset/task/1725
Author: <NAME> (mrsac7)
*/
#include<bits/stdc++.h>
using namespace std;
template<typename... T>
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_s... | ALGO | 0.998268 | 4.105964 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2020-05-06T08:18:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 394,
"forks": 157,
"issues": 1,
"pull_requests": 4
},
"file_meta": {
"content_id": "09e62... |
e007a7bf-29a1-4d99-8d4a-1a1f06001e47 | codulluiandrei/pbinfo | pbinfo-858/main.cpp | #include <iostream>
#include <cstring>
using namespace std;
bool Cifra(char X)
{
return X >='0' && X<='9';
}
int main()
{
char s[256];
cin.getline(s , 256);
int coefX = 0 , coefY = 0, coefZ = 0;
bool apareX = false, apareY = false , apareZ = false;
int semn = 1 , coef = 0;
bool amCoef = false;
int n = strlen(s)... | ALGO | 0.999813 | 3.328824 | {
"github_metadata": {
"branch": "main",
"commit_count": 88,
"repo_created_at": "2022-04-17T15:34:21.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 3,
"issues": 48,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd2eb6bd9f7... |
48b252b7-5808-4bef-b0c6-b446af72f597 | njoubert/UndergraduateProjects | RSCH_ClothSym/branches/Intel/src/intel_SparseMatrix.cpp | /*
* SparseMatrix.cpp
*
* Created on: Oct 7, 2008
* Author: silversatin
*/
// Physics_SparseSymmetricMatrix.cpp: implementation of the Physics_SparseSymmetricMatrix class.
//
//////////////////////////////////////////////////////////////////////
#include "intel_SparseMatrix.h"
//#include "DRGShell.h"
/////... | TOOL | 0.967793 | 4.145097 | {
"github_metadata": {
"branch": "master",
"commit_count": 1254,
"repo_created_at": "2015-12-31T10:51:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc1ef76... |
1c517d8d-a7db-4358-a543-5849d3a699bf | jianglab/motioncorr | src/SP++3/include/ccholesky-impl.h | /*
* Copyright (c) 2008-2011 <NAME> (<NAME>), <EMAIL>
*
* 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 2 or any later version.
*
* Redistribution and use in source and bin... | ALGO | 0.999858 | 5.671696 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2015-07-24T20:50:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9c4b91e8... |
94e94adf-ebb7-4c30-a045-a62e2e54a353 | Rishi-11-2/CP | E_Empty_Triangle.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;
using namespace chrono;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long getRandomNumber(long long l, long long r) {return uniform_int_dis... | ALGO | 0.999901 | 3.542544 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2023-10-19T06:20:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5132dc0b33c... |
fa70e514-394c-428f-b00c-121ca276ced1 | jwhurt/Projects | C++_Projects/CS106B/Assignment3-Recursion/3-2-Ruler/src/ruler.cpp | /* CS106B Assignment 3, problem 2: Draw Ruler using recursion */
#include "gevents.h"
#include "gwindow.h"
#include <iostream>
using namespace std;
void DrawRuler(GWindow & gw,double x, double y, double w, double h);
int main(){
GWindow gw;
double width=gw.getWidth();
double height=gw.getHeight();
cout<<"w... | ALGO | 0.969906 | 5.070153 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2015-12-01T18:17:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39d65eeaf... |
74692be0-c010-4fe0-8d1b-1b125886c26a | ishandutta2007/codeforces-y | yutaka1999/normal/671/E.cpp | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#define SIZE 100005
#define BT 1024*128*2
#define INF 100000000000000000LL
using namespace std;
typedef long long int ll;
typedef pair <ll,int> P;
struct segtree
{
ll seg[BT];
int mum;
void init(int n)... | ALGO | 0.999884 | 3.326379 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:40:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4930a703a15b... |
feb3e104-8011-4d61-a9b8-e2c2b97b6e59 | rmartella/opencv_projects | FingerTipTracking/src/FingerTipDetection.cpp | #include "FingerTipDetection.h"
int FingerTipDetection::BiggestContour(vector<vector<Point> > contours) {
int indexBiggestContour = -1;
int biggestContour = 0;
for (int i = 0; i < contours.size(); i++) {
int size = contours[i].size();
if (size > biggestContour) {
biggestContour = size;
indexBiggestContou... | ALGO | 0.961104 | 5.265218 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-09-24T05:52: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": "528c28e8fb... |
1aaf8708-2801-4e2c-bc0b-b7483d7aa356 | dwavesystems/dwave-samplers | dwave/samplers/tree/src/include/treedecomp.h | /**
# Copyright 2019 D-Wave 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 la... | ALGO | 0.998907 | 6.158113 | {
"github_metadata": {
"branch": "main",
"commit_count": 1300,
"repo_created_at": "2022-03-09T19:04:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14,
"forks": 17,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fc07778... |
f1795489-e24e-4310-b914-666562914bc9 | arangodb/arangodb | 3rdParty/boost/1.78.0/libs/multi_index/example/random_access.cpp | /* Boost.MultiIndex example of use of random access indices.
*
* Copyright 2003-2008 <NAME>.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* See http://www.boost.org/libs/multi_index for library home page... | ALGO | 0.956512 | 5.801013 | {
"github_metadata": {
"branch": "devel",
"commit_count": 51986,
"repo_created_at": "2011-10-26T06:42:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13878,
"forks": 857,
"issues": 743,
"pull_requests": 38
},
"file_meta": {
"content_id": ... |
b0e77bf3-b82a-446e-87d9-5b90b9bc6988 | sigmaco/gamebryo-v32 | Include/NiBoxCapsuleIntersector.h | // EMERGENT GAME TECHNOLOGIES PROPRIETARY INFORMATION
//
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Emergent Game Technologies and may not
// be copied or disclosed except in accordance with the terms of that
// agreement.
//
// Copyright (c) 1996-2009 Em... | TOOL | 0.908259 | 5.786473 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-07-21T14:39:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "482e62a3... |
297fe8d7-5a9c-49f8-b613-0a6c781bd5ee | brnovk/university-study-master | 2nd course/c language (basics)/Lab_2.2.1/main.cpp | #include <conio.h>
#include <iostream.h>
//---------------------------------------------------------------------------
#pragma hdrstop
#pragma argsused
//---------------------------------------------------------------------------
/*Tasks.*/
// Develop program 3 implement processing vector.
// Checkout solution each ta... | ALGO | 0.997649 | 4.082887 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-05-18T15:28:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e2106d0ea... |
b76fe107-c438-4b99-be5f-747408e2a089 | Edern76/RoadGenerator | src/types/RoadGrid.cpp | //
// Created by gawei on 11/05/2024.
//
#include <optional>
#include <iostream>
#include <set>
#include "../constants/Directions.h"
#include "../../include/types/RoadGrid.h"
#include "../exceptions/OutOfBoundsException.h"
#include "../exceptions/InvalidNonEmptyAssumption.h"
#include "../exceptions/TileAlreadyFilledEl... | TOOL | 0.936415 | 6.846529 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-05-11T15:25: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": "2a5eb638720f... |
a13dca01-2eec-4f2a-b6f0-a9230b45758c | grisaia-dev/ASYNC_PROG | task_1/src/main.cxx | #include <iostream>
#include <random>
#include <future>
#include <vector>
void add_data(std::vector<int>& otherVector);
void selection_sort(std::vector<int>& otherVector);
int main(void) {
setlocale(LC_ALL, "ru_RU.UTF-8");
std::vector<int> data;
add_data(data);
std::cout << "До сортировки: ";
for ... | ALGO | 0.999711 | 4.99006 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-08-15T07:13: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": "9f147dc9eb99... |
ed03a026-39be-4b75-a3d4-67c36c47e0c7 | PawanKumar85/DSA | union.cpp | #include <iostream>
#include <vector>
#include <limits.h>
using namespace std;
int display(vector<int>a)
{
for (int i = 0; i < a.size(); i++)
{
if(a[i] != INT_MIN)
cout << a[i] << " ";
}
cout << endl;
return 0;
}
int union_(vector<int> a, vector<int> b)
{
vector<int> c;
... | ALGO | 0.999804 | 4.619208 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-10-30T19:48:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83d99cbeaa44... |
242c84aa-97c7-43d9-a639-bd4bfc0a2717 | FracsGit/Exercise | 13_MovingCount/main.cpp | #include<vector>
#include<iostream>
using namespace std;
int SumBit(int m)
{
int sum = 0;
while (m != 0)
{
sum += m % 10;
m /= 10;
}
return sum;
}
int Count(int x, int y, int m, int n, int k, vector<vector<bool>> &map)
{
map[x][y] = true;
if (SumBit(x) + SumBit(y) > k)
return 0;
int count = 1;
if (x +... | ALGO | 0.999966 | 4.784753 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2019-04-09T15:20: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": "2d55655ae... |
496492dd-b1a0-4245-a7e7-919e3fdeb2ca | imkrsnna/tictactoe | tick_tac_toe.cpp | #include<iostream>
using namespace std;
class tictactoe{
int board[3][3];
int player;
public:
tictactoe()
{
player=1;
int i,j;
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
board[i][j]=0;
}
}
}
//class member function declaration
void display();
void set_number(int ind);
void change();
voi... | ALGO | 0.994234 | 3.52871 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-11-27T06:55: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": "35f38cb859ec... |
a72dc9e9-092c-45b4-bb56-8bd941ee659d | elered/Simulazione_numerica | lezione 8/random.h | /****************************************************************
*****************************************************************
_/ _/ _/_/_/ _/ Numerical Simulation Laboratory
_/_/ _/ _/ _/ Physics Department
_/ _/_/ _/ _/ Universita' degli Studi di Milano
_/ _/ ... | ALGO | 0.965655 | 3.828752 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2024-07-19T15:44: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": "27d0e266e53... |
f7a8d145-7dd7-4eb9-8c51-e26bfc957126 | dsjohnson/multAbund | src/mult_zip_mcmc.cpp | // [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::depends(RcppProgress)]]
#include "RcppArmadillo.h"
#include <progress.hpp>
using namespace Rcpp;
using namespace arma;
//using namespace R;
// Function defs..
int sample_du(arma::vec ppp);
arma::vec armaNorm(int n);
arma::vec armaU(int n);
arma::vec GCN(const arma::mat& ... | DATA | 0.993584 | 3.517124 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2015-09-11T21:22:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "856af94cf... |
6c1fed30-8e71-4577-acaf-c50aa8bad7eb | zzArchive-if-03-22-A-fall-2018/avl-tree-impl-MoritzEichhorn | avl_tree.cpp | #include <stdio.h>
#include "avl_tree.h"
Node insert(Node node, int key){
if (node == 0){
node = create_node(key);
}
if (key < get_key(node)){
set_left(node, insert(get_left(node), key));
} else if (key > get_key(node)){
set_right(node, insert(get_right(node),key));
} else ... | ALGO | 0.999596 | 4.239075 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-04-02T08:43:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52036cbdd4f... |
17bc0dca-ff1b-49d8-b252-084eed80dac1 | YashhhCodesHere/Cpp-DSA-Questions-Practice | 12. Strings/1_Char_Datatype.cpp | #include <bits/stdc++.h>
using namespace std;
/*
Character is of 1 byte (8-Bits).
It is used to store characters like 'a' - 'z', 'A' - 'Z', '0' - '9', special characters like '@', '#', '$', etc.
We can also store some special characters like '\n', '\t', '\0', etc.
All these characters are stored in ASC... | TOOL | 0.969342 | 3.966017 | {
"github_metadata": {
"branch": "main",
"commit_count": 350,
"repo_created_at": "2024-09-01T07:04: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": "fc4dffec33... |
13a4c477-e3a0-4c13-85e4-431eeeb06702 | Adi1222/Coding-Interview-Preparation | Tree/Maximum Sum Leaf to Root path in a tree.cpp | #include <iostream>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int x)
{
data = x;
left = NULL;
right = NULL;
}
};
// NOTE: initially ans will be INT_MIN
void solve(node *nod, int &ans, node *(&leaf), int cur = 0)
{
if (nod ==... | ALGO | 0.999985 | 4.352087 | {
"github_metadata": {
"branch": "master",
"commit_count": 308,
"repo_created_at": "2020-10-03T07:33:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75b4696c... |
0afd8262-0ceb-4c35-8e6b-2fcaba790377 | TH-takahirohara/atcoder_solve | abc328/e_modulo_mst__after_contest.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef unsigned long long ull;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define fore(i,a) for(auto &i:a)
// 桁数指定: cout << fixed << setprecision(10)
int N, M;
ll K;
vector<vector<ll>> vec;
vector<vector<l... | ALGO | 0.999899 | 4.565188 | {
"github_metadata": {
"branch": "main",
"commit_count": 671,
"repo_created_at": "2022-02-26T13:48:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a8398183e... |
2240aad9-5e90-451c-96ee-d283323647d0 | 237K/SimpleProject | banking_system_ver5.cpp | //
// Banking_System_ver5.cpp
// 237Projects
//
// Created by 형성모 on 28/12/2018.
//
// Banking System 입니다.
// ver2. 구조체를 클래스로 변경하고, 기존의 배열을 포인터 배열로 변경하였으며 동적할당으로 메모리사용을 최적화하였습니다.
// ver3. ver2에서 발생한 segmentation fault를 해결하고, 복사생성자를 추가하였습니다.
// ver4. 전역변수를 클래스 내부의 static 변수로 변경하여 혼동을 방지하였으며, const를 추가하여 안정성을 높였습니... | TOOL | 0.959134 | 3.679594 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2018-12-25T14:05: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": "a64c99d51... |
6b52df98-73da-4491-86fd-bfdf44682e14 | xyiyy/icpc | src/poj/problem set/3281.cpp | //gaoshenbaoyou ------ pass system test
#include <iostream>
#include <sstream>
#include <ios>
#include <iomanip>
#include <functional>
#include <algorithm>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <cs... | ALGO | 0.999568 | 3.336549 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2015-08-04T13:49:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6dc30727... |
eb801899-5463-43e8-92e6-35c8f0673105 | Sodu-Qinming/Oneflow | oneflow/customized/kernels/softmax_kernel_util.h | /*
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | ALGO | 0.990433 | 7.145969 | {
"github_metadata": {
"branch": "Yipeng/develop",
"commit_count": 4835,
"repo_created_at": "2020-08-07T08:40:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": ... |
7d68f6bf-438c-4a34-a6c9-d5e0b9064335 | SolveGuys/AlgorithmStudy | Problems_Archives/95week/nmp9981/3687.cpp | #include <iostream>
using namespace std;
const int maxi = 101;
string minDP[maxi] = { "0","0","1","7","4","2","6","8","10","18","22","20"};//최소
string maxDP[maxi] = { "0","0","1","7" };//최대
//max
inline int max(int x, int y) {
return x > y ? x : y;
}
//min
inline int min(int x, int y) {
return x < y ? x : y;
... | ALGO | 0.999368 | 3.819 | {
"github_metadata": {
"branch": "master",
"commit_count": 2184,
"repo_created_at": "2021-11-06T03:55:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f601fb0a... |
60781c11-7ad3-4e20-8903-c6fe75562cac | nutan-sangani/CP-Practice | Initial practice 1500-1600/C_Even_Subarrays.cpp | #include <iostream>
#include<bits/stdc++.h>
#define ll long long
#define forLoop for(int i=0;i<n;i++)
#define pii pair<int,int>
#define pb push_back
#define pll pair<ll,ll>
#define mp make_pair
#define um unordered_map
#define us unordered_set
#define umll unordered_map<ll,ll>
#define omll map<ll,ll>
#define vecll vect... | ALGO | 0.999736 | 3.527228 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-12-03T11:56:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b448ffc4a93... |
aee24af3-11cf-48e3-8dbd-cbf8566f9e12 | eiyen/think-like-a-programmer | Chapter 2/2-Decode-A-Message/intermediate steps/10-number-to-punctuation.cpp | /* Turn number to punctuations. */
#include <iostream>
using namespace std;
void digitToPunctuation() {
char charNum;
int digitNum = 0, puctuation, onlyExecuteOnce = 1, numCalculateTimes = 0;
cout << "Enter groups of strings of number seperated by character: ";
do
{
charNum = cin.get();
... | ALGO | 0.993656 | 3.631868 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2021-12-05T12:55: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": "5a9815f09c... |
10dd5871-a981-4ae2-822b-935a523902c1 | shoaib30/DS-Lab | character stack.cpp | #include<iostream>
using namespace std;
#define size 10
struct stack
{
int top;
char items[size];
};
void disp(stack *s)
{
int i;
cout<<"\nDisplaying Stack: ";
for(i=0;i<=s->top;i++)
{
cout<<s->items[i]<<",";
}
}
int isFull(stack *s)
{
if(s->top==size)
{
return true;
... | ALGO | 0.987393 | 3.822961 | {
"github_metadata": {
"branch": "master",
"commit_count": 72,
"repo_created_at": "2014-09-06T16:32:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "264969115... |
1bda10bd-3047-4470-ab48-8c23a3aa8609 | birneysky/Leet-code-practice | leet-code/ArraySolution1.hpp | //
// ArraySolution1.hpp
// leet-code
//
// Created by zhangguang on 16/3/4.
// Copyright © 2016年 com.github. All rights reserved.
//
#ifndef ArraySolution1_hpp
#define ArraySolution1_hpp
#include <stdio.h>
#include <vector>
#include <iostream>
using namespace std;
class ArraySolution1 {
public:
ArraySo... | ALGO | 0.999937 | 5.325264 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2016-03-04T02:46: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": "9785e5051... |
32ba3719-571e-43c1-8f8a-342e60e99b6f | pkthapa/Leetcode | Easy/Diameter-of-Binary-Tree/Diameter-of-Binary-Tree.cpp | #include "main.hpp"
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), left(left), right(right) {}
};
class Solut... | ALGO | 0.999683 | 6.405717 | {
"github_metadata": {
"branch": "main",
"commit_count": 259,
"repo_created_at": "2022-07-08T02:29:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "442a7629db... |
dafcb705-d1b3-4728-8efa-b9cf61ccad20 | knockcat/Leetcode | 1291. Sequential Digits.cpp | // 1291.✅ Sequential Digits
/*
An integer has sequential digits if and only if each digit in the number is one more than the previous digit.
Return a sorted list of all the integers in the range [low, high] inclusive that have sequential digits.
Example 1:
Input: low = 100, high = 300
Output: [123,234]
Example 2:... | ALGO | 0.999758 | 6.714927 | {
"github_metadata": {
"branch": "master",
"commit_count": 3603,
"repo_created_at": "2022-01-15T12:41:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 500,
"forks": 122,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b9... |
13ed86e5-8e63-45b3-9031-bdaf2cb4db33 | rabhijit/Kattis | metaprogramming.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
string command;
unordered_map<string, int> variables;
while (cin >> command) {
if (command == "define") {
int x;
string var_name;
cin >> x >> var_name;
variables[var_name] = x;
}
else if (command == "eval") {
string var1, var2;
cha... | ALGO | 0.957719 | 4.244173 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-11-26T11:45:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22aebd4b9c... |
a8ddbcbf-8fbf-439d-8964-31f5ef3a0531 | ieAditya/cpp_Codes | Binary tree/burningTreeGFG.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
Node *left;
Node *right;
};
class Solution
{
public:
pair<bool, int> findMaxPath(Node *curr, int &target, int &ans)
{
if (curr == NULL)
{
return make_pair(false, 0);
}
if (curr->data ... | ALGO | 0.999969 | 4.322681 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2022-08-10T05:57: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": "65c57999... |
5c916fb5-69df-4148-a00b-6d1eb86ee52a | stwind/atcoder | contests/abc167/E/main.cpp | // https://kmjp.hatenablog.jp/entry/2020/05/10/0900
#include <bits/stdc++.h>
using namespace std;
// clang-format off
#define REP(i, x, y) for(int i = x; i < y; i++)
#define REPR(i, x, y) for(int i = x; i >= y; i--)
#define IOS ios_base::sync_with_stdio(false); cin.tie(0);
#define all(s) s.begin(), s.end()
#define r... | ALGO | 0.999991 | 5.118037 | {
"github_metadata": {
"branch": "main",
"commit_count": 893,
"repo_created_at": "2020-06-18T11: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": "b5bfd46fc9... |
c8d82d32-aaae-4a56-a12a-41311fb04696 | PaddlePaddle/PaddleCustomDevice | backends/intel_gpu/kernels/dnn_support.hpp | // Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... | CONFIG | 0.908368 | 6.956268 | {
"github_metadata": {
"branch": "develop",
"commit_count": 1251,
"repo_created_at": "2022-03-29T08:05:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 88,
"forks": 171,
"issues": 26,
"pull_requests": 24
},
"file_meta": {
"content_id": "dd... |
96dad397-4b9e-4e8a-9f44-8adf5ee4d87e | DeeeU/Everyday-problem-C | inazuma/cpp/ABC/Cprob/under_99/077.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define itn int
typedef long long ll;
typedef pair<int,int> p;
vector<int> over;
vector<int> center;
vector<int> under;
int main()
{
int n;
cin >> n;
int tmp;
for (int i =... | ALGO | 0.9998 | 3.94632 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2018-11-28T04:23:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0394b4821... |
195ebc5b-3a5d-424c-ba49-e4540652b087 | raymon-zhang/cp | CodeForces/GNU C++20 (64)/1708C | Doremy's IQ/164544563.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(x) begin(x), end(x)
#define pb push_back
#define F first
#define S second
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
void solve() {
int n, q;
cin >> n >> q;
vector<int> a(n);
for (int &i: a) {
cin >>... | ALGO | 0.999717 | 3.793744 | {
"github_metadata": {
"branch": "main",
"commit_count": 423,
"repo_created_at": "2022-10-19T04:05: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": "e465873be9... |
eee1160a-945c-41c7-a33f-530d50700e3f | ermig1979/Simd | src/Simd/SimdAmxBf16Histogram.cpp | /*
* Simd Library (http://ermig1979.github.io/Simd).
*
* Copyright (c) 2011-2024 <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 th... | TOOL | 0.943204 | 6.669896 | {
"github_metadata": {
"branch": "master",
"commit_count": 4063,
"repo_created_at": "2015-03-25T15:24:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2179,
"forks": 437,
"issues": 30,
"pull_requests": 1
},
"file_meta": {
"content_id": "7... |
7ae0a4ab-3785-4caa-b341-ea7953b211ee | wildpotato/LC | 204/soln.cpp | #include "../include.h"
// The sqrt() function is simply too expensive and may cause
// TLE (time limit exceeded) on Leetcode server, therefore we
// must use a little trick to achieve the same logic.
// The Sieve of Eratosthenes uses an extra O(n) memory and its runtime complexity is O(n log log n).
class Solution {
... | ALGO | 0.999951 | 5.90329 | {
"github_metadata": {
"branch": "master",
"commit_count": 198,
"repo_created_at": "2020-10-30T09:00: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": "c500ebf0... |
beb40f39-70fd-4f43-836b-f9c45055d7ca | AVVKavvk/DSA | DnC/merge.cpp | #include <bits/stdc++.h>
using namespace std;
#define pi 3.14
#define fli(a, b) for (int i = a; i < b; i++)
#define flj(a, b) for (int j = a; j < b; j++)
#define flk(a, b) for (int k = a; k < b; k++)
#define ma(a, b) ((a) > (b) ? (a) : (b));
#define mi(a, b) ((a) < (b) ? (a) : (b));
#define pb push_back
#define pob pop... | ALGO | 0.999894 | 3.828276 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2023-05-26T10:37: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": "d937064883... |
f10f38f7-3028-4b21-8ef3-42bc62a0dcfa | ArIrVa/Algorithms_CPP_homeworks | hw_4.6/hw_04_06_task_3/hw_04_06_03_rework.cpp | // Задача 3. Упрощённый алгоритм Рабина-Карпа
#include <iostream>
#include <string>
using namespace std;
u_int _hash(string str, u_int l)
{
u_int hash_sum{};
for (u_int i = 0; i < l; ++i)
{
hash_sum += static_cast<int>(str[i]);
}
return hash_sum;
}
int find_substring_light... | ALGO | 0.999143 | 4.626835 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-02-17T20:32: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": "c043c1d368d3... |
88a0e850-3c9f-4c93-a372-57b9006862e5 | sankalprawat/OOP-C- | VirtualFunctions.cpp | #include <iostream>
using namespace std;
#define PI 3.14
class Shape {
public:
virtual double getArea() const = 0;
};
class Rectangle : public Shape {
private:
int width;
int height;
public:
Rectangle(int w, int h) : width(w), height(h) {}
double getArea() const override {
return width ... | TOOL | 0.948814 | 5.585904 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-04-21T20: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": "9f78a1534eb... |
261f6044-c050-42a4-841e-4bbe3b815257 | nitishrudra3510/Data-Structure-Algorithms | Queues/DesignDequeueFromDLL.cpp | #include<iostream>
using namespace std;
class Node {
public:
int val;
Node* next;
Node* prev;
Node(int value) {
this->val = value;
this->next = NULL;
this->prev = NULL;
}
};
class Dequeu { //user defined DATA structure
Node* head;
Node* tail;
int size;
public:... | ALGO | 0.996367 | 4.620704 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-06-20T08:11: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": "c7e9a68ff13... |
b252feff-83b7-4b1a-b7f0-bbdf226b7d74 | fanagislab/GCE | gce-alternative/estimate_repeat.cpp | //This program is used to calculate the P(i) or ai, the repeat types of kmer freq in genomic sequence.
//This function can be modified easily to calcualte the heterozyous rate of diploid genome.
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set... | DATA | 0.998931 | 3.937904 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-02-27T03:39:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 51,
"forks": 5,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "e03d853fa... |
6a2166c0-3b95-44f0-b5be-820d8a508df3 | SunNEET/LeetCode | 200. Number of Islands.cpp | class Solution {
/*
DFS水過
Time: O(M*N), M is row, N is column
Space: O(M*N), for keeping track of visit
*/
int dx[4] = {0,1,0,-1};
int dy[4] = {1,0,-1,0};
public:
int numIslands(vector<vector<char>>& grid) {
if(!(int)grid.size()) return 0;
vector<vector<short> > vis... | ALGO | 0.999968 | 5.859459 | {
"github_metadata": {
"branch": "master",
"commit_count": 175,
"repo_created_at": "2018-04-23T13:04: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": "fa8ea471... |
982f44f1-0fdc-4d23-9c24-d97b0557d5b0 | mmp/pbrt-v4 | src/pbrt/interaction.h | // pbrt is Copyright(c) 1998-2020 <NAME>, <NAME>, and <NAME>.
// The pbrt source code is licensed under the Apache License, Version 2.0.
// SPDX: Apache-2.0
#ifndef PBRT_INTERACTION_H
#define PBRT_INTERACTION_H
#include <pbrt/pbrt.h>
#include <pbrt/base/bssrdf.h>
#include <pbrt/base/camera.h>
#include <pbrt/base/lig... | ALGO | 0.926197 | 6.881496 | {
"github_metadata": {
"branch": "master",
"commit_count": 1367,
"repo_created_at": "2017-07-28T14:11:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3162,
"forks": 529,
"issues": 73,
"pull_requests": 10
},
"file_meta": {
"content_id": "... |
27b64ca3-19bb-4b5e-8286-a4ce4dd66a84 | MohamedAbdelAzeem/CodeForces-workspace | 155B - Combination.cpp | /* https://codeforces.com/problemset/problem/155/B */
/* sorting using lamda expression */
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <chrono>
#include <map>
#include <unordered_map>
#include <math.h>
#include <set>
#include <algo... | ALGO | 0.999993 | 3.819086 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2021-04-03T22:53:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c718f0b771b... |
2b2d5475-ea85-44ea-96ba-d1ba69127dc9 | Gokulkrishnanrg2004/Codsoft | tic tac toe.cpp | #include <iostream>
using namespace std;
char grid[10] = {'o','1','2','3','4','5','6','7','8','9'};
int ifwin();
void board();
int main()
{
int player = 1,i,choice;
char mark;
do
{
board();
player=(player%2)?1:2;
cout << "Player " << player << ", enter a number: ";
cin ... | ALGO | 0.996566 | 3.79021 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-10-29T09:20:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3cd06c5993d2... |
69501d3b-64af-41f5-8035-b1b5710816a0 | SusieGlitter/CS0501H-03 | 1468/1468-failed2.cpp | #include<iostream>
using namespace std;
//总调试开关
// #define DEBUG
#define DEBUG2
#ifdef DEBUG
//这些头文件实际上没有被使用
#include<direct.h>
#include <fstream>
char file_path[256];
//获取路径
void get_path();
//切换到文件输入输出
void file_mode();
#endif
//快读
inline void quickread(int &x);
//快输
inline void quic... | ALGO | 0.971258 | 3.386336 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-05T10:12: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": "c6f16773f90b... |
76c78735-6482-498b-9f31-e5b51d93e574 | Adarshkumbar/Data-Structures-And-Algorithms | Stack/13_NStacksFromAnArray.cpp | // N StacksFrom an Array
// Hard
#include<iostream>
using namespace std;
class NStack{
private:
int * arr;
int * next;
int * top;
int n , s ; // n for no. of stacks and s for size of arr
int freeSpace;
public:
NStack( int n , int s){
... | ALGO | 0.991781 | 3.815312 | {
"github_metadata": {
"branch": "new",
"commit_count": 183,
"repo_created_at": "2023-01-17T14:40:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e759b264fe... |
25c6335a-bbf6-4f54-822e-6ed4813256e2 | wcosyn/physics-code | progs/RhoTransparency/rhodint.cpp | //single node program to compute deuteron rho cross sections, output never used for transparency calculations
#include <iostream>
#include <cstdlib>
using namespace std;
#include <RhoDeuteron.hpp>
#include <Utilfunctions.hpp>
#include <string>
void tzint(double tz, double* result, va_list ap);
void nuint(double nu,... | DATA | 0.983191 | 5.220799 | {
"github_metadata": {
"branch": "master",
"commit_count": 770,
"repo_created_at": "2022-09-28T16:06: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": "a1790096... |
441b0a96-2d01-4674-81c5-775d80508a38 | Oana-Ivan/OOP-Projects | Polynomials/polynomials.cpp | #include <iostream>
#include <cmath>
#include <fstream>
#include <stdlib.h>
using namespace std;
class Polinom
{
int grad_polinom;
double *coeficenti;
public:
Polinom() {
grad_polinom = -1;
coeficenti = NULL;
}
//supraincarcarea lui <<
friend ostream& operator<<(ostream &output... | TOOL | 0.984856 | 4.129981 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2020-02-23T18:14: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": "4b80544d2... |
dbe0de3d-41f7-4379-87ce-71a2d6bc326c | lionadis/CompetitiveProgramming | ICPC/SfaxCPC2018/B.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) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define F first
#define S second
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll... | ALGO | 0.999788 | 3.543656 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-09-08T13:23: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": "c3c35ee556... |
5b6309e5-e430-43ea-a5bb-c095ba4fd6c4 | Ebeed-cs/Mastering-4-critical-SKILLS-using-CPP-17 | 08-1D Arrays/Easy to Medium Level/Is increasing array.cpp | #include<iostream>
using namespace std;
/*
Is increasing array?
● Read an Integer N, then read N (<= 200) integers.
● Print YES if the array is increasing.
○ An array is increasing if every element is >= the previous number
● Inputs
○ 4 1 2 2 5 ⇒ YES
○ 5 1 0 7 8 9 ⇒ NO [0 is < 1, the prev... | ALGO | 0.999975 | 4.304932 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2025-02-02T05:37: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": "c1011822679... |
c24b0bc6-7c90-44d0-b64f-7a9c8ced043c | AatifPathan/Banking-System | banking_system.cpp | #include <iostream>
#include <fstream>
#include <string>
using namespace std;
class Customer {
public:
string name;
int id;
Customer() : name(""), id(0) {}
Customer(string n, int i) : name(n), id(i) {}
};
class Account {
private:
int accountNumber;
double balance;
public:
Account() : ac... | TOOL | 0.99189 | 5.063231 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-10-17T08:28: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": "5d1d483b92a0... |
4fd3bbc8-d3da-4701-9af1-5d762e384054 | makio93/competitive-atcoder | abc178/abc178_f/1/main0.cpp | // 学習1回目,自力WA
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
#define rep(i, n) for (int i=0; i<(int)(n); ++(i))
#define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i))
#define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i))
#define rep3r(i, m, ... | ALGO | 0.999999 | 3.111665 | {
"github_metadata": {
"branch": "main",
"commit_count": 925,
"repo_created_at": "2021-04-23T16:25: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": "a64cd4f8a5... |
08ef53f7-24e1-4c77-9142-b099ca5c55c9 | HugoAhoy/RSA | src/Int.cpp | #include "Int.hpp"
#include "string"
#include "vector"
#include "cmath"
#include "algorithm"
#include "iostream"
#include "Karatsuba.hpp"
Int::Int(){
this->_is_positive = true;
this->_val = std::vector<long long>(1,0);
this->_units = 1;
this->_length = 1;
}
Int::Int(const std::string &val){
if(!th... | ALGO | 0.936487 | 3.840014 | {
"github_metadata": {
"branch": "main",
"commit_count": 98,
"repo_created_at": "2021-10-19T13:34:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9b71a3ae084... |
6afa2f7b-f85d-4b81-aac2-f0d222ab9fbb | kothariji/competitive-programming | Bit-Manipulations/(CODEFORCES) Johnny and His Hobbies.cpp | #include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define mod 1000000007
#define one(x) __builtin_popcountll(x)
#define pp pair<ll,ll>
#define all(x) (x).begin(), (x).end()
#define r... | ALGO | 0.999813 | 4.072979 | {
"github_metadata": {
"branch": "master",
"commit_count": 1881,
"repo_created_at": "2020-08-27T07:08:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 680,
"forks": 501,
"issues": 2,
"pull_requests": 2
},
"file_meta": {
"content_id": "8a9... |
1cc281ce-e5d7-4dd7-9c45-236fbc9390da | mshen010/DataStructuresLab | Lab5/lab5.h | // Name: <NAME>
// SID: 861162403
// Date: 5-10-15
#ifndef LAB5_H
#define LAB5_H
#include <iostream>
#include <cstdlib>
#include <string>
#include <math.h>
#include <vector>
#include <map>
#define nil 0
template <typename Value>
class BST
{
//Binary Tree Node
class Node
{
public:
... | ALGO | 0.998189 | 4.745478 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2015-04-20T09:47: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": "64ad73768... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.