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 |
|---|---|---|---|---|---|---|---|
61e3b9d5-b7b8-497d-a190-aa9253a9a6e2 | sdasgup3/Leetmap | source/sort/mergeSort.cpp | #include<iostream>
#include<cstring>
#include<algorithm>
#include"../utils.h"
void
merge(std::string str[], std::string s1[], int n1, std::string s2[], int n2) {
int ptr1 = 0 , ptr2 = 0, ptr=0;
while(ptr1 != n1 && ptr2 != n2) {
if(s1[ptr1].compare(s2[ptr2]) < 0 ) {
str[ptr++] = s1[ptr1++];
} else {... | ALGO | 0.99994 | 4.873801 | {
"github_metadata": {
"branch": "master",
"commit_count": 351,
"repo_created_at": "2014-11-23T08:52:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a83c7f26... |
fdef3be3-e5fc-47db-9eee-c77ddfd942cc | Bynaryman/OSFNTC | flopoco/src/FPExpressions/ExpressionParserData.cpp | #include "ExpressionParserData.h"
// #define EXPRESSIONPARSER_DEBUG
using namespace std;
node* createVariableNode(char* nodeName){
node* n;
n = (node*) malloc( sizeof(node) );
//set type as input
n->type = 0; //TODO put flopoco namespace FPPipeline::FPNode::input
n->name = nodeName;
return n;
}
node* createCon... | TOOL | 0.960464 | 4.754794 | {
"github_metadata": {
"branch": "main",
"commit_count": 340,
"repo_created_at": "2023-05-30T08:55:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "529651d607... |
19f6fd91-ff84-43ec-a4ca-c98abfaf0a3f | sleepybutawake/IR_OS | CPUpro/cpuuuu.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <limits>
using namespace std;
// 进程控制块结构体
struct PCB {
string name;
int arrtime;
int needtime;
int starttime;
int endtime;
int runtime;
int remaintime;
int priority;
PCB(string n, int at, int nt... | ALGO | 0.999896 | 4.623013 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-06-25T09:44: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": "af42b1640783... |
fe452d1f-ea10-4477-83a3-8d4d3e8f68e4 | mdarikrayhan/Competitive-Programming | codeforces/1178/H.cpp | #include<bits/stdc++.h>
#define For(i,l,r) for(int i=l,i##_e=r;i<=i##_e;++i)
#define rFor(i,r,l) for(int i=r,i##_e=l;i>=i##_e;--i)
#define y0 y_zero
#define y1 y_one
#define all(a) a.begin(),a.end()
using namespace std;
using u32=unsigned;
using i64=long long;
using ll=long long;
using u64=unsigned long long;
using ull... | ALGO | 0.999835 | 3.443005 | {
"github_metadata": {
"branch": "master",
"commit_count": 8052,
"repo_created_at": "2022-05-15T11:22:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb6b7c... |
a76cb2fa-180a-44e2-9b8f-e029e9db2ed2 | whycantiputnothing/randomprojects | C++/Emma's CS Hw/9/entireFile.cpp | #include <iostream>
using namespace std;
class fraction {
public:
fraction();
fraction(int numerator, int denomanator);
void print() const;
void simplify();
fraction addedTo(const fraction &otherF) const;
fraction subtract(const fraction &otherF) const;
fraction multipliedBy(const fraction &otherF) const;
frac... | TOOL | 0.966494 | 6.318783 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2016-02-08T07:10:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "b285a4826... |
78ea5bfe-3cc3-42a7-8ad5-8801f6fe2ff8 | ksb451/Cpp_DSA | CONTEST/Kickstart/E_2020/C.cpp | #include <bits/stdc++.h>
#include <algorithm>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cout.tie(NULL); \
cin.tie(NULL);
#define IN cin >>
#define OUT cout <<
#define nl "\n"
#define all(a) (a).begin(), (a).end()
#define pb push_back
... | ALGO | 0.99994 | 3.787289 | {
"github_metadata": {
"branch": "master",
"commit_count": 137,
"repo_created_at": "2019-01-31T17:53: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": "7387fbfb... |
624f65d2-532b-4d7e-8759-17440b2dd7da | watchpoints/weekly | leetcode/code/151.翻转字符串里的单词.cpp | /*
* @lc app=leetcode.cn id=151 lang=cpp
*
* [151] 翻转字符串里的单词
*/
// @lc code=start
class Solution1 {
public:
//字符串特点:删除一个位置,整体迁移,
//因此利用双指针重新构造一个新字符串
//遇到空格 我就知道left单词结束位置,right单词开始位置
//最后一个单词没有空格
string reverseWords(string s) {
//翻转后单词间应当仅用一个空格分隔
//翻转后的字符串中不应包含额外的空格
/... | ALGO | 0.999371 | 4.915547 | {
"github_metadata": {
"branch": "main",
"commit_count": 535,
"repo_created_at": "2021-03-14T02:39:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 57,
"pull_requests": 0
},
"file_meta": {
"content_id": "887919c84... |
b1c63f0d-09e6-479b-b6fd-bc815d188073 | VijayNegi/LeetCodeProblems | solutions/1155. Number of Dice Rolls With Target Sum.cpp | const int mod = 1e9+7;
class Solution {
public:
int numRollsToTarget(int n, int k, int target) {
vector<vector<int>> memo(n+1,vector(target+1,-1));
function<int(int,int)> dfs = [&](int count, int remain) {
if(count==0 && remain==0)
return 1;
if(count ==0 || re... | ALGO | 0.999992 | 5.600766 | {
"github_metadata": {
"branch": "main",
"commit_count": 2443,
"repo_created_at": "2021-08-14T18:40:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ada00001... |
58941e5f-0ea3-4d0e-8712-a560ec670012 | Cron191/DSA | ONDSACUOIKY/11.cpp |
#include <iostream>
#include <string.h>
using namespace std;
// Cấu trúc của một node
struct NODE
{
int info;
NODE *pNext;
};
// Cấu trúc của một DSLK
struct LIST
{
NODE *pHead;
NODE *pTail;
};
void CreateEmptyList(LIST &L)
{
L.pHead = NULL;
L.pTail = NULL;
}
NODE *CreateNode(int x)
{
N... | ALGO | 0.999858 | 3.58047 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2024-11-01T07:58: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": "7a8f31225... |
ef3eec25-b6e6-4270-b672-43aab348d762 | guangfnian/PAT | advanced/1112/1112.cpp | #include <bits/stdc++.h>
using namespace std;
int ok[128], no[128], vis[128];
int main() {
char s[1100];
int k;
scanf("%d%s", &k, s);
int l = strlen(s);
int st = 0, ed = 0;
while (st < l && ed < l) {
while (ed < l && s[ed] == s[st]) {
ed++;
}
if ((ed - st) % k == 0) {
ok[s[st]] = 1;
} else {
no[s... | ALGO | 0.999993 | 3.012602 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2016-08-29T04:30:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0bf157e... |
4e6883fe-522a-4171-8980-0a5e8cdaad93 | OsvaldoRodriguez/Competitive_Programming | Contests/Codeforces/1359A.cpp | #include <bits/stdc++.h>
#define fin ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ii pair<int,int>
#define F first
#define S second
#define pb push_back
#define pf push_front
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fore(i,a,b) for(int i = a;i < b; i+= 1)
#de... | ALGO | 0.999851 | 3.678753 | {
"github_metadata": {
"branch": "master",
"commit_count": 1457,
"repo_created_at": "2020-07-31T19:59: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": "8ad1ae9... |
f8ce92fd-3161-4d46-a733-f7761bd7b19b | hexfellow/hex_free_edge | hex_free_edge/hex_free_edge.cc | /****************************************************************
* Copyright 2025 <NAME>. All rights reserved.
* Author : <NAME> <EMAIL>
* Date : 2025-03-15
****************************************************************/
#include "hex_free_edge/hex_free_edge.h"
#include <pcl/common/transforms.h>
#include <a... | ALGO | 0.99005 | 5.328621 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-03-21T12:54:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c3674a5e253ee... |
febd5df5-3089-44d9-8dc9-1c799cbbde74 | eestela42/ft_minecraft | srcs/classes/World/ChunkRLE.cpp | #include <classes/World/ChunkRLE.hpp>
#include <map>
#include <classes/World/PerlinNoise.hpp>
#include <iostream>
#include <cstring>
ChunkRLE::ChunkRLE(int posX, int posY, int posZ) : AChunk(posX, posY, posZ)
{
this->rubans = NULL;
}
ChunkRLE::~ChunkRLE()
{
delete this->rubans;
}
void ChunkRLE::deleter()
{
if (th... | ALGO | 0.963838 | 3.248317 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2024-05-16T10:06:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e2f4b6d133a... |
6632e3a7-35e3-452b-9383-623add113562 | InsightSoftwareConsortium/ITK | Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.o... | ALGO | 0.971078 | 7.473413 | {
"github_metadata": {
"branch": "main",
"commit_count": 57165,
"repo_created_at": "2010-07-27T15:48:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1517,
"forks": 701,
"issues": 268,
"pull_requests": 49
},
"file_meta": {
"content_id": "3... |
1ddcaee6-1887-4825-a34d-3893e19524f5 | jamesfang87/Silver | Flood Fill/Why Did the Cow Cross the Road 3/main.cpp | #include <fstream>
#include <utility>
#include <vector>
#include <set>
#include <map>
using namespace std;
// global vars
int n, k, r;
const int MAX_N = 101;
int farm[MAX_N][MAX_N];
map<pair<int, int>, set<pair<int, int>>> roads;
int dr[] = {0, 0, 1, -1};
int dc[] = {1, -1, 0, 0};
void floodfill(int row, int col, int... | ALGO | 0.999888 | 4.240741 | {
"github_metadata": {
"branch": "main",
"commit_count": 112,
"repo_created_at": "2023-10-29T04:25: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": "f0a60a0c66... |
0c2a3722-d04e-46d9-b76b-857957d4e291 | iwiwi/programming-contests | topcoder/srm567/TheSquareRootDilemma.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
#include <climits>
#include <numeric>
using namesp... | ALGO | 0.999915 | 4.551696 | {
"github_metadata": {
"branch": "master",
"commit_count": 286,
"repo_created_at": "2011-10-30T17:14:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa65c010... |
774cf09a-817d-4092-a30a-34dfa26cee1a | 1110AnRan/Leetcode | daily/1261.在受污染的二叉树中查找元素.cpp | /*
* @lc app=leetcode.cn id=1261 lang=cpp
*
* [1261] 在受污染的二叉树中查找元素
*/
// @lc code=start
/**
* 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(nu... | ALGO | 0.99934 | 6.27993 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-12-11T14:23: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": "69362d49a61... |
bf40db48-7aec-4738-92a5-7455b044bacf | Xilinx/Vitis_Libraries | codec/L2/demos/jxlEnc/third_partys/lib/jxl/dec_reconstruct.cc | // Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "lib/jxl/dec_reconstruct.h"
#include <atomic>
#include <utility>
#include "lib/jxl/filters.h"
#include "lib/jxl/image_ops.h"
#undef H... | ALGO | 0.971988 | 7.019253 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "c7ef64... |
a4123eb0-be06-4860-9375-b0b4f004e176 | php1301/ctdlgt | Ass6/Equal.cpp |
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
int binary(int A[], int N, int x, int search)
{
int low = 0, high = N;
int result = -1;
while (low <= high)
{
int mid = (low + high) / 2;
if (x == A[mid])
{
result... | ALGO | 0.999846 | 3.919694 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2020-04-01T05:55:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "559b32e2c... |
379c4a40-7cb1-485a-b621-15e35f375809 | TheArrick/competitive | rpc0806/cockoo.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> getDivisors(int n) {
vector<int> divisors;
for (int i = 0; i * i <= n; i++) {
if (n % i == 0) {
divisors.push_back(i);
if (i != n / i) {
divisors.push_back(n / i);
}
}
}
return divisors;
}
int main() {
ios::sync_wit... | ALGO | 0.999933 | 5.038518 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-02-21T22:17: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": "dffeafc0f3... |
d1f3cc82-db01-452c-9ddf-ab73f8336c91 | NoirNorie/STL_P | 2504.cpp | #include <iostream>
#include <stack>
#include <string>
using namespace std;
stack<char> st;
string s;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
cin >> s;
long long result = 0;
int temp = 1;
bool flag = false;
for (int i = 0; i < s.length(); i++)
{
if (s[i] == '(')
{
... | ALGO | 0.999918 | 4.410928 | {
"github_metadata": {
"branch": "main",
"commit_count": 305,
"repo_created_at": "2021-08-26T09:12: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": "d159d7d7cf... |
9f48c33a-f565-48f5-aa69-bd265a4a1d5c | szefany/acm-icpc | regionals/hangzhou-2012/B.cpp | #include <cstdio>
#include <cmath>
#include <cstring>
#include <vector>
#include <iostream>
const double PI = acos(-1);
const double EPS = 1E-8;
int sgn(double x) {
if (x < -EPS) {
return -1;
}
return x < EPS ? 0 : 1;
}
struct Point {
double x, y;
Point() {}
Point(double x, double y):... | ALGO | 0.999804 | 3.756692 | {
"github_metadata": {
"branch": "master",
"commit_count": 489,
"repo_created_at": "2013-01-17T12:49:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "56c2b87c... |
eb34a1ef-70b3-4f1e-b8c3-e9d96bd40ebc | ameybh/competitive-programming | codeforces/1249/B2.cpp | // Author: <NAME> - ameybhavsar24@(github & twitter)
// IDE: Geany on Ubuntu 20.04
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(auto i=a;i<b;i++)
#define repD(i,a,b) for(auto i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define ... | ALGO | 0.999823 | 4.830801 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2021-06-23T13:44:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ab75c8ff41d... |
8c2663e0-dee6-4244-85ca-0d85ab6fd860 | subscriblr/RQ-Generic-solver | template_rq.hpp | #ifndef __RQ_TEMPLATES
#define __RQ_TEMPLATES
#include "empty_solver.hpp"
#include "prefix_sum.hpp"
#include "fenwik.hpp"
#include "seg_tree_push.hpp"
#include "methods.hpp"
constexpr int best_solver(int mask, int i) {
if (i == SOLVER_N) return i;
if ((mask & eq_solver_mods[i]) == mask) return i;
return best_so... | ALGO | 0.980746 | 5.47905 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2022-05-10T15:22:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff4148c7994a... |
a0f60f94-756f-43ed-99b6-d03fcf29a604 | k1219ts/dcc | packages/ext/dxusd_katana/1.0.0/katana-3.6/source/DxUsdFeather/src/NurbsCurve.cpp | #include <OpenEXR/ImathVec.h>
#include <OpenEXR/ImathMatrix.h>
#include "NurbsCurve.h"
#include "Utils.h"
namespace DxUsdFeather
{
void NurbsCurve::Print(bool debug)
{
std::cout << SHAP << "\n# NurbsCurve (d = " << degree << ")";
std::cout << std::endl;
std::cout << DASH << "\n# - Knots" << std::endl;
... | ALGO | 0.978447 | 5.076136 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2024-04-03T01:51: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": "d6a987f3091... |
126a7729-4357-4bdb-b0dc-fe0c4184d906 | StefhBautista/Experiment-3 | E3_Problem_1.cpp | #include <iostream>
#include <conio.h>
#include <iomanip>
using namespace std;
int main ()
{
int arr[10], i, max, min;
float sum=0;
cout << "Enter 10 elements: ";
cout << endl;
for (i = 0; i < 10; i++)
{
cin >> arr[i];
}
for (i = 0; i < 10; i++)
{
sum = sum + arr[i];
}
max = arr[0... | ALGO | 0.954142 | 3.361898 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-05-21T14: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": "0483428cb3... |
080dbbaf-8777-4422-abfd-10762125d1b9 | secretflow/yacl | yacl/crypto/experimental/tpre/keys.h | // Copyright 2023 Chengfang Financial Technology Co., Ltd.
//
// 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 appl... | TOOL | 0.995271 | 5.61845 | {
"github_metadata": {
"branch": "main",
"commit_count": 415,
"repo_created_at": "2022-07-02T02:35:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 106,
"forks": 81,
"issues": 7,
"pull_requests": 11
},
"file_meta": {
"content_id": "1073b3f... |
53729d01-b32e-4b6a-a8fb-51f5b4213ceb | akippnn/school | src/app/act31.cpp | #include <iostream>
// another way to use "using" directive
using std::cout, std::cin, std::endl;
int main()
{
double* pt_numbers;
int pt_Sum, limit;
double pt_Ave;
cout << "How many numbers to enter?: ";
cin >> limit;
pt_numbers = new double[limit];
for (int i = 0; i < limit; i++) {
cout << "Ente... | ALGO | 0.934596 | 3.482384 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2023-10-01T13:57: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": "7086844179e... |
ecbfce93-0224-4cb0-bd80-81266c944d40 | BLCoder/Code-House | Data Structure/Segment Tree/Segment Tree Lazy Propagation(rangesumquery).cpp | #include<bits/stdc++.h>
using namespace std;
#define MAX 100003
#define LL long long
#define INF 10000000
struct solve{
LL int seg,lazy;
}tree[MAX*3];
void update(LL int lo,LL int hi,LL int qlo,LL int qhi,LL int pos,LL int value){
if(tree[pos].lazy!=0){
tree[pos].seg+=tree[pos].lazy*(hi-lo+1);
i... | ALGO | 0.999711 | 3.58066 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2016-08-07T19:55:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0390c571... |
3a7e2f8e-a2b2-450a-97d3-2b6d2283132b | ishandutta2007/codeforces-n | nfssdq/normal/327/D.cpp | /********************************************************************************\
|--\ --- /\ |-----------| ----- /-------| |
| \ | / \ | | / |
| \ | / \ | | | ... | ALGO | 0.999623 | 3.097548 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "bf3e7d1ee4ee... |
d3e72ac8-5a6c-4b6e-a2c8-c7bd92daf3f6 | DrSwad/CompetitiveProgrammingArchive | codeforces/1175/F.cpp | #include <bits/stdc++.h>
using namespace std;
#define debug(a) cerr << #a << ": " << a << endl
typedef long long ll;
typedef pair<ll, ll> ii;
const int N = 3e5 + 10;
struct item {
int l, r, val;
item() {}
item(int l, int r, int val) : l(l), r(r), val(val) {}
};
deque<item> dq;
int n;
int a[N];
int vis[N], cnt[... | ALGO | 0.999908 | 3.923164 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2020-12-22T03:50:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "53a53c2f... |
04192f84-fac1-4e92-9bf2-83cde1617876 | Chiki1601/Hackerearth-Solutions | Math/Number Theory/Basic Number Theory-1/The Dragon Type.cpp | #include <bits/stdc++.h>
using namespace std;
int cnt[5000010], inv[5000010];
int modpow(long long int a, long long int b, long long int mod)
{
long long int res = 1;
while(b > 0)
{
if(b & 1)
res = (res * a) % mod;
a = (a * a) % mod;
b /= 2;
}
return res % mod;
... | ALGO | 0.999975 | 4.192628 | {
"github_metadata": {
"branch": "main",
"commit_count": 1808,
"repo_created_at": "2022-09-09T09:13:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "c9547549... |
4b2c28d5-536f-4042-b379-ece05cf1a61a | kunyavskiy/competitive-programming-archive | codeforces.com/sponsored/abbyy/2013/round1/G.cpp | //#include <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <sstream>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <cstdlib>
#include <cstdi... | ALGO | 0.999882 | 3.628911 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2022-10-08T20:56:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5735281463d... |
9eef8557-125a-4799-8593-820c4cb414c0 | Zia6/Acm | onlineJudge/UVA/dp/1626.cpp | #include <iostream>
#include <cstring>
#include <string>
using namespace std;
const int maxn = 1e3 + 5;
string s;
int d[maxn][maxn];
bool match(char c1, char c2)
{
return (c1 == '(' && c2 == ')') || (c1 == '[' && c2 == ']');
}
// d[i][j] == d[i + 1][j - 1]
// d[i][j] = d[i][k] + d[k + 1][j]
void print(int l, int r)... | ALGO | 0.999536 | 4.85181 | {
"github_metadata": {
"branch": "main",
"commit_count": 94,
"repo_created_at": "2024-03-17T08:58: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": "03720d8622e... |
1f32ed43-2190-400a-b341-302e9e208351 | rdelicad/CPP | Module09/ex01/src/rpn.cpp | void rpn::calculaterpn()
{
std::stack<double> stack;
std::istringstream tokens(expression);
std::string token;
while (tokens >> token) {
// Verificar si el token es un número
std::istringstream iss(token);
double number;
if (iss >> number) {
stack.push(number);... | ALGO | 0.996973 | 5.423315 | {
"github_metadata": {
"branch": "main",
"commit_count": 124,
"repo_created_at": "2025-01-23T21:39: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": "8d2bb62de3... |
7851147a-b142-47d3-9e96-73fbe9f58713 | andyyang200/CP | Competitive Programming/Contests/ACM/2018/ECNA/j.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(index, start, end) for(int index = start; index < end; ++index)
#define RFOR(index, start, end) for(int index = start; index > end; --index)
#define FOREACH(itr, b) for(auto itr = b.begin(); itr != b.end(); ++itr)
#define RFOREACH(itr, b) qfor(auto itr = b.rbeg... | ALGO | 0.999948 | 4.075093 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-10-24T22:41: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": "bb97a16fce... |
5e9aa961-df3f-46d0-bea8-0bd812e736fe | Ixgauth/modified-ttk | ParaView-v5.6.0/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/PointLocatorUniformGrid.h | //============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... | ALGO | 0.927893 | 7.256457 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-09-12T00:31:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29ded903f7... |
7ddf34cc-0a79-45cd-a4fa-916ef2c1ea53 | lZiinl/algorithm | 백준/Bronze/2966. 찍기/찍기.cc | #include <iostream>
#include <string>
using namespace std;
char a[3] = { 'A', 'B', 'C' };
char b[4] = { 'B', 'A', 'B', 'C' };
char c[6] = { 'C', 'C', 'A', 'A', 'B', 'B' };
int arr[3];
string name[3] = { "Adrian", "Bruno", "Goran" };
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int N... | ALGO | 0.999981 | 3.524427 | {
"github_metadata": {
"branch": "main",
"commit_count": 287,
"repo_created_at": "2024-06-27T07:51: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": "da2ca9280b... |
acd2c5b6-59a8-49f0-98d8-10ad9d32ba36 | hpc203/Detic-onnxrun-cpp-py | main.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <numeric>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
//#include <cuda_provider_factory.h> ///nvidia-cuda加速
#include <onnxruntime_cxx_api.h>
using namespace cv;
using namespace std;
using namespace Ort;
typedef struct B... | TOOL | 0.9858 | 4.79057 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-07-28T14:48:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 7,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "5b339516c7d... |
2e34502c-a1ee-4a16-bd18-df775cbd674c | FilmKilns/FilmKilns | src/skia/src/gpu/tessellate/GrMiddleOutPolygonTriangulator.h | /*
* Copyright 2020 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrMiddleOutPolygonTriangulator_DEFINED
#define GrMiddleOutPolygonTriangulator_DEFINED
#include "include/core/SkPoint.h"
#include "include/private/SkTemplates.h"
#incl... | ALGO | 0.973929 | 7.198055 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-06-02T07:30:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 203,
"forks": 67,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "57e8221... |
ff1d89a4-8bdb-4577-8013-9ee2d136e2eb | mhmdshaker/Competitve-Programming | 1845C.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
int main(){
int t; cin>>t;
while (t--){
string s; cin>>s;
int n; cin>>n;
string l, r; cin>>l>>r;
map <int, map <char, int> > a;
//count the number of letters a... | ALGO | 0.999907 | 3.789678 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2022-12-31T10:38: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": "d83ad10334a... |
059c86ab-271e-4f11-b566-e5571489795d | Nillouise/Algorithm | Algorithm/luogu/math p3807.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
LL MOD = 20100403;
//快速幂
LL pow(LL x,LL p)
{
LL res = 1;
while(p)
{
if(p&1)res = (res*x)%MOD;
p>>=1;
x=(x*x)%MOD;
}
return res;
}
//逆元数组
LL inv[1000000];
LL pre[1000000];
//算组合数
LL Combine(int n,int m)
{
... | ALGO | 0.999942 | 4.157739 | {
"github_metadata": {
"branch": "master",
"commit_count": 324,
"repo_created_at": "2016-12-01T14:22: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": "2771fbd2... |
bc76c4e3-66ba-428e-9f39-f9c39ff12806 | dhruvpatelgeek/competitive-coding | blind75/Matrix/SetMatrixZeroes/setMatrixZeroes.cpp | /*
*
* author: dhruvpatelgeek(github)
*
* link:https://leetcode.com/submissions/detail/543085707/
*
* Runtime: 12 ms, faster than 85.61% of C++ online submissions for Set Matrix Zeroes.
* Memory Usage: 13.6 MB, less than 12.32% of C++ online submissions for Set Matrix Zeroes.
*
*/
class Solution {
public:
... | ALGO | 0.997533 | 6.122847 | {
"github_metadata": {
"branch": "master",
"commit_count": 116,
"repo_created_at": "2021-05-12T17:34:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ba98d3b... |
f90ef8c2-e328-4ab1-bd26-a60062fbc067 | daniell-waqar/Object-Oriented-Programming | Lab-work/TASK-11/q-1.cpp | #include <iostream>
using namespace std;
class Rectangle // Class Rectangle
{
float length; //private data members of the class
float width;
public:
Rectangle(); //Default constructor
void setlength(float); //function that set the length of the rectangle
void setwidth(float); //func... | TOOL | 0.938078 | 4.379168 | {
"github_metadata": {
"branch": "main",
"commit_count": 83,
"repo_created_at": "2021-09-08T14:14: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": "4c563a89305... |
ff09ffa9-b2c1-49d0-a4b7-c59ff4d53adc | sqmedeiros/rouxinol | 1158-Bookshop/control-30/8578083.cpp | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long int;
using ll = long long int;
int MOD = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// start!
int n, x;
cin >> n >> x;
int h[n];
for (int i = 0; i < n; i++) {
cin >> h[i];
... | ALGO | 0.99997 | 4.385974 | {
"github_metadata": {
"branch": "main",
"commit_count": 238,
"repo_created_at": "2024-01-31T15:39: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": "476227574f... |
76f498aa-9825-4b64-be52-b697c4b51038 | aqfaridi/Competitve-Programming-Codes | CODECHEF/SEPT14/RAIBOWB.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <sstream>
#include <vector>
#include <iomanip>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <climits>
#include <cassert>
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
#define pb ... | ALGO | 0.99999 | 3.604122 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-02-14T20:28: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": "02bdd8e6fa... |
8c502d4d-0b7a-40b7-b643-c090bf5b1bb4 | KJTang/Algorithm | leetcode/306/solution.h | // solution: 0ms, 40 cases
class Solution {
public:
bool isAdditiveNumber(string num) {
return RecursiveFunc(num, 0);
}
private:
std::vector<std::string> num_stk;
bool RecursiveFunc(const std::string& num, int cur) {
int last_len = num_stk.size() < 2 ? 1 : std::min(num_stk[num_stk.size(... | ALGO | 0.999873 | 6.455593 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2016-01-29T04:43: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": "e0e30848... |
c59cb995-5dde-4c82-8752-f9af2e8a8fa9 | sicamp/tutorial | 2017/solutions/l_security_as.cpp | #include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
const int MAX_MASK = 16;
const int MAXN = 1e5 + 10;
vector <vector <int> > g;
vector <vector <int> > col;
bool used[MAXN];
long long ans[MAX_MASK];
int dfs(int v, int mask) {
int sum = 1;
used[v] =... | ALGO | 0.999781 | 4.337991 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2016-05-30T20:36:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d8e2b05106... |
67656305-eee3-46d0-ad44-ea556baa89cd | myashok/spoj_solution | CSTREET18968167.cpp | #include <bits/stdc++.h>
using namespace std;
vector<tuple<int, int , int> > g; //cost src dest
int n, c;
// A structure to represent a subset for union-find
struct subset
{
int parent;
int rank;
};
// A utility function to find set of an element i
// (uses path compression technique)
int find(struct subset s... | ALGO | 0.999964 | 3.999883 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-06-07T10:05: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": "6883c1e78a... |
8bc15fa6-1f37-4131-bbe1-65e799dd16cb | MinQuan-kun/Training | Upcoder/Lý thuyết đồ thị/Ốc sên ăn rau/OCSE.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, y, x, ketQua;
int maTran[101][101];
int du[] = {-1, 1, 0, 0};
int dv[] = {0, 0, -1, 1};
void BFS(int startY, int startX) {
queue<pair<int, int>> q;
q.push({startY, startX});
maTran[startY][startX] = 1;
ketQua = 1;
while (!q.empty()) {
... | ALGO | 0.999979 | 4.143049 | {
"github_metadata": {
"branch": "main",
"commit_count": 472,
"repo_created_at": "2024-09-26T11:42:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b3d02a056... |
a8e65665-1d08-4670-b66e-a7386a27d196 | dnbaker/sketch | include/blaze/blaze/math/lapack/clapack/getri.h | //=================================================================================================
/*!
// \file blaze/math/lapack/clapack/getri.h
// \brief Header file for the CLAPACK getri wrapper functions
//
// Copyright (C) 2012-2020 <NAME> - All Rights Reserved
//
// This file is part of the Blaze library. Yo... | ALGO | 0.997029 | 6.445225 | {
"github_metadata": {
"branch": "main",
"commit_count": 1275,
"repo_created_at": "2016-11-21T19:41:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 155,
"forks": 14,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "e6cc31... |
289a5ac1-3340-46e6-9e2a-3e9e0cd3dd0c | batermj/data_sciences_campaign | ProgrammingLanguagesPortal/C-Plus-Plus/Algorihtms/combsort.cpp | //Kind of better version of Bubble sort.
//While Bubble sort is comparering adjacent value, Combsort is using gap larger than 1
//Best case: O(n)
//Worst case: O(n ^ 2)
#include <iostream>
using namespace std;
int a[100005];
int n;
int FindNextGap(int x) {
x = (x * 10) / 13;
return max(1, x);
}
void Comb... | ALGO | 0.999941 | 5.011138 | {
"github_metadata": {
"branch": "master",
"commit_count": 3151,
"repo_created_at": "2018-02-03T15:29:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 102,
"forks": 45,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "57a4... |
ef84b94e-dab7-4799-b7d5-cbfc81f6ed77 | lyandut/gezgin | SolverDispatcher.h | //
// Created by burak on 21.02.2019.
//
#ifndef TSP_SOLVER_SOLVERDISPATCHER_H
#define TSP_SOLVER_SOLVERDISPATCHER_H
#include <vector>
#include <map>
#include "Solvers/Greedy/GreedySolver.h"
#include "Solvers/NGreedy/NGreedySolver.h"
#include "Solvers/Croes/CroesSolver.h"
#include "Visualize/MatlabVisualizer.h"
#incl... | ALGO | 0.997745 | 4.691208 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-03-26T13:29: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": "d6da98ac0d... |
897f2205-bb2b-4626-adb1-b75be8255971 | Saini-Rishabh/DAA-4sem-Algos | BellmannFord.cpp | #include<bits/stdc++.h>
using namespace std;
struct node {
int u;
int v;
int wt;
node(int first, int second, int weight) {
u = first;
v = second;
wt = weight;
}
};
int main(){
int n,e;
cout<<"Please Enter the Number Of Nodes and Edges:";
cin>>n>>e;
vector<no... | ALGO | 0.999932 | 4.012652 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-01-02T17:52: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": "d442f19759d7... |
fff00d38-5866-4822-b178-0ac545af7bb3 | Eviltsundera/Homework | C++/HW1.cpp | #include <iostream>
#include <chrono>
#include <cstdlib>
#include <vector>
#include "numbers.dat"
#include <math.h>
using namespace std;
bool IsPrime(int a) {
if (a <= 1)
return 0;
int i = 2;
int r = (int) sqrt(a);
while (i <= r && a % i)
i++;
if (i <= r)
return 0;
retu... | ALGO | 0.999519 | 4.164719 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2019-11-17T13:26: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": "1edce6f47... |
506a03b5-324a-44c5-a74d-40c0fd749567 | Chinmay-024/CSES-solutions | Graph Algorithms/Download_Speed.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define vi vector<ll>
#define vvi vector<vi>
#define pii pair<ll, ll>
#define vii vector<pii>
#define ff first
#define ss second
const ll M = 2e6 + 20;
vector<ll> fact(M, 1);
const ll N = 1001;
cons... | ALGO | 0.999883 | 4.312816 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-09T03:10: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": "a8086e058452... |
6ce3220b-f237-4c79-b9c2-9a507d01ff9d | RentoYabuki06/atcoder | kyopro-tessoku-practice/A/a46_Heuristic1_greedy_re.cpp | #include <iostream>
#include <cmath>
using namespace std;
int N;
int X[159], Y[159];
bool place[159];
double ft_distance(int a, int b)
{
return sqrt((X[a] - X[b]) * (X[a] - X[b]) + (Y[a] - Y[b]) * (Y[a] - Y[b]));
}
int main()
{
cin >> N;
for (int i = 1; i <= N; i++) cin >> X[i] >> Y[i];
for (int i = 1; i <= N; ... | ALGO | 0.99999 | 3.742487 | {
"github_metadata": {
"branch": "main",
"commit_count": 192,
"repo_created_at": "2024-03-31T03:08: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": "b2b009b9b0... |
83a859f6-da7a-48dd-97b1-4f577eb45420 | fardinfaruqi/Learning-Cpp | Codeforces/S_Interval.cpp | #include <bits/stdc++.h>
using namespace std;
#define max(a, b) (a < b ? b : a)
#define min(a, b) ((a > b) ? b : a)
#define mod 1e9 + 7
#define FOR(a, c) for (int(a) = 0; (a) < (c); (a)++)
#define FORL(a, b, c) for (int(a) = (b); (a) <= (c); (a)++)
#define FORR(a, b, c) for (int(a) = (b); (a) >= (c); (a)--)
#define INF... | ALGO | 0.983546 | 3.799805 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2024-01-04T18:52: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": "20e8fd36db0... |
037c5e8b-5891-420a-afe2-21323ea75863 | rsmbyk/ngoding | oj/pandaoj/IDEAFUSE16D.cpp | #include <iostream>
#include <cstdio>
#include <set>
#define fori for (unsigned int i = 0; i < str.length (); i++)
#define forj for (unsigned int j = 0; j < str.length ()-i+1; j++)
#define MOD 1000000007
typedef long long int ll;
ll mod_exp (ll b, ll e, ll m) {
ll r = 1;
while (e > 0) {
if ((e&1) == ... | ALGO | 0.99999 | 4.622105 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-08-13T14:28: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": "6704f9a5fe... |
d3b04d13-0145-4280-95fa-582af67b8c20 | lantimilan/topcoder | CODEFORCE/prob552C.cpp | // prob552C.cpp
#include <iostream>
using namespace std;
int main() {
int w, m; cin >> w >> m;
int sub[105] = {0};
int len = 0;
for (len = 0; m > 0; ++len) {
sub[len] = m % w; m /= w;
}
int carry = 0;
for (int i = 0; i < len; ++i) {
int curr = carry + sub[i];
if (cur... | ALGO | 0.999952 | 3.806525 | {
"github_metadata": {
"branch": "master",
"commit_count": 493,
"repo_created_at": "2012-07-16T05:16: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": "c1e815c8... |
92f3c19a-13eb-4e8e-a1b0-d517bdba0397 | vesoft-inc/nebula | src/graph/executor/query/TopNExecutor.cpp | // Copyright (c) 2020 vesoft inc. All rights reserved.
//
// This source code is licensed under Apache 2.0 License.
#include "graph/executor/query/TopNExecutor.h"
#include "graph/planner/plan/Query.h"
namespace nebula {
namespace graph {
folly::Future<Status> TopNExecutor::execute() {
SCOPED_TIMER(&execTime_);
... | ALGO | 0.997154 | 7.269241 | {
"github_metadata": {
"branch": "master",
"commit_count": 3550,
"repo_created_at": "2018-08-28T14:25:09.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11493,
"forks": 1249,
"issues": 617,
"pull_requests": 33
},
"file_meta": {
"content_id":... |
9fd96aaa-5ebc-490f-8095-75f4ed56ee5d | faizanahmedraza/CplusPlus | quicksort.cpp | #include <iostream>
using namespace std;
void quick(int a[], int n, int begining, int end, int *locptr)
{
int left, right, temp, loc;
left = begining;
right = end;
*locptr = begining;
//Right to left iteration
while (a[*locptr] <= a[right] && *locptr != right)
{
right--;
}
if... | ALGO | 0.999992 | 4.608756 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2020-10-17T11:31: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": "78c306b98ec... |
b9e4eaeb-1eb5-4969-a601-4118351757b8 | OpenFOAM/OpenFOAM-dev | src/ODE/ODESolvers/RKCK45/RKCK45.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\... | ALGO | 0.999977 | 6.552158 | {
"github_metadata": {
"branch": "master",
"commit_count": 8589,
"repo_created_at": "2014-12-10T15:47:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1770,
"forks": 642,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "51... |
cef86fd7-4e1a-4cde-a7c8-ba5e1b2b1a94 | veedee2000/SDE_30_DAYS | Day10/Palindromic_Partition/3.cpp | class Solution {
vector<vector<int>>dp;
vector<vector<int>>palin;
void calPalin(int left, int right, string& s){
while(left >= 0 and right < s.size()){
palin[left][right] += (s[left] != s[right]) + (left < right - 1 ? palin[left + 1][right - 1] : 0);
left--, ri... | ALGO | 0.999994 | 5.978626 | {
"github_metadata": {
"branch": "master",
"commit_count": 170,
"repo_created_at": "2020-06-08T17:35:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "508c9fb7... |
c6510639-a47f-441a-a97b-44ed8d2d14b4 | vraman23/CompetitiveProgramming | CPHSet/SortingAndSearching/movieFestival.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
typedef vector<int> vi;
typedef vector<pi> vpi;
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define F0R(i, a) for(ll i = 0; i < a; i++)
const int MOD = 1e9+7; // 998244353;
const int MX = 2e5+5; //
const ll INF = 1e18;... | ALGO | 0.999971 | 4.235801 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2020-08-05T00:25:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b3839c79... |
ab07913b-72f9-42bb-87fd-4e1a1074f890 | daerduoCarey/usaco | section1.4/packrec.cpp | /*
ID: 5120309052
PROG: packrec
LANG: C++
*/
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int p[5][2]={0},mi[1000000]={0};;
int o(int x) {return (x+1)%2;}
int max1(int x,int y) {if(x<y) return y; return x;}
int min1(int x,int y) {if(x>y) return y; return x;}
int main()
{
freopen("pa... | ALGO | 0.999855 | 3.101453 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2013-07-27T07:09: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": "7c08c11b4... |
78755aaa-f87e-46ae-90c3-79bc403e32a6 | konjac/leetcode | maximum-product-subarray.cc | #include <iostream>
#include <algorithm>
using std::max;
using std::cout;
using std::endl;
class Solution {
public:
int maxProduct(int A[], int n) {
long long posMin = 1, negMax = 1, multiple = 1, ans = A[0];
for(int i = 0; i < n; ++i){
multiple *= A[i];
ans = max(ans, multip... | ALGO | 0.999902 | 4.805445 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2014-05-13T03:13:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2699775da... |
75f6cb86-10eb-4e07-a004-8c3c58861de6 | gautamaggarwaldev/Data-Structures-with-C- | WEEK 15/LINKED LIST 1/307NodePointer.cpp | # include <iostream>
using namespace std;
class Node {
public :
int val;
Node* next;
Node(int val) {
this->val = val;
this->next = NULL;
}
};
int main() {
Node* a = new Node(10);
Node* b = new Node(16);
Node* c = new Node(78);
Node* d = new Node(89);
a->next = b;
... | ALGO | 0.996301 | 4.212474 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-07-12T07: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": "f3857079c3c... |
29b154ca-306d-4a52-90c6-ad1cf9dd944a | NCAR/lrose-core | codebase/apps/radar/src/SimCpCompute/SimCpCompute.hh | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... | ALGO | 0.996357 | 6.661469 | {
"github_metadata": {
"branch": "master",
"commit_count": 7406,
"repo_created_at": "2016-02-09T23:36:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 99,
"forks": 51,
"issues": 16,
"pull_requests": 3
},
"file_meta": {
"content_id": "bcde8... |
b8ac5e48-1658-4005-9158-d33c2428e0f7 | skygupta07/DSA | 13_strings2/mostOccuringCharacter.cpp | #include <iostream>
using namespace std;
int main(){
string s;
int arr[100];
cout<<"enter the string: ";
getline (cin, s); // to take input a string ..
int k=0;
int n = s.length(); // to find length of string..
for (int i=0; i<n; i++){
int count = 0; // smart technique ... | ALGO | 0.999894 | 3.989841 | {
"github_metadata": {
"branch": "main",
"commit_count": 141,
"repo_created_at": "2024-12-22T10:16:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a29db812e... |
0ca4515e-a023-470c-9d47-62946ad766bd | Horizn16/CP_Codes | TLE Eliminators/800/A_Doremy_s_Paint_3.cpp | #include <bits/stdc++.h>
using namespace std;
using vi = vector<long long>;
void solve() {
int n, k;
cin>> n;
vi arr(n);
for (int i = 0; i < n; i++){
cin>> arr[i];
}
// See, here the a[1]=a[3]... and even same, and if the n is odd then the odds are more than 1, and even then all same, ... | ALGO | 0.999845 | 4.36365 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-05-20T06:22: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": "da0372b8e2d7... |
498a249d-c84c-4730-adfa-e9bafa29197b | tedison7/codility | L09_03.MaxDoubleSliceSum.cpp | // you can use includes, for example:
// #include <algorithm>
// you can write to stdout for debugging purposes, e.g.
// cout << "this is a debug message" << endl;
#include <cmath>
int solution(vector<int>& A) {
// write your code in C++14 (g++ 6.2.0)
int N = (int)A.size();
if (N == 3)
return 0;... | ALGO | 0.999944 | 5.475962 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-09-07T13:41: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": "e94cabc249d6... |
8a69480c-cb6a-4af6-8054-b8dd8e49773e | ErinMulkey/rsa-accumulator | accumulator.hpp | #ifndef RSA_ACCUMULATOR
#define RSA_ACCUMULATOR
#include <vector>
#include <unordered_map>
#include <cstdint>
class accumulator
{
public:
accumulator(const std::vector<std::uint64_t> &set);
auto get_key() const noexcept -> std::uint64_t;
auto get_initial_accumulator() const noexcept -> std::uint64_t;
... | ALGO | 0.998001 | 7.193654 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2024-07-17T05:50: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": "a585d92d72... |
11aada3e-7c00-4b70-929f-b79fd6890333 | picslITK/ITK4_topics | Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.hxx | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... | ALGO | 0.915176 | 7.097077 | {
"github_metadata": {
"branch": "RegRefCurrent",
"commit_count": 37865,
"repo_created_at": "2010-11-19T17:56:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id":... |
ab01f3e8-2754-4f88-afef-0f4576a0709b | dantlz/VERY_OLD_Academic_Projects | Undergraduate_SecondYear/CSCI104/HW8: Hash Table, Heap, & A*/minheap.h | #ifndef MINHEAP_H
#define MINHEAP_H
#include <vector>
#include <string>
#include "hashtable.h"
class MinHeap {
public:
MinHeap (int d);
/* Constructor that builds a d-ary Min Heap
This should work for any d >= 2,
but doesn't have to do anything for smaller d.*/
~MinHeap ();
void add (std:... | ALGO | 0.999177 | 5.502718 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2015-12-25T09:57: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": "70a6ab246... |
feddec9d-c66e-43d0-8d27-b4c880ad363a | harsh007-github/GeeksForGeeks | Number of Subarrays of 0's - GFG/number-of-subarrays-of-0s.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
long long int no_of_subarrays(int n, vector<int> &arr)
{
long long int len = 0, ans = 0;
for(int i = 0; i < arr.size(); i++)
{
if(arr[i] == 0)... | ALGO | 0.999665 | 6.596627 | {
"github_metadata": {
"branch": "main",
"commit_count": 185,
"repo_created_at": "2022-09-21T16:35:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "67a3a0bd8b... |
bd41f28a-f843-4cec-890e-4bbc331b13eb | ammubhave/6.823-lab | lab3handout/Murphi/include/mu_system.C | /* -*- C++ -*-
* mu_system.C
* @(#) procedure for anaylsing the system
* to be simulated or verified
*
* Copyright (C) 1992 - 1999 by the Board of Trustees of
* Leland Stanford Junior University.
*
* License to use, copy, modify, sell and/or distribute this software
* and its documentation ... | ALGO | 0.969861 | 4.410549 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2016-10-17T12:12:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "16b843b2... |
59105856-bc97-470c-abf0-25f43aba0a58 | xuanvuong1702/Practice-Cpp | leetcode-withAI/LargestRectangle.cpp | #include "LargestRectangle.hpp"
#include <stack>
using namespace LargestRectangleSolution;
// give you list int represent for height of each rectangle, width of rectangle is 1, return the largest rectangle area
int LargestRectangleSolution::Solution::largestRectangleArea(std::vector<int> &heights)
{
int maxArea =... | ALGO | 0.999931 | 6.004225 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2024-07-29T09:08:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "acdcabe51... |
9a7b078e-718a-41ea-83a0-0b769d00af73 | jerry060599/StableCosseratRods | KittenEngine/KittenEngine/opt/praxis.hpp | #include <functional>
#include "math.h"
double flin ( int n, int j, double l, std::function<double(double[], int)> f,
double x[], int &nf, double v[], double q0[], double q1[], double &qd0,
double &qd1, double &qa, double &qb, double &qc );
void minfit ( int n, double tol, double a[], double q[] );
void minny ( i... | ALGO | 0.998899 | 4.7412 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-03-21T21:44:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0876c5f7964... |
168bbc2c-62d4-477f-9309-6e3bfd25b095 | inglada/OTB | Utilities/ITK/Code/BasicFilters/itkHessian3DToVesselnessMeasureImageFilter.txx | /*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkHessian3DToVesselnessMeasureImageFilter.txx,v $
Language: C++
Date: $Date: 2008-10-16 16:45:10 $
Version: $Revision: 1.7 $
Copyright (c) Insigh... | ALGO | 0.963919 | 6.585218 | {
"github_metadata": {
"branch": "master",
"commit_count": 10982,
"repo_created_at": "2011-07-01T06:29:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "240733... |
ee431267-01a7-4956-a0df-5535bdf8c2fb | akagenorobin/topcoder | problems/638/NamingConvention.cpp | #include<cmath>
#include<cstdlib>
#include<string>
#include<sstream>
#include<vector>
#include<iostream>
#include<queue>
#include<deque>
#include<map>
#include<stack>
#include<list>
#include<algorithm>
using namespace std;
class NamingConvention{
public:
string toCamelCase(string variableName) {
for(string::iter... | ALGO | 0.988808 | 3.905243 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2015-05-17T13:52: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": "26465e1d4f... |
3c9deb5f-a004-49c9-adcd-4b5ef81eface | roryy19/hw2_1147 | part_b/part_b.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <random>
#include <cmath>
#include <numeric>
void run_morris_algorithm(int n, int k, const std::string& output_file) {
std::ofstream file(output_file);
if (!file.is_open()) {
std::cerr << "Error opening output file!" << std::endl;
... | ALGO | 0.999487 | 7.306846 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-09-18T22:56: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": "4c18156678f9... |
81d78e81-761d-4bc7-9de2-ce3efe622cc5 | wzx54321/AndroidLearnTips | java-leetcode/code/word-ladder-1.cpp | // Word Ladder
// 时间复杂度O(n),空间复杂度O(n)
struct state_t {
string word;
int level;
state_t() { word = ""; level = 0; }
state_t(const string& word, int level) {
this->word = word;
this->level = level;
}
bool operator==(const state_t &other) const {
return this->word == other... | ALGO | 0.999943 | 5.710897 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2018-05-31T01:56:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c9291c50... |
0a32d67f-f3e5-4cb4-b558-4ae75b2ecf66 | ishandutta2007/codeforces-b | box/normal/1187/F.cpp | // writer: w33z8kqrqk8zzzx33
#include <bits/stdc++.h>
using namespace std;
#define iter(i, a, b) for(int i=(a); i<(b); i++)
#define rep(i, a) iter(i, 0, a)
#define rep1(i, a) iter(i, 1, (a)+1)
#define all(a) a.begin(), a.end()
#define fi first
#define se second
#define pb push_back
#define mp make_pair
using ll=long... | ALGO | 0.999956 | 3.841898 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b5a34dbf785... |
fa278b42-7a3d-445b-b3db-be63d8fa561c | nvnamsss/leetcode | Long Pressed Name/main.cpp | /*
Your friend is typing his name into a keyboard. Sometimes, when typing a character c, the key might get long pressed, and the character will be typed 1 or more times.
You examine the typed characters of the keyboard. Return True if it is possible that it was your friends name, with some characters (possibly none) b... | ALGO | 0.999911 | 5.534328 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2020-04-21T13:05:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76f39b491... |
db782a84-4dbc-4003-bac0-3660d203d42a | test0z/Nginx4AdServer | src/adservice/adservice/service/protocol/sohu/sohu_bidding_handler.cpp | //
// Created by guoze.lin on 16/6/27.
//
#include "sohu_bidding_handler.h"
#include "core/core_ad_sizemap.h"
#include "core/core_ip_manager.h"
#include "logging.h"
#include "utility/utility.h"
namespace protocol {
namespace bidding {
using namespace protocol::sohuadx;
using namespace adservice::utility;
... | WEB | 0.901487 | 4.188372 | {
"github_metadata": {
"branch": "master",
"commit_count": 466,
"repo_created_at": "2017-10-24T07:52: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": "f76fca0e... |
45e8eab1-06e1-449e-8b6c-f55c56baa6a6 | Aaron1Zhang/Algorithm | media_level/mergeKsortedLists.cpp | #include <vector>
#include <iostream>
using namespace std;
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 {
public:
// ListNode* mergeKLists(v... | ALGO | 0.999918 | 5.840964 | {
"github_metadata": {
"branch": "main",
"commit_count": 123,
"repo_created_at": "2021-03-24T14:15: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": "f191645c19... |
79a8d97a-d0f6-4d93-81a9-a7d060f1800a | aloukikattrey/Data-Structure | Stack/stack.cpp | #include <iostream>
using namespace std;
class stack
{
int *arr;
int top;
int n;
public:
stack(int size)
{
n = size;
arr = new int[n]; // second way to create array in cpp is new int[n]
top = -1;
}
void push(int value)
{
if (top == n - 1)
{
... | ALGO | 0.992921 | 4.142148 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2024-10-07T05:46: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": "d068c62ef8... |
205c14bf-d277-4bb1-a243-dcc5066ef5b7 | SalmaMohammedHamedMustafa/Embedded-Linux-Tasks | 02cpp/02/task5.cpp | #include <iostream>
void findEvenAndOdd(int array[], int size, int evenArray[], int& evenCount, int oddArray[], int& oddCount) {
evenCount = 0;
oddCount = 0;
for (int i = 0; i < size; ++i) {
if (array[i] % 2 == 0) {
evenArray[evenCount++] = array[i];
} else {
oddArra... | ALGO | 0.999321 | 5.553041 | {
"github_metadata": {
"branch": "master",
"commit_count": 85,
"repo_created_at": "2024-06-22T14:33:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0552928e... |
871fa8f2-86a9-4fd0-8a8e-8882579dc3e5 | anuragpratap05/DSA | Binary tree/revision2/class6/450. Delete Node in a BST.cpp | #include <bits/stdc++.h>
using namespace std;
class TreeNode
{
public:
int val = 0;
TreeNode *left = nullptr;
TreeNode *right = nullptr;
TreeNode(int val)
{
this->val = val;
}
};
int getMinNode(TreeNode *node)
{
while (node->left)
node = node->left;
return node->val;
}
... | ALGO | 0.999977 | 4.479356 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-28T18:04: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": "ae28da045537... |
7a518b2a-de61-44cb-aa93-6fe6e92b231a | AlexGliesch/competitive-programming | leetcode/cpp/course-schedule-ii.cpp | #include "includes.h"
class Solution {
public:
bool dfs(int i, vector<vector<int>>& g, vector<bool>& vis, vector<bool>& ok,
vector<int>& v) {
if (ok[i]) return true;
for (int j : g[i]) {
if (vis[j]) return false;
vis[j] = true;
if (!dfs(j, g, vis, ok, v)) return false;
vis[... | ALGO | 0.999989 | 6.254736 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-05-01T04:18: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": "1a21b368af3... |
d70ac292-6a75-49eb-8d1d-18d221fb8a99 | nyuku/cpp | cpp09/ex02/PmergeMe.cpp |
// ╔──────────────────────────────────────────────¤◎¤──────────────────────────────────────────────╗
// ✩ mac : `jot -r 3000 1 1000 | tr '\n' ' '`
// ✩ linux: `shuf -i 1-1000 -n 3000 | tr '\n' ' '`
// ✩
// ✩
// ✩
// ╚──────────────────────────────────────────────¤◎¤──────────────... | ALGO | 0.998593 | 5.483422 | {
"github_metadata": {
"branch": "main",
"commit_count": 129,
"repo_created_at": "2024-04-17T23:09: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": "ab2e161ec9... |
f1ace845-7e3d-4cbb-8799-280e26111f1c | pedrotorreao/DSA | Problems/Leetcode/invertBinaryTree.cpp | /*********************************************************************************************/
/* Problem: 226. Invert Binary Tree ********/
/*********************************************************************************************/
/*
--Problem statement:
Given the root of a binary tree, invert the tree, and ... | ALGO | 0.999985 | 6.529201 | {
"github_metadata": {
"branch": "master",
"commit_count": 897,
"repo_created_at": "2020-03-30T09:37:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7327a66a... |
c3e57000-663c-4b84-8622-67ee64c679e6 | wxiExist/OOP-labs | 7lab/main.cpp | #include <iostream>
#include <map>
#include <random>
#include <chrono>
#include <thread>
#include <mutex>
#include <shared_mutex>
#include <cstdlib>
#include "src/NPCFactory.cpp"
class Game {
public:
Game() {
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> d... | TOOL | 0.977596 | 4.686788 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-12-13T23:51: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": "0dfc2830157d... |
5911a89b-d2f9-452d-8d9d-35d499c63360 | Richard-Zheng/Learning-Algorithms | vjudge/AC/478160C.cpp | #include <cstring>
#include <iostream>
using namespace std;
const int MAXNM = 30000 + 500 + 10;
int ufset[MAXNM];
int find(int x) {
return ufset[x] == x ? x : ufset[x] = find(ufset[x]);
}
void unite(int x, int y) {
ufset[find(x)] = find(y);
return;
}
int main() {
int n, m;
cin >> n >> m;
while (... | ALGO | 0.999529 | 3.637099 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2020-06-13T17:11: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": "55e7b40b... |
9f9da452-ae91-46cf-bc1d-41ea00460605 | starboy520/starboy | leetcode/ThreeSum.cpp | // Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0?
// Find all unique triplets in the array which gives the sum of zero.
// Note:
// Elements in a triplet (a,b,c) must be in non-descending order. (ie, a ≤ b ≤ c)
// The solution set must not contain duplicate triplets.
#include... | ALGO | 0.999896 | 5.647647 | {
"github_metadata": {
"branch": "master",
"commit_count": 189,
"repo_created_at": "2010-03-09T16:04:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd1d9960... |
98fc7e5e-ccba-47ba-9968-aef6582c37b9 | rwadnd/DSA2Assignment | src/Problem 05.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// Structure to represent a pair of numbers
struct Pair {
int first;
int second;
};
// Comparator function to sort pairs based on their first number
bool comparator(Pair p1, Pair p2) {
return p1.first < p2.first;
}
int maxCh... | ALGO | 0.999979 | 5.46454 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-05-11T07:54: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": "0a7bec44152... |
818cdf0e-fcde-4a5d-9c5e-6a2dc52b48da | curry0622/Leetcode-Practice | Medium/79. Word Search/sol1.cpp | class Solution {
public:
vector<vector<char>> brd;
string wrd;
int m, n;
bool exist(vector<vector<char>>& board, string word) {
brd = board;
wrd = word;
m = board.size();
n = board[0].size();
if(m * n < wrd.length()) {
return false;
}
... | ALGO | 0.999963 | 5.870431 | {
"github_metadata": {
"branch": "master",
"commit_count": 517,
"repo_created_at": "2022-04-17T13:03: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": "19963fc0... |
f6a01ac1-bd2e-4600-bdfa-2793bf487206 | openvinotoolkit/openvino | src/core/reference/include/openvino/reference/prior_box.hpp | // Copyright (C) 2018-2025 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <cmath>
#include "openvino/core/except.hpp"
#include "openvino/op/prior_box.hpp"
#include "openvino/reference/utils/coordinate_transform.hpp"
namespace ov {
namespace reference {
static inline float clip_gre... | ALGO | 0.997994 | 6.695399 | {
"github_metadata": {
"branch": "master",
"commit_count": 19551,
"repo_created_at": "2018-10-15T10:54:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8597,
"forks": 2656,
"issues": 303,
"pull_requests": 258
},
"file_meta": {
"content_id"... |
5a08d659-eb19-478d-97be-478c726ec592 | kaiqi0110/slam-code-snippet | Homography/virtual-billboard.cpp | /*************************************************
Copyright:bupt
Author:kaiqi
email:<EMAIL>
Date:2020-10-22
Description:实现倾斜角度重投影到正视平面效果
题目来源: 计算机视觉life
**************************************************/
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
struct userdat... | ALGO | 0.999024 | 4.647143 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2020-10-22T02:55:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50964d477c7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.