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 |
|---|---|---|---|---|---|---|---|
b5e32b8c-9cc0-438e-b02c-a1921af661be | Butterflyfreely/vs_code | BM11.cpp | #include <iostream>
#include <vector>
using namespace std;
struct ListNode {
int val;
ListNode* next;
ListNode(int val):val(val), next(nullptr){}
};
//核心算法
class Solution {
public:
ListNode* deleteDuplicates(ListNode* head) {
// write code here
if(head==NULL)return head;
... | ALGO | 0.999987 | 4.80772 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-05-25T08:38: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": "b5ca04a1f9... |
d3d686b7-2a38-48de-8777-46ae39509c7f | aplqo/exercises | poj/3070-Fibonacci.cpp | #ifdef APTEST
#include "debug_tools/program.h"
#endif
#include <iostream>
#include <vector>
using namespace std;
typedef unsigned int num;
const num mod = 1e4;
class Number {
public:
Number() : val(0) {}
Number(num i) : val(i % mod) {}
#define decl(x) \
inline ... | ALGO | 0.999949 | 4.493699 | {
"github_metadata": {
"branch": "master",
"commit_count": 654,
"repo_created_at": "2019-10-26T11:25: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": "0bc41ca0... |
46a48826-2f5e-423b-a1eb-37e87c450f89 | 031wnstjd/BOJ | 백준/Silver/4659. 비밀번호 발음하기/비밀번호 발음하기.cc | #include <bits/stdc++.h>
using namespace std;
int c_cnt, v_cnt, aeiou;
string s;
bool is_vowel(char& c) {
return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
while(true) {
cin >> s;
if(s == "end") break;
aeio... | ALGO | 0.989917 | 4.387333 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2023-01-21T14:16:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b34dbd4c559... |
318c55db-7dda-4acb-aec8-cfca30a34a4b | ahfhafh/754CSPC | Ass 3/examples/sumFactors.cpp | /// reads in a positive integers in range (2 .. 2^63-1) from standard input
/// for each number on input:
/// if the number is prime, it is ignored
/// determines the smallest factor of the composite number
/// prints out the sum of all smallest factors
///
/// if no composite numbers are found, prints out "0"
///
... | ALGO | 0.999658 | 4.934852 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-08-02T23:18: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": "e1274a3c002a... |
d3c7b46c-2eb7-456c-b5fb-68d4b24e937a | wrxlipp/lab5.0 | lab5.1.cpp | #include <iostream>
#include <cmath> // для використання математичних функцій
using namespace std;
// Прототип функції g
double g(double x, double y);
int main() {
double r, s;
cout << " r: ";
cin >> r;
cout << " s: ";
cin >> s;
// Обчислення виразу
double numerator = g(1, r) + g(pow(s, 2... | ALGO | 0.984566 | 4.949806 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-10-01T14:50: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": "b369a5b09a... |
47783d30-d091-4444-9bab-aba6c130c3d6 | yisea123/OSC-1 | sources/Device/src/Utils/Math.h | #pragma once
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define PI 3.141592653589793f
#define LIMIT_BELOW(x, min) if((x) < (min)) { x = (min); }... | TOOL | 0.987517 | 4.950722 | {
"github_metadata": {
"branch": "master",
"commit_count": 724,
"repo_created_at": "2019-09-19T10:12:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0999538... |
7fdd4a4c-bc8b-4bb7-9909-bff973397b9b | jonathan9-9/cpp | week9Class/payroll.cpp | #include <iostream>
using namespace std;
class PayRoll {
private:
double hourlyPayRate;
double numHoursWorked;
double totalWeeklyPay;
public:
PayRoll(double payRate, double numHours) {
hourlyPayRate = payRate;
setNumHoursWorked(numHours);
}
void setNumHoursWorked(double numHours) {
if (numHou... | TOOL | 0.901452 | 4.898427 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2024-10-19T06:23: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": "2d689a39669... |
f8ba9077-f5fc-4d55-93c6-4347d36ff34a | morris821028/UVa | OnlineJudge/ZEROJUDGE/d105. NOIP 2008 3.cpp | #include <stdio.h>
#include <string.h>
typedef struct {
int v[30][30];
} matrix;
matrix In;
matrix multiply(matrix a, matrix b, int n) {
static matrix c;
static int i, j, k;
memset(&c, 0, sizeof(matrix));
for(i = 0; i < n; i++)
for(j = 0; j < n; j++)
for(k = 0; k < n; k++)
... | ALGO | 0.999998 | 3.406032 | {
"github_metadata": {
"branch": "master",
"commit_count": 1197,
"repo_created_at": "2013-06-14T12:34:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 571,
"forks": 269,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "622... |
1bc54d38-049f-4a87-88b8-9f8a96904014 | aloehr/adventofcode | aoc2024/solutions/day06.cpp | #include <array>
#include <iostream>
#include <string>
#include <unordered_set>
#include <utility>
#include <cstring>
#include <aoch/AOCSolutionTypes.hpp>
inline bool is_inbound(const std::pair<int, int> p, int max_x, int max_y) {
return p.first >= 0 && p.first <= max_x && p.second >= 0 && p.second <= max_y;
}
... | ALGO | 0.999679 | 5.405084 | {
"github_metadata": {
"branch": "master",
"commit_count": 189,
"repo_created_at": "2021-01-06T06:44: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": "4569048c... |
7c0b3e3b-59d7-4898-ace9-b853bac7a536 | braziliancheater/exemplos | URI/1079.cpp | #include <iostream>
#include <iomanip>
// Weighted Averages
// made by brazilian
float a,b,c,n;
int main()
{
// asks for a value to loop
std::cin >> n;
for(int i = 1; i <= n ; i++) // start of our loop
{
std::cin >> a;
std::cin >> b; // asks for the values
std::cin >> c;
... | ALGO | 0.999003 | 3.932072 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2023-06-14T11:16: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": "634ea07520... |
c6062d57-c796-4dd3-a742-e6fae90683e6 | Khushal41/DSASupreme-1.0- | Week1-BasicsOfPrograming-1/Week1-HW/Q4.cpp | // Hollow Inverted full Pyramid
#include <iostream>
using namespace std;
int main()
{
int n;
cout << "Enter value to print Hollow Inverted full Pyramid : " << endl;
cin >> n;
for (int i = 0; i < n; i++)
{
int k = 0;
for (int j = 0; j < ((2 * n) - 1); j++)
{
if (... | ALGO | 0.999536 | 4.055321 | {
"github_metadata": {
"branch": "main",
"commit_count": 132,
"repo_created_at": "2023-09-12T17:52:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef59875c6e... |
544f5e5f-9a94-4fff-a5ab-501aa530320f | AU-DIS/FAMAB | algorithms/Exp3Bandit/Exp3Light.cpp |
#include "Exp3Light.h"
#include <algorithm>
#include <random>
#include <iostream>
Exp3Light::Exp3Light(int k, double eta)
: _k(k), _eta(eta)
{
_cnt = 0;
_probabilities = std::vector<double>(k, 0.0);
_weights = std::vector<double>(k, 1.0);
_max = 1;
};
int Exp3Light::sample()
{
std::disc... | ALGO | 0.997831 | 4.611705 | {
"github_metadata": {
"branch": "main",
"commit_count": 207,
"repo_created_at": "2023-05-01T17:44:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4fce97a341... |
9f3ffc74-407e-4705-ab9f-92602587f25a | Frog-Slayer/Algorithm | 백준/Platinum/16136. 준하의 정수론 과제 (Divmaster)/준하의 정수론 과제 (Divmaster).cc | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int MAX_A = 1000000;
const int MAX_N = 100000;
int N, Q;
int divisor_cnt[MAX_A + 1];
vector<int> A;
struct Segtree {
vector<pair<ll, bool>> tree;
Segtree() {
tree.resize(4 * MAX_N + 4);
}
void update(int node, int start, in... | ALGO | 0.999688 | 4.777946 | {
"github_metadata": {
"branch": "main",
"commit_count": 521,
"repo_created_at": "2023-09-23T15:54: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": "a2259bc827... |
cab82c15-cf43-467f-80d0-e9c09672b860 | ishandutta2007/codeforces-d | dpair/normal/780/E.cpp | /*
author: DPair
language: C++11
description:
ko no Dio da!
*/
#include <cstdio>
namespace IO{
#define getcha() (SS == TT && (TT = (SS = BB) + fread(BB, 1, 1 << 23, stdin), SS == TT) ? EOF : *SS++)
char BB[1 << 23], *SS = BB, *TT = BB;
template <typename T>
inline void read(T &x){
... | ALGO | 0.999948 | 3.856937 | {
"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": "7abc6ca5d73e... |
e9f631a0-c770-4975-b853-2cbf2fbb87c9 | AkshayGade23/LaptopCodes | Data Structure/Binary_search/binary_search.cpp | #include <iostream>
#include <stdlib.h>
using namespace std;
int binary_searchRRR(int *arr, int low, int high, int key)
{
if (low < high)
{
int mid = (high + low) / 2;
if (arr[mid] == key)
return mid;
else if (arr[mid] > key)
return binary_searchRRR(arr, low, mi... | ALGO | 0.999939 | 4.476577 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-06-04T13:41: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": "aa3d4ff564... |
43f6a0d6-7260-4217-9b89-f4f2ca45ecd4 | TheoreticalTree/Engineering-Worst-Case-Data-Structures-for-Dynamic-Connectivity | include/Kaibel.hpp | #ifndef GKKT_KAIBEL_HPP
#define GKKT_KAIBEL_HPP
#include "DynConnectivityAlgorithm.hpp"
#include "Graph.hpp"
#include "base.hpp"
#include "LinkCutTrees.hpp"
#include "CutSet.hpp"
#include "QueryForest.hpp"
#include "QueryForestAVL.hpp"
#include "AVLTree.hpp"
class Kaibel : public DynConnectivity {
public:
/**
... | ALGO | 0.998565 | 6.647496 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-07-17T15:27:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e5dd4f0c851... |
08be8f5b-aa07-4c54-a8f7-1dddad28618a | Shafayet99/SuperBat69 | EP 4.cpp | #include <iostream>
using namespace std;
int main()
{
//Write a program that will take 10 numbers from the user and compute the average value.
float term;
cout<<"Please enter number of terms: ";
cin>>term;
cout<<endl;
float sum = 0;
for (float iter = 1; iter <= term; iter=iter+1)... | TOOL | 0.908421 | 3.102756 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-03-26T15:18: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": "340b271c3e... |
2c3ee7a6-9b9b-4165-ba44-f8d482ca9ade | tkburis/cp-practice | cses/01_introductory_problems/17_chessboard_and_queens.cpp | // https://cses.fi/problemset/task/1624
#include <bits/stdc++.h>
using namespace std;
int cnt = 0, n = 8;
vector<bool> columns(n, false), diag1(n*2, false), diag2(n*2, false);
vector<vector<char>> grid(n, vector<char>(n));
void queens(int curr_row) {
if (curr_row == n) {
cnt++;
return;
}
... | ALGO | 0.999592 | 4.889135 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2021-11-10T12:37: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": "6514337dadb... |
491a8aa6-9add-4210-a27c-2a241e867aa5 | todorokishotoua15/CP-Library | labtest2.cpp | #include<bits/stdc++.h>
#define rep(i,a,b) for(int i = a; i < b; i ++)
#define ill long long int
#define ll long long
#define nl "\n"
#define el endl
#define pb push_back
using namespace std;
const int N = 3e5 + 2;
const ll neg_inf = -2e7 + 2;
const ll inf = 1e18 + 1;
const int mod = 1e9 + 7;
const int MOD = 1e9 + 7... | ALGO | 0.999967 | 3.66288 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-03-08T08:40: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": "794c7c1f4fd3... |
cfa9b44b-fd4e-4500-8ba4-5e7862442462 | fenton-xue/Data_Structure | Design/Code/MazeDesign1/MazeDesign1-4/MazeDesign1-4.cpp | //递归实现
#include <stdio.h>
#include <stdlib.h>
#define M 10
#define N 10
#define MaxSize 100
typedef struct
{
int i; //方块的行号
int j; //方块的列号
}Box; //方块的类型
typedef struct
{
Box data[MaxSize]; //存放一条路径上的所有方块
int length; //路径的长度
}PathType; //路径的类型
int mg[M+2][N+2... | ALGO | 0.999968 | 3.636681 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-12-06T14:59: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": "176d3d009a88... |
5fb8e62b-5641-49db-9138-ebd96562fe9b | gabkidner/CS_1410Programs | Labs/Binary/BinaryNumber.cpp | #include "BinaryNumber.h"
#include <iostream>
#include <ostream>
#include <iomanip>
#include<math.h>
using std::string;
using std::ostream;
BinaryNumber::BinaryNumber(string num){
int number;
decimalValue = 0;
for(int i = 0; i < num.length(); i++){
int blank = num.length()-i-1;
if(num[blank] == '1'){
... | ALGO | 0.955531 | 4.061396 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-01-26T16:19: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": "abd1526e55ce... |
c7189393-5b41-4e93-8ff5-cbb86f7ad069 | ydt-yash-1738/dsa | heaps.cpp | #include<bits/stdc++.h>
using namespace std;
class heap{
public:
int arr[100];
int size = 0;
heap(){
arr[0] = -1;
size = 0;
}
//TC: O(log n)
void insert(int val){
size = size + 1;
int index = size;
arr[index] = val;
while (index > 1){
... | ALGO | 0.999629 | 3.918353 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-02-01T15:35: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": "3d721efc8d7... |
0eeb865b-4c54-44cf-89ec-b64b1acbe1b2 | mohsystem/llm-generated-code-c-cpp | tests/codestral/Task144/Task144_test.cpp | #include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <cassert>
#include <algorithm>
using namespace std;
vector<int> parseArray(const string& input) {
istringstream iss(input);
vector<int> arr;
int x;
while (iss >> x) {
arr.push_back(x);
}
return arr;
}
... | ALGO | 0.999773 | 6.574678 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2024-07-20T12:16:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d705eac79... |
29716f70-e3f6-4d47-b89a-54fc49efa35d | 18-RAJAT/ONLINE-JUDGE | Balance_Difficulties.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
struct balanceBinarySearch
{
vector<int>bs;
int n,x;
balanceBinarySearch(int n,int x,vector<int>&bs):n(n),x(x),bs(bs){}
pair<int,vector<int>>balance()
{
if(n==1){return {0,bs};}
int left=0,right=2000000005,ans=right;
... | ALGO | 0.999959 | 4.640344 | {
"github_metadata": {
"branch": "main",
"commit_count": 3164,
"repo_created_at": "2022-05-09T08:19:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6bb66f178... |
f34739be-27fe-432f-bdce-4716c4a764a6 | Lafako/projetos | Algoritmos/L1/Exercicio6.cpp | #include <iostream>
using namespace std;
main()
{
float a, b, c;
char opcao;
do {
cout<<"Digite um número a: ";
cin>>a;
cout<<"Digite um número b: ";
cin>>b;
cout<<"Digite um número c: ";
cin>>c;
cout<<"\na = "<<a;
cout<<"\nb = "... | ALGO | 0.993546 | 3.073539 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2023-07-21T16:16: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": "d4f947bf4... |
faf2fd0c-327b-47e8-8dd7-498cdf7cf6bd | bqmnhat/CompetitiveProgramming | Codeforces/SegmentTreeTraining/SegmentWithTheMaximumSum/main.cpp | #include <iostream>
#include <bits/stdc++.h>
#define MaxN 100000
using namespace std;
typedef long long ll;
int n, m;
ll a[MaxN+1];
struct StNode {
ll sum, pre, suf, ans;
};
StNode st[4*MaxN+1];
void ReadData() {
for (int i=1; i<=n; i++)
cin >> a[i];
}
StNode Combine(StNode left, StNode right) {
S... | ALGO | 0.999864 | 3.641848 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-10-28T06:45:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9c2c5940d49... |
abe9d3cf-78bc-4488-b4ef-bbbac3e70c57 | ConnectNitish/CompetitiveProgramming | CodeFiles/Array_Others/testing-temp/main.cpp | /******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debu... | ALGO | 0.999948 | 4.299368 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2019-09-05T05:34:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f972e0be... |
3414fb96-cd8f-4682-bf30-1d6bc0008d97 | XiYuXu/Cpp-EasyAlgorithm | 循环赛程安排.cpp | #include <iostream>
using namespace std;
int a[8][8];
void Arrange(int length){
//递归结束条件
if(length==8){
return;
}
//先填充右边,右边的矩阵内的值大一个边长
for (int i = 0; i < length;i++){
for (int j = length; j < 2*length;j++){
a[i][j] = a[i][j-length]+length;
}
}
//再填充下面,... | ALGO | 0.999249 | 3.03611 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-04-14T15:05: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": "9bd6421928... |
d2cbb63e-4bd1-4961-8e0d-b265045ff7f2 | ishandutta2007/codeforces-e | erray/normal/1553/G.cpp | // author: erray
#include <bits/stdc++.h>
using namespace std;
template<typename A, typename B> string to_string(const pair<A, B>& p);
template<typename A, typename B, typename C> string to_string(const tuple<A, B, C>& t);
template<typename A, typename B, typename C, typename D> string to_string(const tuple<A, B, C, ... | ALGO | 0.999812 | 4.128098 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34: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": "f68c7666d721... |
0683dba0-d308-47c4-97fa-5013dca49f2a | babayaga-13/Competitive-Programming | CODEFORCES/div.3/C_Tiles_Comeback.cpp | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define ln cout << endl
#define all(v) v.begin(), v.end()
#define count_one(x) __builtin_popcount(x)
#define trailing_zero(x) __builtin_ctz(x)
#define leading_zero(x) __builtin_clz(x)
#defin... | ALGO | 0.999924 | 4.715224 | {
"github_metadata": {
"branch": "main",
"commit_count": 207,
"repo_created_at": "2024-09-13T09:17:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4151e14e2... |
a9041851-6eba-4eb5-bbf3-21757a190d15 | pavel-ryzhov/global_vars | runs/007575.cpp | // Problem C of Yandex lab entrance test
//
// (c) <NAME>, 2011.
//----------------------------------------------------------------------------
// Solution:
//
// this is not an actual T9 algorithm
// but simplified one to solve exact problem specified (problem C)
// actual T9 algorith do the job for every key pressed... | ALGO | 0.9999 | 4.186263 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-07-04T20:43: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": "0fc46e3f026d... |
68a165d5-264e-4acf-aaac-b2ca52267617 | danielhauagge/CUDABOF | OpticalFlow.hpp | // Copyright (c) 2008 <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, di... | ALGO | 0.957084 | 6.38312 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2014-03-26T20:29:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "47d67bda9c... |
bd360db9-c285-4f6a-ad16-01089ecf1c3f | ahampriyanshu/algo-ds-101 | STL/Map/MultiMap/multimap.cpp | #include <iostream>
#include <map>
#include <iterator>
using namespace std;
int main()
{
multimap <int, int> gquiz1; // empty multimap container
// insert elements in random order
gquiz1.insert(pair <int, int> (1, 40));
gquiz1.insert(pair <int, int> (2, 30));
gquiz1.insert(... | ALGO | 0.98069 | 4.257092 | {
"github_metadata": {
"branch": "main",
"commit_count": 3367,
"repo_created_at": "2020-07-10T11:12:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 159,
"forks": 739,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef73b... |
14b131bf-ff76-454b-9cd3-e95062f6f24f | TayyabAnees/Process-of-request-reception-and-servicing | code.cpp | #include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include <chrono>
#include <thread>
#include <cstdlib>
using namespace std;
class Receiver {
vector<queue<int>>sqn;
void print(queue<int>u)
{
while (!u.empty())
{
cout << u.front() << " ";
u.pop();
}
cout<<endl;
}
public:
void addReq... | ALGO | 0.993862 | 4.001325 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-12-07T11:27: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": "fe4cc4c8df44... |
d939b8f0-9d21-4812-85ad-554b90513445 | really-no-name/PersonalLeetCode | Code/1/3/1365/1365.cpp | /******************************************************************************
* 文件名: 1365
* 作者: <NAME>
* 创建日期: 2025
* 版本: 1.0
* 描述: 有多少小于当前数字的数字。
* 时间复杂度: O(NLogN)
* 空间复杂度: O(N)
* 执行用时: 23 ms
* 消耗内存: 13.89 mb
******************************************************************************/
#include <iostream... | ALGO | 0.999992 | 5.946414 | {
"github_metadata": {
"branch": "main",
"commit_count": 672,
"repo_created_at": "2025-01-25T14:02:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 26,
"forks": 3,
"issues": 17,
"pull_requests": 0
},
"file_meta": {
"content_id": "d186e7f2... |
84318d1b-2b5a-40d4-a0c6-5caa236c1ada | K-Nikhitha/Lab-MIT-Manipal-CCE | DAA/Lab1/Lab1_Q1.cpp | #include <iostream>
using namespace std;
int countR = 0;
int countI = 0;
int BSearchIt(int arr[], int beg, int last, int ele)
{
while (beg<=last)
{
countI++;
int mid = beg + (last-beg) / 2;
countI++;
countI++;
if (arr[mid] == ele)
{
countI++;
... | ALGO | 0.999852 | 4.931701 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2022-10-30T11:50:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ba5651c6c6... |
db280a61-05a5-4e5c-a02f-4591ed07b320 | LauraPivoto/codigos-microcontroladores | Exercicio1_ Relatorio1/Exercicio1_ Relatorio1.ino | //Declaração de bibliotecas
//Declaração de constantes
//Declaração de variáveis globais
//Declaração de funções
int main(){
//Direcionamento das Portas (DDRx) - Modificar só os pinos de saída
DDRB = 0b00000001; //PB0 como saída (Bomba)
DDRC = 0; //Todos os pinos do portal são entradas
DDRD = 0; //Todos os... | TOOL | 0.923664 | 4.227583 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-07-11T11:54:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b25bf19128a9... |
1d0dd91f-2be3-4049-ba2d-43bd9d91d4fc | ishandutta2007/codeforces-e | emiso/normal/1375/B.cpp | #include <bits/stdc++.h>
#define MN 1001000
using namespace std;
typedef long long ll;
ll n, t, m, lixo;
int main() {
scanf("%lld", &t);
st:
scanf("%lld %lld", &n, &m);
int can = 1;
for(int i = 0; i < n; i++) {
for(int j = 0; j < m; j++) {
scanf("%lld", &lixo);
... | ALGO | 0.999578 | 3.475699 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34: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": "1ec3a908ccfe... |
9de0bc5c-ddc0-4681-bdab-dbcaa7dec728 | yvensiveis/cses | 08-string-algorithms/02-string-matching/lucca-z.cpp | #include <bits/stdc++.h>
#define pb push_back
#define all(x) x.begin(), x.end()
#define pc __builtin_popcount
using namespace std;
typedef long long int ll;
const int MAXN = 1e5 + 10, INF = 2e9, M = 1e9 + 7;
vector<int> z_func(string s) {
int n = s.size(), l = 0, r = 0;
vector<int> res(n);
for (int i = 1; i < n;... | ALGO | 0.999901 | 3.975687 | {
"github_metadata": {
"branch": "main",
"commit_count": 161,
"repo_created_at": "2022-09-26T17:56:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6168815bf3... |
bee2a6c5-ece7-48a1-aefa-6bdea2c25305 | Michelix28MK/cpp | projects/Risoluzione_polinomi_metodo_naturale.cpp | //Metodo_Naturale
#include <iostream>
#include <cmath>
using namespace std;
void Carica_Coefficienti(int vettore[], int dim){
cout<<"Inserisci i coefficienti da a0...an"<<endl;
for(int i=0; i<=dim; i++){
cout<<"inserisci il coefficente di "<<i <<" grado: ";
cin>>vettore[i];
}
}
int Grado_Poli... | ALGO | 0.999341 | 3.952794 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2022-11-29T21:59: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": "a0f746270... |
ab1e1e5a-0f21-4605-b128-534a3d081b0b | whaliendev/mergebot | include/mergebot/core/semantic/SourceCollectorV2.h | //
// Created by whalien on 05/05/23.
//
#ifndef MB_SOURCECOLLECTORV2_H
#define MB_SOURCECOLLECTORV2_H
#include "mergebot/core/handler/SAHandler.h"
#include "mergebot/core/model/SimplifiedDiffDelta.h"
#include "mergebot/core/model/enum/Side.h"
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/Fron... | TOOL | 0.913167 | 6.718963 | {
"github_metadata": {
"branch": "main",
"commit_count": 562,
"repo_created_at": "2025-04-08T17:47: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": "55af09b15b... |
3313ee5a-797c-442c-be5c-3e2dca24a5f6 | amsen20/DS99Fall | calculator/validator/validator.cpp | #include<bits/stdc++.h>
#include "testlib.h"
using namespace std;
typedef pair<int, int> ii;
const int N = 3e5;
bool is_dig(char c){
return (c <= '9' && c >= '0');
}
bool is_paran(char c){
return (c == '(' || c == ')');
}
bool is_op(char c){
return (c == '*' || c == '+' || c == '-');
}
bool is_val(cha... | ALGO | 0.99975 | 3.553078 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-02-06T13:19:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "769c5ca1a0a... |
4f6361e9-9cc2-425d-9f2e-4b9fa8f97fa3 | HarshvardhanP01/CE-SPPU-ADS-SEM-4 | 3rdcode.cpp | #include <iostream>
using namespace std;
class Node
{
int data;
Node *left;
Node *right;
bool lbit;
bool rbit;
public:
Node()
{
data = 0;
left = NULL;
right = NULL;
lbit = 0;
rbit = 0;
}
Node(int data)
{
this->data = data;
... | ALGO | 0.999965 | 4.079771 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-09T16:38: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": "730215a8be63... |
24b4e912-18de-422d-afae-a2317564e900 | vonmax007/RobotSimulation | c. near_outport/Algorithm_01/Robot.h | #pragma once
#include "StdAfx.h"
#include "ResEntity.h"
#define MAXReah 800000 //表示无法到达目的地;
//寻找可用时间槽的队列结构
struct retime
{
int i, j;
int enter_slot;
int end_slot; //其位于的空闲时间窗的结束时间槽
retime * backpointer;//反向指针,用于指示此结构扩展与哪一个资源-时间对
retime(int _i, int _j, int _enter_slot, int _end_slot):i(_i), j(_j), enter_slot(_ent... | ALGO | 0.94544 | 3.549389 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-05-29T15:24:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1806336ca... |
03147167-8b33-489b-abaf-db2179649acb | codechamp379/Strivers-SDE-Sheet-Challenge | cycle_detection_linked_list.h | /****************************************************************
Following is the class structure of the Node class:
class Node
{
public:
int data;
Node *next;
Node()
{
this->data = 0;
next = NULL;
... | ALGO | 0.999832 | 5.534006 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2023-06-08T19:16:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "35b9cb173f6... |
8ca42e58-de60-4da7-9abb-2f0d9e83d221 | avneeshlingwal9/codes | C++/daa/weatherInsertionSort.cpp | #include <bits/stdc++.h>
using namespace std;
// A structure to hold weather data.
struct weatherData
{
string cityName;
string time;
int temperature;
};
/*
Function: insertionSort(vector<weather>& arr)
Description:
Sorts an arrray arr containing weatherData according to city names.
Input Paramet... | ALGO | 0.999779 | 4.966733 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2024-10-20T11:39: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": "358a38c68... |
b759c0a5-1698-43bb-9828-e8a0522b1441 | waleeddaud12/DSA-In-Cpp | Linked List/Doubly_linked_list.cpp | #include<iostream>
using namespace std;
class node{
public:
int data;
node* prev;
node* next;
node(int data){
this->data = data;
this->prev = NULL;
this->next = NULL;
}
};
void display(node*head){
node *temp = head;
while(temp != NULL){
cout<<t... | ALGO | 0.999451 | 4.681258 | {
"github_metadata": {
"branch": "main",
"commit_count": 120,
"repo_created_at": "2023-09-10T21:10: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": "0dc1daee70... |
ff5ceece-c187-4bfa-a7c3-8ccad7662bae | sergiolsf/CP-Problems | Upsolve/I Maratona do Cerrado/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
void fastio() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
... | ALGO | 0.999615 | 3.957813 | {
"github_metadata": {
"branch": "main",
"commit_count": 92,
"repo_created_at": "2024-11-17T00:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a7b97d20344... |
4443c654-14da-46d4-b578-ed7ab5fa93a6 | nirjhor01/Graph | Dijkstra.cpp | #include<bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
std::vector<vector<pair<int,int>>> v(n);
for(int i = 0; i < m; ++i) {
int x, y, w;
cin >> x >> y >> w;
x--;
y--;
v[x].push_back({y, w});
}
int st = 0;
priority_queue<pa... | ALGO | 0.999995 | 3.933188 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-03-17T10: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": "53591106044... |
52e8b67f-de08-4f33-b93e-d5e2187d065b | mailpraveens/Algorithms-in-CPlusPlus | Programs/Dynamic Programming/MaxProductCut.cpp | //
// MaxProductCut.cpp
// TestApps
//
// Created by <NAME> on 8/8/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#include "MaxProductCut.h"
using namespace std;
int max(int a, int b) { return (a > b)? a : b;}
int max(int a, int b, int c) { return max(a, max(b, c));}
int MaxProductCutRecursive(int n)... | ALGO | 0.999509 | 5.21489 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2014-08-03T15:49:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "54e1a9367... |
2c45ae20-8c22-4783-b31d-af0c2ea5d071 | shmohammadi86/SCINET | inst/include/stats/quant/qchisq.hpp | /*################################################################################
##
## Copyright (C) 2011-2018 <NAME>
##
## This file is part of the StatsLib C++ library.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with ... | ALGO | 0.99856 | 6.152993 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2019-07-15T22:40:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 5,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "953fc05a... |
e1f08509-af1e-46c9-bc1a-565ac6d82aaa | stephonlawrence/cisc-3110-lab-2-ticTacMath | gameboard.cpp | /*
Author: <NAME>
Name: gameboard.cpp
*/
#include <iostream>
#include "gameboard.h"
using namespace std;
// helper for converting from a 2d position to a 1d array
int getPosition(int x, int y, int rowsize) {
return x * rowsize + y;
}
// helper for telling whether a move on the board was already made
bool... | ALGO | 0.976099 | 5.00452 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2016-09-21T05:57:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf73fb1fbb... |
3de72a10-a987-4cc1-9de8-3dd776bd77aa | sakibhasan-24/data-structure-and-algorithm | LinkedList/basic.cpp | #include<iostream>
using namespace std;
class Node {
public:
int data;
Node* next;
Node(int value) {
data = value;
next = NULL;
}
};
void print (Node *head){
// Node *temp=head;
// while (temp!=NULL){
// cout<<temp->data<<" ";
// temp=temp->next;
// }... | ALGO | 0.999327 | 4.105637 | {
"github_metadata": {
"branch": "main",
"commit_count": 129,
"repo_created_at": "2025-03-03T16:27: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": "393362ee3d... |
ed2a1c0e-32ea-4850-8e3e-4cbfd0d09772 | Noorius/2year | Algorithms&Data Structures on C++/Labs on Graphs/Djikstra/D_set.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
int num;
cin >> num;
for(int i = 0; i < num; i++){
int n, m;
cin>>n>>m;
int d[n];
vector<vector<pair<int,int> > > g(n);//, vector<pair<int,i... | ALGO | 0.999925 | 3.575382 | {
"github_metadata": {
"branch": "main",
"commit_count": 145,
"repo_created_at": "2021-09-16T10:26:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ebe0a9482... |
0d73e9c0-76f3-4104-bf0d-40c80d616438 | jsj2008/lithtech | libs/WONAPI/WONCrypt/BigInteger.cpp | #include <assert.h>
#include <memory>
#include <algorithm>
#include <math.h>
#include "BigInteger.h"
using namespace std;
using namespace WONAPI;
const int BigInteger::BITS = 32;
#define LOW_WORD(x) (word)(x)
#define HIGH_WORD(x) ((word)(x>>32))
//#define HIGH_WORD(x) (*(((word *)&(x))+1))
///////////////////////... | TOOL | 0.972559 | 5.025867 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2013-03-10T02:09:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 280,
"forks": 114,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54298b... |
5384a664-7ed7-439f-b00a-743ae7bc3e68 | tauhrick/Competitive-Programming | Contests/Codechef/AUG-19/maxexpr.cpp | #include <bits/stdc++.h>
using namespace std;
string to_string(string s) {
return '"' + s + '"';
}
string to_string(const char* s) {
return to_string((string) s);
}
string to_string(bool b) {
return (b ? "true" : "false");
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
return "(" + to_... | ALGO | 0.999726 | 3.547778 | {
"github_metadata": {
"branch": "master",
"commit_count": 266,
"repo_created_at": "2019-06-24T10:51:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d533b491... |
81db88c2-2a12-4310-b697-f42bca573f86 | Blustak/aoc2023 | day-5/cpp/problem-2/solution.cpp | // "Copyright 2023 anyone who wants this trash"
//
// KEY MAP INFO
// source-to-destination map:
// destination my_range start | source range start | range
//
// EXAMPLE:
// seed-to-soil map:
// 50 98 2
// 52 50 48
//
// line 1: soils [50-51] (my_range 2) map to seeds [98-99], therefore soil 50
// corresponds to seed 9... | ALGO | 0.99701 | 4.820857 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2023-12-03T23:40: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": "42f849ab3dc... |
bd9fe091-d258-43f1-8e39-e502572e57ba | S-Popy/XPSC_03 | week-1/Day-05/number_of_equal.cpp | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n, m, l, x, y;
cin >> n >> m;
int a[n], b[m];
for(int i = 0; i < n; i++) {
cin >> a[i];
}
for(int i = 0; i < m; i++) {
cin >> b... | ALGO | 0.999981 | 3.893878 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-01-04T15:10: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": "99d64e39455... |
9867c672-667b-48f2-a728-815a72481c11 | birdrat-lab/morten-comp-phys | ch2/02_sum_up_vs_sum_down/src/2_6_2_2.cpp | /**
Date: 07-17-24
I output the log relative error of s_up and s_down
to a text file.
I use gnuplot to create a log-log plot of the error
against N to show the different regions of behavior.
gnuplot let's us fit functions to the scatterplot
to further analyze the error.
The double precision ... | TEST | 0.913464 | 4.338267 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-07-12T01:23:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "87bbcebaf16... |
e3f2e891-e1a0-4f13-8f6a-f6c63a98a0ba | Maycon708/Maratona | URI/2136 - Amigos do Habay.cpp | #include <bits/stdc++.h>
#define INF 0x3F3F3F3F
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define it(i, a) for( i = a.begin(); i != a.end(); i++ )
#define pb push_back
#define pi 3.1415926535897932384626433832795028841971
#define debug(x) cout << #x << " = " << x << endl;
#define debug2(x,y) cout << #... | ALGO | 0.998773 | 3.286384 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-02-28T17: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": "9b6de2da6c... |
7bca6c49-0bdf-4ce8-8c5c-5085f66ed473 | IEIAuto/AutoDRRT | src/autodrrt.application/perception/autoware.perception/traffic_light_ssd_fine_detector/lib/include/gather_topk_kernel.hpp | // Copyright 2023 TIER IV, 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 law or agreed to i... | ALGO | 0.992309 | 7.339144 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2023-08-11T02:20:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 14,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "3ea43b59d... |
2d0adcb5-265d-4118-973d-8a227cfd01ed | hmwang2002/Algorithm-Learning | leetcode/leetcode-2461.cpp | #include <bits/stdc++.h>
using namespace std;
auto _{
[]() noexcept
{
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr), std::cout.tie(nullptr);
return 0;
}()};
class Solution
{
public:
long long maximumSubarraySum(vector<int> &nums, int k)
{
unordered_map<in... | ALGO | 0.999952 | 5.750134 | {
"github_metadata": {
"branch": "master",
"commit_count": 179,
"repo_created_at": "2024-01-26T11:41:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "26b1ffca... |
df43ddea-6e2b-4c7b-bcdd-6f950c236dc7 | Wintzbi/exolegend-memeinc | examples/ley/main.cpp | #include "gladiator.h"
Gladiator *gladiator;
void reset();
bool UpdateNearestBomb=true;
Position LastBombToGet;
// Constantes de contrôle
float kw = 4.f;
float kv = 4.f;
float wlimit = 3.f;
float vlimit = 2;
float erreurPos = 0.05;
typedef struct PathList {
int x, y;
int value;
} PathList;
PathList* pathList... | ALGO | 0.975419 | 3.337004 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2025-03-07T09:26:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "839a1af9f6... |
69c7ec59-b7e6-4398-831a-42b5632c4fd2 | hcavalle/CSEDU | CS31/Project 4/Project4/Project4.cpp | #include <string>
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
//function prototypes
void assignInitialValues(string grid[][10], int size); /* where each square in the grid is randomly assigned the value "C" for cooperator or "D" for defector.*/
void iterate(string grid[][10], int size... | ALGO | 0.999873 | 5.06506 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2013-04-22T03:54: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": "6b6de63599... |
7097ff79-6e8e-453a-b2f4-35d09f866a9b | ZheXie/UBC_CS221_PA | pa2/treasureMap.h |
#ifndef _TREASUREMAP_H
#define _TREASUREMAP_H
#include "cs221util/PNG.h"
#include "cs221util/RGBAPixel.h"
#include <utility>
#include <vector>
using namespace std;
using namespace cs221util;
class treasureMap {
public:
// Simply initializes member variables. Assumes:
// base and maze have the same di... | ALGO | 0.992509 | 5.581455 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-05-09T10:33: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": "3146ee63313e... |
df4c99ee-cf5b-492e-b8bd-7ed34d48bb52 | vladiq/MAI-Data-Structures-and-Algos-class | lab_01/sort.cpp | #include "sort.hpp"
bool IsDigit(char a) {
if (a >= '0' && a <= '9') {
return 1;
}
return 0;
}
void Parsing(KV& data) {
for (int j = 0; data.value[j] != '\t'; ++j) {
if (IsDigit(data.value[j])) {
data.key = data.key * 10 + data.value[j] - '0';
}
... | ALGO | 0.9992 | 4.60014 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-08-19T07:59:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e00d91d18a73... |
7fd94ba0-1208-4562-b6da-898d00876eaf | ftiasch/acm-icpc | codeforces/219-codeforces-round-135/A.cpp | // Codeforces Round #135
// Problem A -- k-String
#include <cstdio>
#include <cstring>
using namespace std;
const int N = 1000;
int n, k, counter[26];
char string[N + 1];
int main() {
scanf("%d%s", &k, string);
n = strlen(string);
memset(counter, 0, sizeof(counter));
for (int i = 0; i < n; ++ i) {
... | ALGO | 0.999911 | 3.938024 | {
"github_metadata": {
"branch": "master",
"commit_count": 934,
"repo_created_at": "2012-04-22T02:50:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 113,
"forks": 35,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02372... |
7c1087af-3f20-49dd-93f2-e510c7b385f3 | Poojan987/Competitive-Programming-CP | Google/KickStart/April2021/ConsecutivePrime.cpp | #include <iostream>
#include <bits/stdc++.h>
#include<set>
#include<stddef.h>
#include<stdlib.h>
#include <unordered_set>
#include<unordered_map>
#include<map>
#include<string>
#include<ctype.h>
#include <queue>
// #pragma GCC optimize "trapv"
typedef long long int ll;
using namespace std;
#define f(abcd,n) for(int ab... | ALGO | 0.999747 | 3.743902 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2021-04-05T06:14:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be16e60329... |
5f696955-7b5c-4175-bc64-c55e6c62c06c | MohdAqib8267/6-Companies_30_days_Challenges | 1970-last-day-where-you-can-still-cross/1970-last-day-where-you-can-still-cross.cpp | class Solution {
public:
vector<vector<int>> nthDayBoard(vector<vector<int>>& cells, int n, int row, int col) {
vector<vector<int>> board(row, vector<int>(col, 0));
for (int i = 0; i < n; i++) {
board[cells[i][0] - 1][cells[i][1] - 1] = 1;
}
return board;
}
bool df... | ALGO | 0.999973 | 6.222256 | {
"github_metadata": {
"branch": "main",
"commit_count": 3018,
"repo_created_at": "2023-01-03T12:30:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "06447d0d4... |
24f0059f-2926-448a-bc5c-d9a1864fabf7 | rikuTanide/atcoder_endeavor | abc156/abc156_d.cpp | #include <bits/stdc++.h>
#include <cmath>
const double PI = 3.14159265358979323846;
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
//typedef pair<ll, ll> P;
typedef pair<double, double> P;
const ll INF = 1e15;
#define cmin(x, y) x = min(x, y)
#define... | ALGO | 0.999924 | 3.876887 | {
"github_metadata": {
"branch": "master",
"commit_count": 4423,
"repo_created_at": "2020-12-05T04:36: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": "f9ff110... |
c8b8b1fd-6a07-4aad-8108-9a9a973076de | MiohitoKiri5474/CodesBackUp | C++/CodeForces/Good-Bye-2017/pB.cpp | // by. MiohitoKiri5474
#include<bits/stdc++.h>
#pragma GCC optimize ( "O3" )
#pragma loop_opt ( on )
using namespace std;
typedef long long LL;
// define tools
#define REPP(i,f,s) for ( int i = f ; i < s ; i++ )
#define REPM(i,f,s) for ( int i = f ; i >= s ; i-- )
#define REPALL(i,n) for ( auto &i: n )
#define debu... | ALGO | 0.999979 | 3.523969 | {
"github_metadata": {
"branch": "master",
"commit_count": 148,
"repo_created_at": "2018-03-21T10:32:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "919a65c6... |
47221633-5441-4fbb-adc6-5fe924a48ed1 | greenfox-zerda-sparta/nagyzsuska | week2/day-3/3.12.cpp | //============================================================================
// Name : 2.cpp
// Author : <NAME>
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <... | ALGO | 0.993444 | 4.211868 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2016-10-19T11:37:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd9089af5d... |
c2c5c485-b315-407e-ba9e-9ddac0c7c6c8 | Resetz/usacoprac | SILVER/acornsmash.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <iomanip>
using namespace std;
int main() {
vector<pair<int,int>> v;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
v.push_back(pair<int,int>(a,b));
}
sort(v.be... | ALGO | 0.999948 | 4.039962 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2021-07-22T01:07: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": "3a51b1f663a... |
f52dc3bb-c8ff-494c-a152-a59f221174e6 | soomrack/MR2018 | ksenya/matrix/matrix.cpp | #include "matrix.h"
double Matrix::matrix_trace() {
double trace = 0;
if (cols == rows) {
for (int rowss = 0; rowss < rows; rowss++) {
for (int colss = 0; colss < rows; colss++) {
trace = data[rowss * rows + colss] + trace;
}
std::cout << trace << std... | ALGO | 0.998008 | 4.050893 | {
"github_metadata": {
"branch": "master",
"commit_count": 599,
"repo_created_at": "2018-09-16T19:17:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d2bd798... |
c6646f59-5d79-4d17-84f4-367c1e225294 | fazlerahmanejazi/Competitive-Programming | Codeforces/423/C.cpp | #include <bits/stdc++.h>
using namespace std ;
#define inf 0x3f3f3f3f
#define INF 1000111000111000111LL
#define mod 1000000007
#define endl '\n'
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define fi first
#define se second
#define all(cc) (cc).begin(),(cc).end()
using lli = long long int ;
using p... | ALGO | 0.999849 | 3.231586 | {
"github_metadata": {
"branch": "master",
"commit_count": 102,
"repo_created_at": "2018-01-12T00:39:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 6
},
"file_meta": {
"content_id": "e0b11f3e... |
15ca33c8-7fcb-4354-9aa0-a9cd63e9594e | NaLavte/DZ_top | С++/Неделя 5/Домашнее задание/задание 1.cpp | #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "RU");
char X;
int symbol;
cout << "Введите символ который хотите распознать: ";
cin >> X;
symbol = (int)X;
if(((symbol >= 65) && (symbol <= 90)) ||
((symbol >= 97) && (symbol <= 122)))
{
cout <... | ALGO | 0.995794 | 3.187563 | {
"github_metadata": {
"branch": "DZ_C++",
"commit_count": 27,
"repo_created_at": "2025-04-28T14:46:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8bbe7796c... |
e70f9554-3ba6-4e52-963e-4c17da4920e3 | jdmarble/prm-benchmark | src/baswana_randomized_spanner.h | /*
* File: baswana_randomized_spanner.h
* Author: jdmarble
*
* Created on March 3, 2011, 12:01 PM
*/
#ifndef BASWANA_RANDOMIZED_SPANNER_H
#define BASWANA_RANDOMIZED_SPANNER_H
#define BOOST_NO_HASH
#include <boost/config.hpp>
#include <boost/bind.hpp>
#include <boost/property_map/property_map.hpp>
#include <... | ALGO | 0.999717 | 5.041101 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2012-11-30T18:41:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "69b9c89c6... |
299fb229-c6b1-4a8d-ace1-18cf69f6897c | jacketfffff/bazier_traj | src/bezier_trajectory.cpp | #include "bezier_trajectory.h"
namespace planner{
Bernstein::Bernstein(){
}
Bernstein::Bernstein(int _poly_order_min, int _poly_order_max, double _min_order){
order_min_ = _poly_order_min;
order_max_ = _poly_order_max;
min_order_ = _min_order;
}
Bernstein::~Bernstein(){
... | ALGO | 0.999801 | 4.548123 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-01-05T13:19: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": "14fc873a54... |
37d9d30c-5a84-417a-a0fe-7c9d5f34da52 | KrazyK4N4DE/Embedded_Linux_Notes | 数据结构/MyPractice/算法笔记/回溯算法/组合总和2.cpp | /*
* 组合总和Ⅱ
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution
{
private:
vector<vector<int>> results;
vector<int> path;
void backtracking(vector<int>& candidates, int target, int sum, int startIndex, vector<bool>& used)
{
if... | ALGO | 0.999938 | 5.422065 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-08-01T13:34:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "803a42e882... |
67f8a935-9700-41e3-8258-eeb6ac2c9261 | YMTheory/energyModel_Fit | new_fitter/src/spectrumFitter.cc | #include "spectrumFitter.hh"
#include "junoParameters.hh"
#include "Minuit2/Minuit2Minimizer.h"
#include "Math/Minimizer.h"
#include "Math/Factory.h"
#include "Math/Functor.h"
#include <TSystem.h>
#include <TFile.h>
#include <TGraphErrors.h>
#include <TCanvas.h>
#include <TLegend.h>
using namespace std;
bool spectru... | ALGO | 0.952473 | 5.329076 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2020-04-07T06:42:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1018def... |
1e0e3083-c3d5-4570-90e6-fb6780889c6d | kohutjan/ConvBase | src/operators/pooling.cpp | #include "operators/pooling.hpp"
using namespace std;
void Pooling::Forward(vector<Tensor4D> bottom, vector<Tensor4D> top)
{
float * topDataVal = top[0].GetData();
int topOffset = 0;
for (int n = 0; n < this->bottomShape[0][Nd]; ++n)
{
for (int h = 0; h <= this->bottomShape[0][Hd] - this->kernelSize; h +... | DATA | 0.996331 | 6.513922 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2017-10-03T20:30: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": "a64f54a42... |
32c1079c-7b6e-4df9-b20f-fcadac12e967 | JeffCottonBWFC/ProjectEulerSubmissions | SolutionsFile/_Problem55 (Lychrel Numbers).cpp | #include <iostream>
#include <math.h>
#include "mVector.h"
#include "OperatorOverloads.h"
//Problem 55 (COMPLETE)
//If we take 47, reverse and add, 47 + 74 = 121, which is palindromic.
//Not all numbers produce palindromes so quickly. For example,
// 349 + 943 = 1292,
// 1292 + 2921 = 4213
// 4213 + 3124 = 7337
// ... | ALGO | 0.999506 | 5.329052 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2021-05-10T15:24: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": "55f43f4fb94... |
76f6280d-3680-4db1-8cdf-90ef71036603 | s-ekam/DevCPP | DataStructures/AVLTree.cpp | #include <iostream>
using namespace std ;
struct node
{
int data , height,bal;
node *left , *right, *par;
}*root;
void rotLeft(node*);
void rotRight(node*);
void rotLeftRight(node*);
void rotRightLeft(node*);
void setBal(node*);
void inOrder(node *);
node *newNode(node*par,int val)
{
node *temp = new node;
te... | ALGO | 0.999965 | 4.253551 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-02-14T08:49: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": "347ff75770... |
3f5bc0bc-cd4d-4d3a-9952-8c0cc3853965 | Qianhongbo/LeetCode | problems/57.insert-interval.cpp | /*
* @lc app=leetcode id=57 lang=cpp
*
* [57] Insert Interval
*/
#include <algorithm>
#include <vector>
using namespace std;
// @lc code=start
class Solution {
public:
vector<vector<int>> insert(vector<vector<int>>& intervals, vector<int>& newInterval) {
std::vector<std::vector<int>> res;
int sz = int... | ALGO | 0.999875 | 6.466146 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2022-04-13T17:45:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3acc01c67... |
4135ac9e-b429-42c6-b611-05ff28d99347 | chetanpant11/Geeks-For-Geeks | Graph/Find the number of islands.cpp | #include <bits/stdc++.h>
using namespace std;
int findIslands(vector<int> A[], int N, int M);
int main() {
int T;
cin >> T;
while (T--) {
int N, M;
cin >> N >> M;
vector<int> A[N];
for (int i = 0; i < N; i++) {
vector<int> temp(M);
A[i] = temp;
... | ALGO | 0.99994 | 5.893191 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2020-04-29T05:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7fa1d7d85... |
85febd72-08d1-492c-af45-2f8458a556cb | saksham117/150-Questions | 3. DP/Dynamic Programming Aditya Verma/7. count of subsets.cpp | // you are given an array and you need to find the number of subsets in the array whose sum is equal to the given sum
// again we will take a matrix of size t[n + 1][sum + 1]
// so again inittialiaztion would be pretty similar to what we have done earlier
// insteaed of tru we shall have 1, and instead of false we wi... | ALGO | 0.999954 | 4.993095 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-02-24T16:35: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": "27a3fab70ce7... |
fbb399e8-577d-4d71-95a2-e9b1b900ccab | morrisel/rted-cpp-projects | quadratic_equation/quadratic_equation.hpp | /** quadratic_equation.hpp *
* ---------------------- *
* *
* - This header file defines the Equation class for representing quadratic *
... | TOOL | 0.934716 | 6.289239 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-04-08T19:34: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": "b6adf6a525d... |
9cc35901-cc09-4d69-a40f-a14f461eedc0 | himkwan01/Prog_Study | C++/Savitch/Ch2_P15/main.cpp | /*
* File: main.cpp
* Author: <NAME>
* Created on July 1, 2014, 10:00 PM
* Purpose: show V of the sound
*/
//System Libraires
#include <iostream>
#include <iomanip>
using namespace std;
//User Libraries
//Global Constant
//Function Prototypes
//Execution Begins HerE
int main(int argc, char** argv) {
/... | TOOL | 0.945317 | 4.618849 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2016-04-27T08:51: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": "67a929f3b... |
4ccfdd9b-7b97-44b4-af62-c29cbc968e7e | M3IJI3/leetcode_solution | 0208-implement-trie-prefix-tree/0208-implement-trie-prefix-tree.cpp | class TrieNode {
public:
unordered_map<char, TrieNode*> children;
bool isEnd;
TrieNode(){
children.clear();
isEnd = false;
}
};
class Trie {
TrieNode* root;
public:
Trie() {
root = new TrieNode();
}
void insert(string word) {
TrieNode* curr = root;
... | ALGO | 0.999818 | 5.724316 | {
"github_metadata": {
"branch": "main",
"commit_count": 1228,
"repo_created_at": "2024-10-31T10:22:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af328433f... |
5db79065-9d5b-4870-b8c0-d684ae2baff9 | SmileiPIC/Smilei | src/ElectroMagnSolver/MF_Solver3D_M4.h | #ifndef MF_SOLVER3D_M4_H
#define MF_SOLVER3D_M4_H
#include "Solver3D.h"
class ElectroMagn;
// --------------------------------------------------------------------------------------------------------------------
//! Class Pusher
// -------------------------------------------------------------------------------------... | ALGO | 0.955585 | 4.699315 | {
"github_metadata": {
"branch": "master",
"commit_count": 11568,
"repo_created_at": "2016-06-23T14:07:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 384,
"forks": 130,
"issues": 21,
"pull_requests": 1
},
"file_meta": {
"content_id": "5f... |
27a45897-4dbd-4160-ab84-3d53168f78a4 | wighs33/Coding-Test-Studying | 019. 모의고사/소스.cpp | #include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
using namespace std;
vector<int> solution(vector<int> answers) {
vector<vector<int>> mans_loop = { { 1,2,3,4,5 }, { 2,1,2,3,2,4,2,5 }, { 3,3,1,1,2,2,4,4,5,5 } };
map<int, vector<int>, greater<int>> score_man;
fo... | ALGO | 0.999912 | 4.721869 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2022-12-31T16:49:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7a42e62c... |
011e804f-cd3c-44c2-84ed-19e0af29e21b | ir-rafio/iut-algorithms-lab-1a-summer-23-24 | Lab 3/Task A/submission/220041107_lab3_taskA.cpp | #include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)
using LL = long long;
void bfs(int start, vector<vector<int>>&adjlist, vector<bool>&visited, vector<int>&money, int &s, int &c){
queue<int>q;
q.push(start);
visited[start]=true;
s=money[start];
... | ALGO | 0.999736 | 4.288085 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-05-03T17:16:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d7c609d84b... |
cdba53db-fcd6-438e-9570-c49cbed1f06b | bettercodevivek/Cpp-Codes | 02DSA/Arrays-Medium/TwoSum.cpp | /*Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.*/
// we can use the brute force approach of s... | ALGO | 0.999974 | 6.008345 | {
"github_metadata": {
"branch": "main",
"commit_count": 95,
"repo_created_at": "2024-11-10T15:17:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6a8b6ff4cd1... |
88c27d06-15a2-4831-a403-45c20d2c27c9 | raincross7/code-similarity | codes/train_code/problem252/problem252_144.cpp | #pragma GCC optimze("Ofast")
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define mod 1000000007
#define md 998244353
#define trace(...)
#define ll long long int
#define ld long double
#define fi first
#define se ... | ALGO | 0.999813 | 3.703841 | {
"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": "d4c96c5eeb02... |
53f54536-e50d-4830-b372-22be22f82642 | Arsen-I/CV_project | src/headers/detection/lowLevelFunc.cpp |
//File written by <NAME> (id 2090597)
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
#include <vector>
#include "lowLevelFunc.h"
using namespace cv;
using namespace std;
//function that checks how empty or full a circle is
int checkValid(Point center, int radius, Mat image){
int... | ALGO | 0.993392 | 5.539061 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2024-05-22T09:04:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "108824ac91... |
40c269a7-d47e-458d-91ba-ebd0ede4ac8a | yoshito-n-students/nlopt11 | test/unit_tests_from_matlab.cpp | #include <cmath>
#include <limits>
#include <vector>
#include <nlopt11.hpp>
#include <gtest/gtest.h>
// https://www.mathworks.com/help/optim/ug/solve-constrained-nonlinear-optimization-problem-based.html
TEST(FromMatlab, QP2) {
// form the problem
nlopt::opt11 opt(/* algorithm = */ nlopt::LN_COBYLA, /* n_params ... | TEST | 0.951316 | 6.139803 | {
"github_metadata": {
"branch": "main",
"commit_count": 139,
"repo_created_at": "2020-11-19T00:46:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "888835464ff... |
42d56f6f-8312-4d53-b67c-771f14a36d9d | blownhither/Learning-PRML | Util/kd-tree/kd-tree/KDTree.hpp | //
// KDTree.hpp
// kd-tree
//
// Created by 马子殷 on 7/9/17.
// Copyright © 2017 马子殷. All rights reserved.
//
#ifndef KDTree_hpp
#define KDTree_hpp
#include <cstdlib>
#include <string>
#include <array>
#include <limits>
#include <vector>
template<int ndim>
class KDTree {
public:
KDTree(double **data, int nda... | ALGO | 0.998504 | 4.681706 | {
"github_metadata": {
"branch": "master",
"commit_count": 118,
"repo_created_at": "2017-03-24T16:53:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5ea054ad... |
471858aa-9a14-4afa-897e-6019225e18be | ropod-project/ropod_navigation | route_planner/src/simple_osm_route_planner.cpp | /*
Computes route solely based on topological nodes present in OSM
*/
#include <route_planner/simple_osm_route_planner.hpp>
std::vector<ropod_ros_msgs::Area> SimpleOSMRoutePlanner::compute_route(std::vector<ropod_ros_msgs::Area> path_areas)
{
for (auto it1 = path_areas.begin(); it1 != path_areas.end(); it1++) {
... | ALGO | 0.98297 | 5.091554 | {
"github_metadata": {
"branch": "master",
"commit_count": 315,
"repo_created_at": "2019-12-18T08:36:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63bb0b2e9... |
17d68049-5bcb-4543-866d-35353e0be952 | SamratEmily/Codeforces | 1430A.cpp | #include<bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
#define vl vector<ll>
#define all(v) v.begin(),v.end()
#define pb push_back
#define pf printf
#define scln(x) scanf("%lld",&(x))
#define pll p... | ALGO | 0.999876 | 3.817817 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-03-27T20:30:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e3fcdcfcf1... |
c21e9d76-11cc-46e3-9104-34de852dedbd | arviinddr/Notebook | Notebook-LTTS/C++/Advanced/Assignments/assign-5,8/ass5_v1.cpp |
/*__Assignment 5__
5. Write a program to implement two threads, where output from both threads will
come,with switching after every 5 iterations.
* Two Threads Created
*
g++ ass5.cpp -lpthread && ./a.out
*/
#include <iostream>
#include <string>
#include <future>
#include <condition_variable>
#include <ch... | ALGO | 0.93677 | 5.227425 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-12-08T08:07: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": "9d7be272c6... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.