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 |
|---|---|---|---|---|---|---|---|
0ae1053f-993a-4fed-9895-3c26d2327b3c | Makcal/Innopolis_SSAD_labs | Lab7/main.cpp | #include <iostream>
#include <vector>
using namespace std;
template <typename T>
class CircularBuffer {
private:
vector<T> v;
public:
explicit CircularBuffer() = default;
void push(T e) {
v.push_back(e);
}
T pop(int i) {
auto t = v[i];
v.erase(v.begin() + i);
ret... | ALGO | 0.994343 | 5.299964 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-02-13T10:14:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0eb3869790... |
18bd2f14-97ce-4c84-ae5c-9a48fa7ade26 | StrawHatWess/Competitive-Programming-Solutions | Codeforces/Rated/587/E.cpp | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
typedef string str;
typedef long long ll;
#define int ll
typedef double db;
typedef long double ldb;
typedef pair<int,int> pi;
#define mp make_pair
#define fi first
#define ... | ALGO | 0.999942 | 4.374679 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-04-18T12:51: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": "69c92c2f6791... |
27bdebf5-7823-43a1-a704-32092dcfc5ad | TheRealGamerTDM/Project5-3-3-20 | Project5 3-3-20/Source.cpp | /*
This is a Magic 8-ball Program. The user will ask a question, and the magic 8 ball will give a random answer, as if by magic
Author: <NAME>
Date: 3/3/20
First, tell the user ask a question.
Type that question into the program.
Generate a random answer from the choices programed into the computer, This will use ... | TOOL | 0.975393 | 4.193517 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-08-17T16:53: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": "a03a973ddd... |
6044b072-382e-43c6-8eaf-6f7f59740fd0 | zhuzhuc/Algorithm | 入门6/P5742.cpp | #include <bits/stdc++.h>
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
const int maxn = 2e5 + 2;
const int maxm = 62;
bool isLeapYear(int year) {
... | ALGO | 0.996973 | 4.16988 | {
"github_metadata": {
"branch": "main",
"commit_count": 233,
"repo_created_at": "2024-06-19T13:35:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d9f521c74... |
ad3b4fea-e455-4450-9992-f548234c52c6 | prpr2770/pldi18-decidable-decomposition | evaluation/src/raft-consensus.h | #include "server.h"
#include "common.h"
#include <raft.h>
#ifndef _RAFT_CONSENSUS_H
#define _RAFT_CONSENSUS_H
std::string msg_kind_to_string(raft::msgkind k) {
switch (k) {
case raft::rqvote:
return "rqvote";
case raft::rqvotenolog:
return "rqvotenolog";
case raft::vtcandidate:
return "vtcandidate... | TOOL | 0.911364 | 6.022652 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-12-13T22:12: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": "071b4617b6... |
f698f24b-5815-43b7-ae20-0a93e54f5e09 | Adarsh2604/Coding | Linked_list.cpp | /*###################################*****{ADARSH}*****################################*/
#include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node *next;
node(int val)
{
data = val;
next = NULL;
}
};
bool search(node *head, int key)
{
node *temp = head;
... | ALGO | 0.999532 | 3.374191 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-04-13T06:33: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": "a645675252... |
6d3efe88-3346-4170-9ffc-d9b0e5e887ef | AslamIktelat/simulation-using-mvc-structure-in-c- | view.cpp | #include "view.h"
view::view()
:x(-10),y(-10),s(25),z(2)
{
}
view::~view()
{
//dtor
}
void view::Default()
{
x=-10;
y=-10;
s=25;
z=2;
}
void view::size(int s)
{
this->s=s;
if(s>30)
this->s=30;
if(s<6)
this->s=6;
}
void view::zoom(int z)
{
this->z=z;
}
void view::pan(int x,int y)
{... | TOOL | 0.932476 | 3.811916 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-03-25T13:12: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": "91f677787e72... |
5fb62651-2d89-4d03-a592-4d7a58027f2a | masakinihirota/2019pg | ABC/■100/31-40/ABC_037/ABC037_B2.cpp | #include <bits/stdc++.h>
#include <ctype.h>
using namespace std;
#define ll long long
#define all(x) (x).begin(), (x).end()
const long long INF = 1LL << 60;
#define rep(i, n) for (int i = 0; i < (int)(n); i++) //(i, 10) i=0~i=9まで
#define repr(i, n) for (int i = n; i >= 0; i--) // (i, 10) i=10~i=0まで
#define FOR(i, ... | ALGO | 0.999903 | 4.304971 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-12-01T14:32: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": "251e90f2f... |
4b51369e-0811-4b9d-bbe7-09b4b23b3087 | flourpower/cpp | ts/2.cpp | #include <iostream>
#include <string>
#include <vector>
#include <set>
using namespace std;
void tokenize(const string& str,
vector<string>& tokens,
const string& delimiters = " \t"){
string::size_type lastPos = str.find_first_not_of(delimiters, 0);
string::size_typ... | ALGO | 0.998037 | 3.656518 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2014-03-29T00: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": "d0d87f0af... |
e39eb23a-c630-4060-8085-4bc0346128a9 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/08/0806/personal_submission/cf832d_Equinox.cpp | #include <bits/stdc++.h>
// #include <ranges>
// #define DEBUG
using i64 = long long;
using u32 = unsigned;
using u64 = unsigned long long;
constexpr int inf32 = 1E9 + 7;
constexpr i64 inf64 = 1E18 + 7;
constexpr double eps = 1e-9;
struct HLD {
int n;
std::vector<int> sz, top, dep, parent, in, out, seq;
st... | ALGO | 0.999874 | 5.00229 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "43e4... |
4d48b3a1-2037-48a2-9c02-5e7c85bd7105 | CHutton7743/C-Data-Structures-Examples | Customer Queue/ass5.cpp | #include <iostream>
#include <fstream>
#include "Customer.h"
#include "Simulation.h"
#include "QueueADT.h"
#include <vector>
using namespace std;
// begin implementation of Customer Methods
vector<Customer> readCustomers() {
ifstream myFile;
myFile.open("data.txt");
vector<Customer> newCustomers;
st... | ALGO | 0.975444 | 4.306673 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-03-16T04:48: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": "b5de8d552a23... |
ce2c1df2-57c0-47fc-9999-9addcf7e7214 | in-aadi/Coding-Blocks-Launchpad-Btech-A | Lecture 15/Code/3_Target_Sum.cpp | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int target;
cin >> target;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
for (int k = j + 1; k < n; k++) {
... | ALGO | 0.999917 | 4.60109 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-04-27T09:57:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6071ec10b436... |
fb2c8ae6-0547-4954-8942-9309f0755071 | H-Shen/My_Code_Collection | Leetcode/1048/1048.cpp | constexpr int MAXN = 1e3+5;
bitset<MAXN> reach[MAXN];
vector<int> dp;
int length;
class Solution {
public:
// reduce it to longest path
bool predecessor(string& a, string& b) {
int n = (int)a.size();
int m = (int)b.size();
if (n != m-1) {
return false;
}
boo... | ALGO | 0.999995 | 5.385246 | {
"github_metadata": {
"branch": "master",
"commit_count": 1586,
"repo_created_at": "2019-04-11T06:48:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9213477... |
cf501784-0d32-4986-b642-b460d433cb44 | generalized-intelligence/GAAS | deprecated/software/SLAM/ygz_slam_ros/Thirdparty/DBow3/src/ScoringObject.cpp | /**
* File: ScoringObject.cpp
* Date: November 2011
* Author: <NAME>
* Description: functions to compute bow scores
* License: see the LICENSE.txt file
*
*/
#include <cfloat>
#include "../src/Vocabulary.h"
#include "../src/BowVector.h"
using namespace DBoW3;
// If you change the type of WordValue, make sure ... | ALGO | 0.996385 | 5.69932 | {
"github_metadata": {
"branch": "main",
"commit_count": 765,
"repo_created_at": "2019-01-29T06:14:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1991,
"forks": 453,
"issues": 7,
"pull_requests": 3
},
"file_meta": {
"content_id": "3cf3b7... |
851ebe67-7d29-4573-bc16-a5c2dcf7278a | Kunallion/LeetCode | Flattening a Linked List - GFG/flattening-a-linked-list.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
struct Node{
int data;
struct Node * next;
struct Node * bottom;
Node(int x){
data = x;
next = NULL;
bottom = NULL;
}
};
using namespace std;
void printList(Node *Node)
{
while (Node != NULL)
{
printf("%d ", Node->data);
... | ALGO | 0.999837 | 4.479563 | {
"github_metadata": {
"branch": "main",
"commit_count": 1039,
"repo_created_at": "2023-09-28T14:28:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3faeff1a9... |
a21296ea-a1a6-4f19-9a0f-2e1457922da6 | Promms/Baekjoon | 1.Bronze/B1/B1_11005.cpp | #include <iostream>
#include <vector>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int numbers;
int base;
cin >> numbers >> base;
int digit = 0;
long int power = 1; // base^0
while(power <= numbers){
//cout << power <<... | ALGO | 0.999867 | 3.422597 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2025-06-23T07:26:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d76e4284e... |
b537e103-edd1-456d-b0a0-75be23dce62a | emotionless/Google_interview_question_solution | Time to reach message to all the employees.cpp | /*
Link: https://leetcode.com/discuss/interview-question/707842/Google-or-Phone-or-Time-to-reach-message-to-all-the-employees
There is a company consisting of N people, each with a manager who may have one or more other reports.
At the top of the company’s hierarchy is the CEO, who emails a message to all of his repo... | ALGO | 0.999956 | 6.144887 | {
"github_metadata": {
"branch": "master",
"commit_count": 132,
"repo_created_at": "2020-05-21T20:50:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 12,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "7a7124... |
7653f9a3-a55c-41f4-bf46-1bc98bc4e156 | andyschwarzl/gpuNUFFT | CUDA/src/gpuNUFFT_operator.cpp |
#include "gpuNUFFT_operator.hpp"
#include "gpuNUFFT_kernels.hpp"
#include "cufft_config.hpp"
#include "cuda_utils.hpp"
#include "precomp_kernels.hpp"
#include <iostream>
#include <sstream>
#include <algorithm>
template <typename T>
T *gpuNUFFT::GpuNUFFTOperator::selectOrdered(gpuNUFFT::Array<T> &dataArray,
... | ALGO | 0.993329 | 5.111413 | {
"github_metadata": {
"branch": "master",
"commit_count": 1232,
"repo_created_at": "2014-01-13T16:41:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 78,
"forks": 34,
"issues": 27,
"pull_requests": 2
},
"file_meta": {
"content_id": "69fc... |
998a21d2-cb11-4e3a-a2e7-e2c50fdd3ce3 | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1243/Standings4/29754930_64388787.cpp | #include <bits/stdc++.h>
using namespace std;
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int n;
string s, t;
int answer;
vector <pair<int,int>> swaps;
void In()
{
cin >> n >> s >> t;
answer = 0;
}
void Solve()
{
bool found;
for (int i = 0; i < n; i++) if (s[i] != t[i])
{
found ... | ALGO | 0.999994 | 3.609926 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14:40: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": "fb67f17d8... |
521c99b1-c2aa-409b-a439-383724f26e3a | DionysiosB/CodeForces | 0700-0799/740A-AlyonaAndCopybooks.cpp | #include <cstdio>
int main(){
long long n, a, b, c; scanf("%lld %lld %lld %lld", &n, &a, &b, &c);
n %= 4;
long long ans(0);
if(n == 1){
ans = (c < 3 * a) ? c : (3 * a);
ans = (ans < (a + b)) ? ans : (a + b);
}
else if(n == 2){
ans = (b < 2 * a) ? b : (2 * a);
a... | ALGO | 0.999925 | 3.370523 | {
"github_metadata": {
"branch": "master",
"commit_count": 4487,
"repo_created_at": "2013-06-27T18:15:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 690,
"forks": 163,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f7e... |
1be2f770-88c7-486a-889b-ce91f695c653 | dillonhuff/clockwork | soda_codes/blur9_32_opt/our_code/regression_tb_blur9_32_opt.cpp | #include <fstream>
#include "blur9_32_opt.h"
int main() {
srand(234);
ofstream fout("regression_result_blur9_32_opt.txt");
HWStream<hw_uint<16 > > input_arg;
HWStream<hw_uint<16 > > blur9_32;
// Loading input data
srand(1);
// cmap : { input_update_0[root = 0, input_0, input_1] -> input_arg[input_1,... | ALGO | 0.997642 | 4.832012 | {
"github_metadata": {
"branch": "master",
"commit_count": 6305,
"repo_created_at": "2020-03-02T23:33:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 59,
"forks": 12,
"issues": 20,
"pull_requests": 3
},
"file_meta": {
"content_id": "5a3b... |
349a3037-bb2e-4ff2-9252-423be042abcb | tmbasic/tmbasic | src/buildDoc.cpp | #include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <functional>
#include <iostream>
#include <memory>
#include <regex>
#include <sstream>
#include <stdexcept>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
... | TOOL | 0.970029 | 5.627023 | {
"github_metadata": {
"branch": "master",
"commit_count": 1267,
"repo_created_at": "2020-09-06T21:39:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 94,
"forks": 8,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "f76cc2d... |
a0e2d70d-dfa2-4ef9-9006-9f5cadb25267 | RowonChung/SSAFY21_Algorithm | 박상빈/1주차/0207/S1_1303_전쟁-전투.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
// 동 남 서 북 대각선
int dirx[8] = { 1, 0, -1, 0, -1, -1, 1, 1 };
int diry[8] = { 0, 1, 0, -1, -1, 1, -1, 1 };
int n, m;
int Map[101][101];
bool visited[101][101] = { false, };
int Wanswer = 0;
... | ALGO | 0.999934 | 4.151461 | {
"github_metadata": {
"branch": "main",
"commit_count": 505,
"repo_created_at": "2024-01-22T02:28:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65eebdee18... |
f23386b9-a804-40b5-8900-749c95c2572e | bd4874/dsa-revision-notes | 05 Recursion/045SumofNaturalNumbers.cpp | // Sum of Natural Numbers using Recursion
// Author: REET
#include <iostream>
using namespace std;
int sum(int num)
{
if (num == 0)
return 0;
else
return num + sum(num - 1);
}
int main()
{
int T;
cout << "Enter number of Test Cases:" << endl;
cin >> T;
while (T--)
{
... | ALGO | 0.998989 | 5.730544 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2022-09-12T20:13:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1bdac361d... |
31051e38-bf92-463b-9669-106173eef01b | Jay7221/competitve-programming | codeforces/normal_rounds/Round809/D2_self_try.cpp | #include<bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 7;
const int inf = 1e9 + 7;
void solve(){
int n, k;
cin >> n >> k;
vector<int> a(n);
for(int i = 0; i < n; ++i){
cin >> a[i];
}
vector<int> M(mx);
for(int i = 0; i < n; ++i){
int prev_mn = inf;
for(int j = 1; j < min(a[i], k) + ... | ALGO | 0.999912 | 3.902003 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-12-20T15:54:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a440fb951c11... |
3b82a6eb-d1c8-42bc-bd84-31afc4d40057 | mayankraghuwanshi/justcode | temp.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, a, b) \
for (int i = int(a); i < int(b); i++) // a to b, an... | ALGO | 0.999897 | 3.738158 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2019-11-26T22:05: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": "091a9f20f... |
d749ee18-1ac1-4577-8801-de8515492526 | ishandutta2007/codeforces-o | okwedook/normal/744/A.cpp | #pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2")
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <bitset>
#include <sstream>
#include <deque>
#i... | ALGO | 0.999953 | 3.702662 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:45: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": "d86b98519cbd... |
b80ab2b6-86c8-4e1e-bb04-dd8901cb3b69 | Um-ded/problem-solving | Codeforces Codes/627.Prob241A(Old Peykan).cpp | ///*/////////////////////////////*///
/// IN THE NAME OF ALMIGHTY ALLAH ///
///*/////////////////////////////*///
///*///////////////*///
/// Author : Um_ded ///
///*///////////////*///
///*//////////////////////////////////////////*///
/// "When you want something, all the universe ///
/// conspires in helping you ... | ALGO | 0.999971 | 3.673917 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-02-20T21:25: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": "e882cda92cd... |
061c3a16-dc3f-43d9-8ca0-4b1c19f70533 | huannd0101/KTLT_HaUI | BTH6/Bai6.5.cpp | /*Bài 6.5. Sử dụng con trỏ để nhập vào một mảng a gồm n phần tử nguyên, sao chép các phần tử lẻ của mảng đặt vào cuối mảng. In mảng kết quả ra màn hình. Yêu cầu cấp phát bộ nhớ động*/
#include<bits/stdc++.h>
using namespace std;
void Input(int *a, int n, char k){
for(int i = 0; i < n; i++){
cout << "Nhap "... | ALGO | 0.999145 | 3.190346 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2020-09-22T10:58:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72eb4558a... |
c5419314-af41-4cfb-bc69-3ce0c1ef5873 | a1k2-c3/gfg | Difficulty: Basic/Max and Min Product from 2 Arrays/max-and-min-product-from-2-arrays.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to find the maximum element from array a[] and
// the minimum element from array b[] and return their product.
long long find_multiplication(vector<int> &arr1, vector<int> &arr... | ALGO | 0.99991 | 6.569699 | {
"github_metadata": {
"branch": "main",
"commit_count": 219,
"repo_created_at": "2024-07-16T05:36:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a4d4f4735... |
5890e109-0846-4e89-bea7-18756e517766 | Garden1298/Algorithm | 백준/Gold/14719. 빗물/빗물.cc | #include <iostream>
using namespace std;
int block[501][501];
int main()
{
int H, W;
cin >> H >> W;
int height;
for (int i = 0; i < W; i++)
{
cin >> height;
for (int j = 0; j < height; j++)
{
block[j][i] = 1;
}
}
//위에서부터 아래로
for (int i = H - 1; i >= 0; i--)
{
int left = 0;
int right = W - 1;... | ALGO | 0.999827 | 3.542537 | {
"github_metadata": {
"branch": "main",
"commit_count": 212,
"repo_created_at": "2022-08-17T14:34: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": "e1843fed90... |
49dade7e-c151-4627-b79c-02905b37fe0e | AndyHCode/CS2 | Lab 11. Heap/Heap.cpp |
#include "Heap.h"
template < typename DataType, typename KeyType, typename Comparator >
Heap<DataType,KeyType,Comparator>::Heap ( int maxNumber = DEFAULT_MAX_HEAP_SIZE ){
this->maxSize = maxNumber;
this->size = 0;
this->dataItems = new DataType[this->maxSize];
}
template < typename DataType, typename KeyType, typ... | ALGO | 0.944465 | 4.392362 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-05-15T21:58: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": "e4e127a4cfb0... |
4a51ab25-10b7-4776-8234-7069a0ac3377 | Youngwook-Jeon/algorithm-problems-solving | baekjoon/11404.cpp | // https://www.acmicpc.net/problem/11404
// Floyd-Warshall algo, O(V^3)
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int MAX_VALUE = 987654321;
int n, m;
int main() {
ios_base::sync_with_stdio(false);
cout.tie(NULL);
cin.tie(NULL);
cin >> n;
cin >> m;
vector<vecto... | ALGO | 0.999997 | 4.498989 | {
"github_metadata": {
"branch": "main",
"commit_count": 252,
"repo_created_at": "2021-04-22T10:01: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": "1b75da00b9... |
61df4f2e-c3a0-48c2-a445-f2156d053f23 | pa7i3nt/Data-Structure-and-Algorithms-PTIT-2020 | Contest_2-Backtracking_and_Branch-and-Bound/BAI29.cpp | #include <bits/stdc++.h>
using namespace std;
int mat[101][101], m, n, res;
// k: buoc di
void dequy(int i, int j, int k) {
if (i == m - 1 && j == n - 1) {
res++;
return;
}
if (i + 1 < m && mat[i+1][j] == 1) {
dequy(i+1, j, k+1);
}
if (j + 1 < n && mat[i][j+1] == 1) {
... | ALGO | 0.999869 | 4.494916 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2020-05-27T13:47:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce11937e3... |
16d962e9-0a82-4e57-a546-ad3f377cb37f | Aditi4275/C- | Siting_in_bus.C++ | #include <iostream>
#include <set>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
set<int> occupied;
bool valid = true;
... | ALGO | 0.999919 | 5.061452 | {
"github_metadata": {
"branch": "main",
"commit_count": 105,
"repo_created_at": "2024-05-19T15: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": "0415e2cc7c... |
15e2e6ae-f348-462d-98fb-7aa3e233921e | pjotrp/biopp | numcalc/NumCalc/MetaOptimizer.cpp | //
// File: MetaOptimizer.cpp
// Created by: <NAME>
// Created on: Fri Oct 12 16:05 2007
// From file: NewtonBrentMetaOptimizer.cpp
// Created on: Tue Nov 17 17:22 2004
//
//
/*
Copyright or © or Copr. CNRS, (November 17, 2004)
This software is a computer program whose purpose is to provide classes
for phylogenetic ... | ALGO | 0.975028 | 6.552066 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2009-05-22T10:13:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "626e2c7a1c... |
f7929450-9ec3-49f3-b156-33ea5e2caf03 | mitchnull/advent-of-code | aoc-2024/src/main/cpp/19opt/main.cpp | #include <algorithm>
#include <cstdint>
#include <iostream>
#include <iterator>
#include <numeric>
#include <ranges>
#include <sstream>
#include <string>
#include <vector>
using Num = std::uint64_t;
using Strings = std::vector<std::string>;
static bool
startsWith(auto b1, auto e1, auto b2, auto e2) {
while (b1 < e1... | ALGO | 0.999091 | 4.162181 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2024-12-01T21:03: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": "ad9dacbe... |
d40269e0-75c3-4289-82d9-1f0b463e55f2 | the-redback/competitive-programming | solved-codeforces/the_redback/contest/525/c/10468508.cpp | /**
* @author : <NAME>
* @College : CUET CSE 11
* @Topcoder : the_redback
* @CodeForces : the_redback
* @UVA : the_redback
* @link : http://www.fb.com/maruf.2hin
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long l... | ALGO | 0.999896 | 3.555336 | {
"github_metadata": {
"branch": "master",
"commit_count": 207,
"repo_created_at": "2015-05-31T20:55:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7d350b43... |
8589603e-33d2-43c1-9aea-98ab86242368 | alexandraback/datacollection | solutions_2749486_0/C++/comesskywalker/main.cpp | #include <cstring>
#include <fstream>
#include <iostream>
#include <vector>
#include <sstream>
#include <iomanip>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <compl... | ALGO | 0.999963 | 3.942195 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b553a8762... |
6bb841a4-1547-4fcd-895b-aebb87bf607a | ToniPerea/FP-Programming-Base-in-C | Sesion 11/16_instante.cpp | #include <iostream>
#include <cmath>
using namespace std;
class Instante {
private:
int horas, minutos, segundos;
bool Rango_Correcto(double dato, int min, int max){
return dato <= max && dato >= min;
}
public:
Instante(int horas_dadas, int minutos_dados, int segundos_dados)
:horas(horas_dadas... | ALGO | 0.993683 | 4.269425 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-10-25T16:37: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": "c92c8ce1a6... |
f8609fb8-5371-4ed4-85bb-9c44cd642585 | divcs/I-am-neo | I_am_neo/Unit 5/My content/Lec 31/COD/Q4/sol.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int *numbers = new int[100];
int num;
int sum = 0;
double avg = 0.0;
int count = 0;
while (cin >> num && num >= 0)
{
numbers[count] = num;
sum += num;
count++;
}
if (count > 0)
{
avg = static_cast<double>(sum / count);
}
cout... | ALGO | 0.998728 | 5.768761 | {
"github_metadata": {
"branch": "main",
"commit_count": 174,
"repo_created_at": "2024-09-06T18:15: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": "396c09f096... |
e724b3a4-856e-454d-83c3-8571828aead2 | IliaKipshidze/some-graph-problems | task 3.cpp | #include<iostream>
#include<list>
using namespace std;
class Graph {
int V;
int time;
list<int>* d;
list<int>* f;
list<int>* adj;
list<int>* adjT;
public:
Graph(int V);
void addEdge(char u, char p);
void dfsviz(int v, int* visited, int* d, int* f, list<int>* ad);
void DFS();
};
Graph::Graph(int V) {
... | ALGO | 0.999629 | 3.92643 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2022-10-22T12:45: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": "f6685d247a1... |
47fe8511-c999-40c1-9ec5-a280732d0c6a | XueMei-L/SSI_ULL | C-A en GPS/cagps.cpp | #include "cagps.h"
/* Constructor */
CAGPS::CAGPS()
{
int_Vec(Vec_G1);
int_Vec(Vec_G2);
}
/* Destructor */
CAGPS::~CAGPS(){}
/* Iniciar los dos vectores a 1 */
void CAGPS::int_Vec(std::vector<int>& vec)
{
for(int i = 0; i < 10; i++)
{
vec.push_back(1);
}
}
/* Mostrar vector */
void CAG... | ALGO | 0.996673 | 3.37983 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2021-04-06T01:16: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": "30e23d1a619... |
0544e078-28bc-4468-a76d-d39f8abb159c | anishaga/Data-Structures-And-Algorithms | Stacks And Queues/Asssignment/stockSpanTry.cpp | #include <bits/stdc++.h>
using namespace std;
void takeInput(int a[], int n)
{
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
}
void printArray(int a[], int n)
{
for (int i = 0; i < n; i++)
{
cout << a[i] << " ";
}
cout << endl;
}
int main()
{
#ifndef ONLINE_JUDGE
freope... | ALGO | 0.999816 | 4.427163 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-03T11:45: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": "acedba847eb4... |
3b79b3ef-8f1b-4675-b509-17e13f2547c0 | rafaelGuasselli/exercicios | judges/vjudge/topicos_2/fase_0_2/n.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
vector<int> g;
int total;
void loop(vector<int> numeros, int depth, int target) {
if (depth == target) {
vector<int> valores = {0,0,0,0,0};
int soma = 0;
for (int a: numeros) {
valores[a]++;
soma += a;
}
if (soma % 5 != 0) {
ret... | ALGO | 0.999942 | 3.659387 | {
"github_metadata": {
"branch": "main",
"commit_count": 347,
"repo_created_at": "2023-08-12T16:11:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "436787b2b4... |
528a94c1-d52d-4421-80ab-c1c54ab62379 | tinhngovnptho/Code | CP/Code THPT/ONLINE JUDGE/VNOJ/colquery/colquery.cpp | #include <bits/stdc++.h>
using namespace std;
#define el "\n"
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define vi vector<int>
#define fi first
#define se second
#define ALL(v) (v).begin(), (v).end()
#define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i)
#define FORD(... | ALGO | 0.999849 | 4.407343 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-10-13T07:51: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": "318287aaff9... |
c5385bff-80c9-4f1c-a775-a071a97dfcdc | NicoGartmann/Hoema2-Praktika | Praktikum 5/main.cpp | #include "CLotto.h"
#include "CZufall.h"
#include <iostream>
using namespace std;
int main() {
/*vector<int> zettel = { 7,20,33,18,40,1 };
CLotto MyLotto(1);
MyLotto.setSchein(zettel);
cout << "Wahrscheinlichkeit bei 100000 Ziehungen mit einer Ziehung : ";
double p1= MyLotto.MC_eineZiehung(zettel,100000);
c... | TEST | 0.903241 | 3.36041 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-11-09T18:54: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": "a28b96db00... |
e0fe90f0-8639-4057-91d0-a7a87cfc7bf8 | liaochunping/2023_spring_OOP | 新增資料夾/lab/lab3_3.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
// ----------------------
// Please fill this blank
string s;
cin >> s;
for(int i = 0; i <= s.length()-2; i++) {
// int current = int(s[i]) - 48;
// int next = int(s[i+1]) - 48;
// ... | ALGO | 0.999957 | 3.96865 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-22T12:15: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": "e778d957ae18... |
61f11dfa-2c60-402d-9fc4-6ed531f08b95 | czartur/competitive_programming | x_inf473a/td5/h.cpp | #include <bits/stdc++.h>
using namespace std;
#define db(x) cerr << #x << " == " << x << endl
#define dbs(x) cerr << x << endl
#define endl '\n'
typedef long long ll;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1001113;
const int N =1e5+5;
int codify(vector<int> coef, int l){
s... | ALGO | 0.999972 | 4.147657 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2019-06-09T19:47: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": "6d23d6ee3... |
13afd98a-9480-4146-85b4-553d3b6ff28e | BorkaGit/DataBase | DataBase.cpp | #include <iostream>
#include <string>
#include <map>
#include <set>
#include <iomanip>
#include <sstream>
using namespace std;
class Date
{
public:
Date ()
{
year = 0001;
month = 01;
day = 01;
}
Date(int new_year,int new_month,int new_day)
{
year = new_year;
... | TOOL | 0.98057 | 5.044833 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-07-15T18:12: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": "e36ca2bd0a16... |
92f62159-0940-4d3c-86de-01ef9f093105 | harshitntiwari/Algorithms-Solutions | Dynamic Programming/DP_Subsequences/MinimumSubsetSumDiff.cpp | /*
Author: <NAME>
Date: 30-03-2022
https://practice.geeksforgeeks.org/problems/minimum-sum-partition3317/1
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool SubsetSum(vector<int> arr, int Sum, int n, vector<vector<bool>> &dp);
int minSubsetSumDiff(vector<int> arr,int n,int sum);... | ALGO | 0.999932 | 4.520905 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2022-03-30T10:19:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "36fc8fb6c... |
bc0cd73c-f079-41de-bb7f-94927ad04c74 | Somashekhar7984/Coding- | 5_FUNCTIONS_PRATICE/2_pythagorian_triplet.cpp | #include<iostream>
#include<iomanip>
#include<string>
#include<cmath>
using namespace std;
int max(int a,int b,int c){
if(a>b && a>c){
return a;
}
else if(b>c){
return b;
}
else{
return c;
}
}
bool check(int a,int b,int c){
int x = max(a,b,c);
if(x == a){
... | ALGO | 0.963902 | 3.827687 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-10-29T12:59:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62e37bbb458... |
5226d46f-aefd-47c5-9bfd-bffe3ef9ea6a | prantanath/Competitive-Programming | C_Zero-Sum_Prefixes.cpp | //Author: Pranta
//Date: 2022-Nov-12
//Problem: C_Zero-Sum_Prefixes
#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define vout(v) for(int i=0;i<(v).size();i++)cout<<v[i]<<" "
#define arout(v,n) for(int i=0;i<n;i++)cout<<v[i]<<" "
#define inp(a,n) ({ fr(i,0,n)c... | ALGO | 0.999884 | 4.506274 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2022-10-31T21:54: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": "cf45bdf09... |
ebcb6ae5-ed95-408d-aaf4-0665abdb7db0 | veedee2000/Competitive-Programming | Leetcode/_HARD_/String_Manipulation/Pattern_Find/Rabin-Karp/Distant_Echo_Substring.cpp | class Solution {
public:
const int mod = 1e9 + 7;
int distinctEchoSubstrings(string text) {
int n = text.size();
int ans = 0;
unordered_set<int>s;
for(int i = 1;i < n;i++){
long leftHash = 0,rightHash = 0,helper = 1;
int l = i - 1,r = i;
while(... | ALGO | 0.999938 | 5.278108 | {
"github_metadata": {
"branch": "master",
"commit_count": 846,
"repo_created_at": "2019-09-08T19:43: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": "f3481172... |
540e6d2e-2552-430f-b49a-3fbe0c4327d4 | ravidhwn01/BILLSPLITER | rentbill.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
// int t;
// cin>>t;
// while (t--)
// {
float ravi, vikash, yash;
cout << "MONEY GIVEN BY RAVI : " << endl;
cin >> ravi;
cout << "MONEY GIVEN BY VIKASH : " << endl;
cin >> vikash;
cout << "MONEY GIVEN BY YASH : " << endl;
cin >... | ALGO | 0.999741 | 3.466051 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-06-03T13:44:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5a878bb396a5... |
a3c23a84-95c2-4343-88e0-586a360dc65f | eggplantbren/DNest4 | code/Examples/LennardJones/MyModel.cpp | #include "MyModel.h"
#include "DNest4/code/DNest4.h"
using namespace std;
using namespace DNest4;
MyModel::MyModel()
:x(num_atoms)
,y(num_atoms)
,z(num_atoms)
{
// Allocate space for the potential energy values
PE.resize(num_atoms);
for(size_t i=0; i<num_atoms; ++i)
PE[i].resize(num_atoms);
}
voi... | ALGO | 0.99747 | 4.550156 | {
"github_metadata": {
"branch": "master",
"commit_count": 891,
"repo_created_at": "2015-12-09T21:46:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 70,
"forks": 23,
"issues": 9,
"pull_requests": 2
},
"file_meta": {
"content_id": "03a62d... |
72a36fe2-2abf-4472-a21f-c18a74bce58c | ion-beam-breeding/DelMapper | src/Main.cpp | //Copyright (c) 2015 <NAME>, <NAME>, and <NAME>
//
//This file is part of DelMapper.
//
//DelMapper is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//any later version.
//
/... | ALGO | 0.999723 | 3.065179 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2015-11-11T13:21: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": "c2a07f799c... |
4f521799-0b37-407d-9784-ce31b119a5a8 | audemard/glucose | parallel/MultiSolvers.h | /***************************************************************************************[MultiSolvers.h]
Glucose -- Copyright (c) 2009-2014, <NAME>, <NAME>
CRIL - Univ. Artois, France
LRI - Univ. Paris Sud, France (2009-2013)
... | ALGO | 0.943569 | 4.129237 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-05-09T06:55:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 118,
"forks": 20,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "c57c5016... |
f3a5ca2c-04ba-4be3-965d-795c31f11cf2 | parthokr/CSE3202 | lab4/prob1.cc | #include <iostream>
#include <iterator>
#include <sys/types.h>
#include <unistd.h>
using namespace std;
int k = 1;
void tree(int n) { // Creates a process tree
if (n == 0)
return; // We have reached a leaf, so we leave.
int rchild = fork(); // create right child
wait(0);
cout << "Child " << getpid() << " p... | ALGO | 0.998077 | 4.181031 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-10-31T05:54: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": "5e8e701dded5... |
26ef9496-58e6-4d64-a7eb-387769f9b125 | QbitQuantum/Basics | Исходники/ArPosteriorSampler.cpp | void ArPosteriorSampler::draw_phi_univariate() {
int p = model_->phi().size();
Vec phi = model_->phi();
if (!model_->check_stationary(phi)) {
report_error("ArPosteriorSampler::draw_phi_univariate was called with an "
"illegal initial value of phi. That should never happen.");
... | ALGO | 0.994976 | 4.341839 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2024-03-06T07:05: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": "210f62dd82d... |
a7c207cb-c3ed-4100-bd8e-4d17e5d9667c | Tomaaszd/programowanie_C-- | 8_Funkcje/6.cpp |
#include <iostream>
using namespace std;
int GetNumberFromUser() {
int n;
cout << "Podaj liczbe: ";
cin >> n;
return n;
}
unsigned long long CalculateFactorial(int n) {
unsigned long long wynik = 1;
for (int i = 1; i <= n; ++i)
wynik *= i;
return wynik;
}
void DisplayResult(int n... | ALGO | 0.999799 | 5.403498 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-06-29T07:26: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": "dea5abf38503... |
9336c6da-af7f-4a9d-b3c8-4d464549e6ea | drt4243566/leetcode_learn | JianZhi_OFFER/JZ_07.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
#include <stack>
using namespace std;
/**
* Definition for a binary tree node.*/
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
// 重建二叉树,递归解法只适用于二叉树没有重复节点值的情况,实际上一个先序序列的... | ALGO | 0.999999 | 5.850174 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2020-09-15T11:55: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": "7472d5f85... |
b19f114a-0934-4c0e-95e2-0500b844fd95 | TinkerBoard-Android/rockchip-android-device-google-cuttlefish | common/libs/utils/subprocess.h | /*
* Copyright (C) 2018 The Android Open Source Project
*
* 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 app... | TOOL | 0.918146 | 7.783931 | {
"github_metadata": {
"branch": "android12-rockchip",
"commit_count": 17914,
"repo_created_at": "2023-03-06T03:45:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_i... |
38f6cd72-4359-4fcf-a71b-ccd487455057 | nudtchengqing/GPSposition | Pp.cpp | #include "Pp.h"
#include "BiasCorrection.h"
#include"time.h"
#include"matrix.h"
#ifndef _NO_NAMESPACE
using namespace std;
using namespace math;
#define STD std
#else
#define STD
#endif
#ifndef _NO_TEMPLATE
typedef matrix<double> Matrix;
#else
typedef matrix Matrix;
#endif
#ifndef _NO_EXCEPTION
# define TRYBEGIN() ... | ALGO | 0.999171 | 4.981434 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-06-11T12:27:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0a2a3c9782... |
e90ba9cd-0051-4fe1-a374-7811e274ad61 | Benicia2005/DATA-STRUCTURE | 37.cpp | #include <stdio.h>
#define MAX_ROW 100
#define MAX_COL 100
void findRowColSum(int mat[MAX_ROW][MAX_COL], int m, int n) {
for (int i = 0; i < m; i++) {
int rowSum = 0;
for (int j = 0; j < n; j++) {
rowSum += mat[i][j];
}
printf("Row sum %d: %d\n", i + 1, rowSum);
}
... | ALGO | 0.999859 | 4.295575 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-11-27T03:48: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": "e4160219ddc5... |
44e53b09-9f62-4dea-a5f6-a97a4d915406 | cbwood/algorithm | leetcode/leetcode-139.cpp | /*
*@File Name :leetcode-139.cpp
*@Author :cc
*@Version :1.0.0
*@Date :2022/8/5 9:40
*@Description :
*@Function List :
*@History :
*/
#include "set"
#include "string"
#include "vector"
using namespace std;
class Solution {
public:
bool wo... | ALGO | 0.998243 | 5.795815 | {
"github_metadata": {
"branch": "main",
"commit_count": 123,
"repo_created_at": "2021-09-13T02:43: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": "f847bd6dd2... |
c5b1d27c-eda1-448d-b434-626f6b15fe6a | AkashSingh3031/The-Complete-FAANG-Preparation | 1]. DSA + CP/2]. Competitive Programming/08]. Work@Tech/2]. Data Structures & Algorithms/1]. Topics/02]. Searching/1]. Easy/05]. Insert Position in Sorted Array.cpp | /*
Example-1:
Array: [1, 2, 3, 4, 5]
Number: 3
Answer: 2
Example-2:
Array: [1, 2, 3, 5]
Number: 4
Answer: 3
Example-3:
Array: [1, 2, 3, 4, 5]
Number: -100
Answer: 0
Example-4:
Array: [1, 2, 3, 4, 5]
Number: 6
Answer: 5
*/
int indx;
int findIndex (vector<int> &arr, int... | ALGO | 0.99999 | 5.48522 | {
"github_metadata": {
"branch": "master",
"commit_count": 1827,
"repo_created_at": "2021-05-29T04:41:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11343,
"forks": 2526,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "... |
c6507ffa-adf4-41f7-a97c-e3af78de6eb4 | m2osw/snapcpp-archive | snapwebsites/libsnapwebsites/src/snapwebsites/snap_config.h | // Snap Websites Server -- configuration reader
// Copyright (c) 2011-2019 Made to Order Software Corp. All Rights Reserved
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version... | TOOL | 0.931813 | 6.657243 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-07-12T15:30:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e11be0ee4bb... |
3c7c8939-2d91-4e90-abba-95e68d472b2c | Mu-L/TracerInteractiveUE4Plugins | Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Collision/SpatialAccelerationCollisionDetector.h | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Chaos/Collision/CollisionDetector.h"
#include "Chaos/Collision/CollisionContext.h"
#include "Chaos/Collision/CollisionReceiver.h"
#include "Chaos/Collision/NarrowPhase.h"
#include "Chaos/Collision/SpatialAccelerationBroadPhase.h"
#include "Chaos... | ALGO | 0.925071 | 7.308801 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2020-03-24T02:30:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 11,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "d385299... |
32f5d094-bddf-4602-a592-6194d7dd891e | tahayildiz1/development | C++/Fitness-Club-Gebührenberechnung.cpp | #include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int jahre, mitglieder;
double kosten = 40, prozent = 1;
cout << "Fitnessstudio Beitragsrechner" << endl;
cout << "Wie lang sind bist du schon Mitglied? " << endl;
cin >> jahre;
cout << "Wie viele Familienmitglieder sind angemeldet? " << ... | ALGO | 0.956437 | 3.365067 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2023-09-10T17:07:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3da672ddcda... |
3178176f-dcc4-4adc-9899-2b7e5e056ddd | chroniclesofcode/competitive-programming | codeforces/1863B-Split_Sort.cpp | #include <bits/stdc++.h>
using namespace std;
#define MAINRET(x) in##x
#define what_is(x) cout << #x << " is " << x << endl;
#define LL long long
#define arr array<int,2>
void solve();
MAINRET(t) main(void) {
std::cin.tie(nullptr);
std::cin.sync_with_stdio(false);
LL t;
cin >> t;
while (t--)
... | ALGO | 0.999972 | 4.640311 | {
"github_metadata": {
"branch": "main",
"commit_count": 822,
"repo_created_at": "2022-09-09T05:32: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": "04d6ffb99c... |
83735b1f-ae17-4a17-bfdd-37137af90bad | SerCharles/CLearning | Practise/进制/进制/进制/高精度.cpp | /*#pragma warning(disable:4996)
#include<stdio.h>
#include<stdlib.h>
int n,anslen;
int multi[60][110] = { 0 }, length[60] = { 0 }, answer[110] = { 0 };
void multiply(int num,int len)
{
int i,temp;
for (i = 1; i<= len+1; i++)
{
temp = multi[num - 1][i] * num+ multi[num][i];
multi[num][i] = temp% 10; ... | ALGO | 0.999972 | 3.502712 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-05-25T16:28: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": "7caf76b5e5... |
148d5e57-2988-4673-8466-f00c81f84172 | arulkolla/competitive-programming | codeforces/1695/C.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAX = 200007;
const int MOD = 1000000007;
void solve() {
int n, m;
cin >> n >> m;
int a[n + 1][m + 1];
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
}
}
if ((n + m) % 2 == 0) {cout << "NO\n"; return;}
int dpmin[n +... | ALGO | 0.99995 | 3.977772 | {
"github_metadata": {
"branch": "master",
"commit_count": 849,
"repo_created_at": "2021-01-12T05:23:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "febd47b0... |
4ff2f666-269e-497c-936b-c66c34f1fbea | surya3214/coding | CodeChef/PTMSSNG.cpp | // NA
#include <bits/stdc++.h>
#define BUFFER 5
#define BUFF(x) x + BUFFER
#define mp make_pair
// #pragma GCC optimize "O4"
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int, int> pii;
typedef pair<string, int> psi;
bool m_comp(pii a, pii b) {
if (a.first == b.first)... | ALGO | 0.999902 | 4.072248 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2017-11-09T17:29: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": "cf88d6800... |
d3516f17-6688-4ca3-8679-a0dbd6ece4c8 | Aphrodicez/POSN | POSN17/Camp2/Sewer-TOI7.cpp | /*
Author : ~Aphrodicez
School : RYW
Lang : CPP
Algo : Breadth First Search
Status : Accepted
*/
#include <bits/stdc++.h>
using namespace std;
void setIO();
struct A{
int i, j;
};
const int R = 1e2 + 10;
const int C = 1e2 + 10;
int dis[R][C];
vector <A> g[R][C];
queue <A> qu;
void s... | ALGO | 0.999931 | 3.79234 | {
"github_metadata": {
"branch": "master",
"commit_count": 270,
"repo_created_at": "2020-11-21T02:11:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e09cbee7... |
25fd5436-cd96-4dfb-aa61-6d9263ddcd04 | R-Cramer4/AdventOfCode | Advent2024/day21/main.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
string codes[5];
char keyPad[4][3] = {
{'7', '8', '9'},
{'4', '5', '6'},
{'1', '2', '3'},
{0, '0', 'A'}
};
pair<int, int> keys[12] = {
{3, 1}, {2, 0}, {2, 1}, {2, 2},
{1, 0}, {1, 1}, {1, 2},
{0, 0}, {0, 1}, {0, 2}... | ALGO | 0.999498 | 3.926528 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2023-12-01T16:45: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": "f8b4782810f... |
a1d1e94f-d975-45e4-a13d-8e006f0634a1 | Saket6198/DSA-Leetcode | Leetcode/BS/single_element_sorted.cpp | /* 540. Single Element in a Sorted Array
Solved
Medium
Topics
premium lock icon
Companies
You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once.
Return the single element that appears only once.
Your solution must run in ... | ALGO | 0.99992 | 5.805677 | {
"github_metadata": {
"branch": "main",
"commit_count": 803,
"repo_created_at": "2023-11-10T08:51:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d45736231... |
fb80e0d7-3939-425a-b81b-b3451afa5d9e | filipeabelha/gym-solutions | imepp/h4/b.cpp | #include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define cl(x, v) memset((x), (v), sizeof(x))
#define db(x) cerr << #x << " == " << x << endl
#define dbs(x) cerr << x << endl
#define _ << ", " <<
#define gcd(x, y) __gcd((x), (y))
typedef long l... | ALGO | 0.999607 | 4.672539 | {
"github_metadata": {
"branch": "master",
"commit_count": 1023,
"repo_created_at": "2017-03-27T00:56: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": "54e4049... |
221be02c-61b5-4688-93b0-415bcc76ef76 | CTMObservatory/CTMO_AutoDome | StateMachine.ino | //DOME CALIBRATION- State Machine
# define BUFFER_SIZE 8
enum States
{
IDLE_STATE,
CALIBRATION_STATE,
END_CALIBRATION_STATE,
MOTOR_TURNING_STATE,
END_MOTOR_TURNING_STATE
};
typedef struct
{
int ldrPin;
int count;
bool lastState;
char counterName;
}SensorInfo;
typedef struct
{
float startingRe... | TOOL | 0.939113 | 5.904833 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-08-06T19:39:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ef1a62274c... |
0bb140f7-2ee2-4b4c-832b-79dfdee5c45d | joonas-yoon/PS | BOJ/2568.cpp | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
typedef tuple<int, int, int> iii;
vector<ii> LIS(vector<ii>& a) {
int n = a.size();
vector<ii> v(1, a[0]);
vector<int> index(n, 0);
for (int i = 1; i < n; ++i) {
if (a[i].first > v.back().first) {
index[i] = v.size();
v.push_back(a[i... | ALGO | 0.999991 | 3.906162 | {
"github_metadata": {
"branch": "master",
"commit_count": 169,
"repo_created_at": "2017-07-03T12:24:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "67960491... |
59f90b77-78bf-4760-960f-4a1705c62550 | miracle2k/android-platform_sdk | emulator/qtools/read_method.cpp | #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <inttypes.h>
#include "trace_reader.h"
#include "parse_options.h"
typedef TraceReader<> TraceReaderType;
#include "parse_options-inl.h"
struct frame {
uint64_t time;
uint32_t addr;
const char *name;
bool isNative;
... | TOOL | 0.941321 | 5.386076 | {
"github_metadata": {
"branch": "master",
"commit_count": 5875,
"repo_created_at": "2011-02-28T02:37:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 68,
"forks": 105,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "b01d... |
33e446d1-e8d6-4045-9e0d-fa184342a4cf | gustavbarbosaa/quicksort | main.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int particionarVetor(int vetor[], int inicio, int fim) {
int esquerda, direita, pivo, auxiliar;
esquerda = inicio;
direita = fim;
pivo = vetor[inicio];
while (esquerda < direita) {
while (esquerda <= fim && vetor[esquerd... | ALGO | 0.999946 | 5.616965 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-12-08T22:57: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": "30fc9ce8cd26... |
a9220665-a64c-457c-8e88-e208bcec13e8 | stellarscience/dakota-stellar | src/SensAnalysisGlobal.cpp | /* _______________________________________________________________________
DAKOTA: Design Analysis Kit for Optimization and Terascale Applications
Copyright 2014-2020
National Technology & Engineering Solutions of Sandia, LLC (NTESS).
This software is distributed under the GNU Lesser General Public Li... | ALGO | 0.995586 | 6.267979 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-10-03T21:33:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20f5fe4f515... |
9fd9a502-a7a3-4241-8937-6748d8db7f9c | dev-vikash2v7/DSA-with-LeetCode-in-CPlus | Non-linear DS/Graph/graph ttraversal/BFS_Traversal.c++ | #include <bits/stdc++.h>
using namespace std;
class Graph{
private :
int n_vertices ;
vector<list<int>>graph ;
public:
Graph(int n ) : n_vertices(n) {
graph.resize(n);
}
void addEdge(int u , int v){
graph[u].push_back(v);
}
... | ALGO | 0.99994 | 5.560819 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-08-06T16:21:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1ac19bca8f0... |
c5e327bf-782c-4758-83d6-9126cb544869 | LadybirdBrowser/ladybird | Libraries/LibCore/ConfigFile.cpp | /*
* Copyright (c) 2018-2020, <NAME> <<EMAIL>>
* Copyright (c) 2021, networkException <<EMAIL>>
* Copyright (c) 2022, <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/LexicalPath.h>
#include <AK/StringBuilder.h>
#include <LibCore/ConfigFile.h>
#include <LibCore/Directory.h>
#include <Li... | TOOL | 0.979417 | 7.44361 | {
"github_metadata": {
"branch": "master",
"commit_count": 70489,
"repo_created_at": "2024-05-30T09:18:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 45588,
"forks": 1949,
"issues": 457,
"pull_requests": 50
},
"file_meta": {
"content_id"... |
64a35104-ed98-4166-8980-a53a19b2c526 | kashishkebab9/icp_slam | src/icp_node/src/solver.cpp | #include "ros/ros.h"
#include <sensor_msgs/LaserScan.h>
#include <vector>
#include <cmath>
#include <utility>
#include <visualization_msgs/Marker.h>
class Solver{
private:
//Both target and source vecs will contain inf values if that is what is recorded
std::vector<float> source_vec;
std::vector<float> t... | TOOL | 0.973826 | 4.991363 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2022-10-02T03:02: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": "6a880de661... |
0a7e1ccf-30ed-4dab-9100-1f749f1c41e4 | innocence-wuhan/SpecificStructure | Queue/LInkQueue.cpp | #include<iostream>
using namespace std;
template<typename T>
struct LinkNode
{
T data;
LinkNode<T> *next;
LinkNode(T d):data(d),next(NULL){};
LinkNode():next(NULL){};
};
template<typename T>
struct LinkQueue
{
LinkNode<T> *front,*rear;
LinkQueue()
{
front=NULL;
rear=NULL;
... | ALGO | 0.996549 | 3.8016 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-07-12T06: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": "5765dd3201c6... |
749ada04-9311-4ff6-9ef5-8995d1b37132 | loypt/leetcode | N3097-Shortest-Subarray-With-OR-at-Least-K-II/solution1.cpp | class Solution {
private:
void update(vector<int>& bits, int x, int change) {
for (int i = 0; i < 32; i++) {
if ((x >> i) & 1) {
bits[i] += change;
}
}
}
int bitsToNum(vector<int>& bits) {
int result = 0;
for (int i = 0; i < 32; i+... | ALGO | 0.999989 | 6.031851 | {
"github_metadata": {
"branch": "master",
"commit_count": 1063,
"repo_created_at": "2022-01-24T13:41:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "2fa8353d... |
dbdee2cc-34c7-4df3-b26d-a49acecfffad | kamyu104/LeetCode-Solutions | C++/longest-chunked-palindrome-decomposition.cpp | // Time: O(n)
// Space: O(1)
// Rabin-Karp Algorithm
class Solution {
public:
int longestDecomposition(string text) {
static const uint64_t MOD = 1e9 + 7;
static const uint64_t D = 26;
int result = 0;
int left = 0, right = 0, l = 0;
uint64_t pow_D = 1;
for (int i ... | ALGO | 0.999966 | 5.240744 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
91578443-dd37-47e0-b17c-9ca438933bcf | lala-ju/Snake-Control | src/CustomController.cpp | #include "CustomController.h"
DirectionType CustomController::NextDirection(const Game& game, size_t id) {
const auto& snake = game.Snakes().at(id);
if(game.Snakes().size() == 1){
_dirSymbol = AngleToSymbol(snake.Direction()) ;
if(FrontWallDistance(snake.Head(), _dirSymbol, game.FieldWidth(), g... | TOOL | 0.937427 | 4.514695 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-03-04T02:48: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": "c0604a54c93c... |
460296f1-cfc1-482f-bef4-e586ca18376c | zdev128/dsa | data_structures/linked_lists/doubly_linked_list/doubly_linked_list.h | #include <iostream>
/*
--DOUBLY LINKED LIST--
Fundamental Principles:
- node based DS
- NODE stores three pieces of info
1. some data
2. pointer to previous NODE
3. pointer to next NODE
Functions:
- insertion:
- prepend
- a... | ALGO | 0.996668 | 6.285879 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-11-03T09:16: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": "d47d00a11b9e... |
fc3f3218-2173-4693-a9b4-4bbef83e9bef | rupali-12/Leetcode-Problems | 0138-copy-list-with-random-pointer/0138-copy-list-with-random-pointer.cpp | /*
// Definition for a Node.
class Node {
public:
int val;
Node* next;
Node* random;
Node(int _val) {
val = _val;
next = NULL;
random = NULL;
}
};
*/
class Solution {
public:
void insertAtTail(Node* &cloneHead, Node* &cloneTail, int data){
Node* temp= new ... | ALGO | 0.998003 | 5.644574 | {
"github_metadata": {
"branch": "main",
"commit_count": 3655,
"repo_created_at": "2023-01-20T11:55:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "66a993c06... |
86179774-a7e0-4775-a564-1e74904d167a | DuyDanga/Ma_Tran | matrix/Bai_157/Bai_157.cpp | #include<iostream>
#include<iomanip>
#include<ctime>
#include<cstdlib>
using namespace std;
void Nhap(float[][10], int&, int&);
void Xuat(float[][10], int, int);
void DichTraiDong(float[][10], int, int, int);
void DichTrai(float[][10], int, int);
int main()
{
float a[10][10];
int n, m;
Nhap(a, n, m);
Xuat(a, n, ... | ALGO | 0.994204 | 3.192757 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-11-09T15:32: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": "990dd9b8c499... |
940aa8fb-0bf0-445e-8f34-2734307758c3 | francisconassif/MAC0214---Extracurricular-Activities-2024.2- | Assuntos/DFS/ItsthePolice.cpp | /*
It's the police - Source: https://codeforces.com/gym/101149/problem/I
*/
#include <bits/stdc++.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#define f first
#define s second
#define pb push_back
#define dbg(x) cout << #x << " = " << x << endl
#define FOR(i, a, n) for... | ALGO | 0.999983 | 3.447849 | {
"github_metadata": {
"branch": "main",
"commit_count": 190,
"repo_created_at": "2024-08-27T17:39: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": "fdcb9048c6... |
6f273e55-9d44-4252-919f-780995893482 | alisw/AliRoot | TEvtGen/EvtGen/EvtGenModels/EvtItgSimpsonIntegrator.hh | //--------------------------------------------------------------------------
//
//
// Copyright Information: See EvtGen/COPYRIGHT
//
// Environment:
// This software is part of the EvtGen package developed jointly
// for the BaBar and CLEO collaborations. If you use all or part
// of it, please give an ... | ALGO | 0.996677 | 6.027567 | {
"github_metadata": {
"branch": "master",
"commit_count": 74535,
"repo_created_at": "2016-03-07T09:20:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 57,
"forks": 256,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "d569... |
9c0a08b9-4123-4de6-93de-52362358d705 | yatharth230703/DSA-Practice- | 21-06-2025/Check if a tree is a BST or not.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int data;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int val) : data(val) , left(nullptr) , right(nullptr) {}
* };
**/
class Solution{
public:
void helper(TreeNode*root , pair<int,int> p , bool &ans){
if(r... | ALGO | 0.999986 | 5.535504 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2025-03-17T18:01: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": "8df13f800bf... |
dbf9b893-3687-4b48-a04f-0ff6911786a6 | Surya00/Codeforces | spoj/apac16E01.cpp | #include <bits/stdc++.h>
using namespace std ;
#define ll long long int
#define inf INT_MAX
#define mp make_pair
ll countB(string s){
ll cou=0;
for (int i = 0; i < s.length(); ++i)
{
if(s[i]=='B'){ cou++;}
}
return cou;
}
int main()
{
ll t;
cin>>t;
for (int u = 0; u < t; u++)
{
string s;
cin>>s;... | ALGO | 0.999852 | 3.859839 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-04-09T09:38: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": "bcabfd577... |
f4116dea-e719-44b2-ad91-4259547795a6 | shinesssss/Strivers-SDE-Sheet-Challenge | implement_trie.c++ | /*
Your Trie object will be instantiated and called as such:
Trie* obj = new Trie();
obj->insert(word);
bool check2 = obj->search(word);
bool check3 = obj->startsWith(prefix);
*/
struct node{
node *ar[26];
bool flag=false;
bool check(char ch,node* temp){
return (ar[ch-'a']!=NUL... | ALGO | 0.999774 | 5.625963 | {
"github_metadata": {
"branch": "main",
"commit_count": 91,
"repo_created_at": "2023-06-04T15:27: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": "69cd697a83e... |
548e0670-ac03-4a28-9236-838ad4ebfe12 | inder128/CompetitiveProgramming | CodeChef/LONG-OCT20/G.cpp | #include <bits/stdc++.h>
using namespace std;
#define rng(x) x.begin(), x.end()
#define pb push_back
#define F first
#define S second
#define el '\n'
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
return os << "(" << P.F << "," << P.S << ")"; }
template<class T> ostream& operator<<(ost... | ALGO | 0.999985 | 3.574529 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2020-08-09T00:35:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb580c652... |
4ae52c3e-0cd3-4cb6-9770-1d851c624317 | guohaoyu110/Algorithm | AcWing_cpp/845. 八数码(BFS).cpp | #include <iostream>
#include <cstring>
#include <algorithm>
#include <queue>
#include <unordered_map>
using namespace std;
//这道题目求最短相关的问题,明显用BFS来做
//至少经过多少次交换能够把x换到最右下角的位置
//思考:如何记录每个状态的距离,距离数组的坐标如何表示
//distance可以用C++里的哈希表,java或者python里的字典,就可以存了。
int bfs(string start){
string end = "12345678x";
queue<string>q;/... | ALGO | 0.99988 | 3.816992 | {
"github_metadata": {
"branch": "master",
"commit_count": 207,
"repo_created_at": "2019-01-08T09:29:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2729af0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.