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 |
|---|---|---|---|---|---|---|---|
1714d006-b686-47dd-936b-a35f360ac196 | bben-aou/ft_irc | Parser/parser.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parser.cpp :+: :+: :+: ... | WEB | 0.915162 | 3.295393 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-01-29T09:05: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": "eff405b2b09... |
79654563-df35-4691-a669-dd549d84f7a6 | ishandutta2007/codeforces-e | egor.lifar/normal/768/A.cpp | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#include <cassert>
#... | ALGO | 0.999981 | 3.90297 | {
"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": "e9b208cffabd... |
e3855cba-126a-423f-972e-3cb4e1892393 | rishi058/CP-DSA | GRAPH & TREE/18_DSU.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define tuple array<int, 3>
#define all(v) v.begin(), v.end()
#define F(a,b,i) for (int i = a; i < b; i++)
#define Rev(a,b,i) for (int i = a; i >= b; i--)
#define RISHI ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
template <typename dStruct>
... | ALGO | 0.999273 | 5.171762 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2023-04-18T16:12: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": "44d4f71cf7c... |
cec7af09-1129-4b90-807c-e324cf0d4910 | fancyspeed/semi-lda | cpp/src/common.cc | // Copyright 2008 Google 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 in... | TEST | 0.935489 | 6.559266 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2014-07-19T16:27:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19ec9df2... |
1bcf18c3-99e1-4088-80c7-ef83be0ad6b2 | gtkn/atcoder | ABC_264_C_2.cpp | //title
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
#define rep(i,n) for (ll i = 0; i < (n); ++i)
#define rep1(i,n) for (ll i = 1; i <= (n); ++i)
#define repr(i,n) for (ll i = (n)-1; i >= 0; --i)
#define rep1r(i,n) for (ll i = (n); i > 0; --i)
#define bit(n,k) ((n>>... | ALGO | 0.999428 | 3.55776 | {
"github_metadata": {
"branch": "main",
"commit_count": 421,
"repo_created_at": "2022-03-15T05:19: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": "fee0649b1a... |
f8fa21f0-9b23-419c-8e0b-51ad4ad373f3 | Jiaoyang-Li/MAPF-LNS2 | inc/InitLNS.h | #pragma once
#include "BasicLNS.h"
enum init_destroy_heuristic { TARGET_BASED, COLLISION_BASED, RANDOM_BASED, INIT_COUNT };
class InitLNS : public BasicLNS
{
public:
vector<Agent>& agents;
int num_of_colliding_pairs = 0;
InitLNS(const Instance& instance, vector<Agent>& agents, double time_limit,
... | ALGO | 0.997957 | 5.22657 | {
"github_metadata": {
"branch": "init-LNS",
"commit_count": 123,
"repo_created_at": "2021-12-27T19:33:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 87,
"forks": 38,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "2be1... |
0fbcff27-1b8d-48c6-a18b-fd8b1aba96f4 | cerebropine/DSA | Arrays/first_missing_postive.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
int firstMissingPositive(vector<int>& nums) {
//make all elements which are negative and zeros to a value greater than nums.size()
for(int i=0;i<nums.size();i++){
if(nums.at(i)<=0) nums.at(i)=nums.size()+1;
}
... | ALGO | 0.999947 | 4.59807 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2021-07-05T06:06: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": "1c7bf42c89... |
b93c1804-4bd7-466b-a1fc-d3319d8be768 | tramphero/kaldi | src/matrix/kaldi-gpsr.h | // matrix/kaldi-gpsr.h
// Copyright 2012 <NAME>
// See ../../COPYING for clarification regarding multiple authors
//
// 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.apac... | ALGO | 0.998757 | 7.055206 | {
"github_metadata": {
"branch": "master",
"commit_count": 8053,
"repo_created_at": "2018-05-21T08:22:32.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "kaldi-asr/kaldi",
"stars": 723,
"forks": 239,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"conte... |
2f1fd4fd-b839-44ce-a1b1-60817f00f127 | lazyXghost/Coding | ExtraStuff/Gfg/Problems/sorting/pos_triangles.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
//Function to count the number of possible triangles.
int findNumberOfTriangles(int a[], int n)
{
sort(a, a + n);
int count = 0;
for (int i = 0; i < n - 2; i++)
... | ALGO | 0.999862 | 5.854381 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2021-07-31T07:05:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71577c67eba... |
4c11aef3-484e-4ff2-930b-1f7f25e58303 | ishandutta2007/codeforces-a | alexluchianov/normal/956/A.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using ll = long long;
int const nmax = 100;
std::vector<int> g[1 + 2 * nmax];
int edge[1 + nmax][1 + nmax];
int seen[1 + nmax];
void dfs(int node, std::vector<int> &aux) {
seen[node] = 1;
aux.push_back(node);
for(int h = 0; h < g[node].size(); h++) {
... | ALGO | 0.999983 | 4.635342 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51: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": "4ee2f09a4f77... |
a4b48234-fb26-4475-93d5-7d683bc43a8b | Priyanshu4650/DSA | Arrays, Strings[3]/search in sorted 2d matrix.cpp | #include <bits/stdc++.h>
using namespace std;
/*
Method 1 :-> First and foremost way is to just go through the matrix and then check with time complexity of O(n*2)
Method 2 :-> The better approach is to go through the all the rows and check whether the target element falls in the row and check in the row
M... | ALGO | 0.999977 | 6.039763 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-05-16T09:27: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": "216385319f09... |
6a0ee9ca-ff1a-41ec-af9c-1a1f2e7557e5 | cea-trust-platform/TrioCFD-code | src/Multiphase/CMFD/ThHyd/Multiphase/Correlations/Coalescence_bulles_1groupe_Yao_Morel.h | /****************************************************************************
* Copyright (c) 2022, CEA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retai... | ALGO | 0.996511 | 5.631425 | {
"github_metadata": {
"branch": "master",
"commit_count": 3963,
"repo_created_at": "2021-09-16T13:09:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 42,
"forks": 14,
"issues": 2,
"pull_requests": 3
},
"file_meta": {
"content_id": "8012e7... |
74c13311-3fe9-451d-b2a2-d3ce93b99c2b | chucai2000/cpp_practice | interview/rebuild_binary_tree_from_transverse.h | #include "common.h"
namespace rebuild_binary_tree_from_transverse {
struct Node{
int val;
Node *left;
Node *right;
Node(): val(0), left(nullptr), right(nullptr)
{}
Node(int val): val(val), left(nullptr), right(nullptr)
{}
~Node() {
if (!left) {
delete left;
... | ALGO | 0.999902 | 5.335618 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-11-24T19:59: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": "0b307c4a87... |
23c78787-9034-4b40-8b42-e6c69229f941 | samindaa/RLLib | simulation/PoleBalancing.h | /*
* Copyright 2015 <NAME> (<EMAIL>)
*
* 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 agree... | ALGO | 0.999443 | 5.156831 | {
"github_metadata": {
"branch": "master",
"commit_count": 321,
"repo_created_at": "2012-08-22T06:55:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 203,
"forks": 51,
"issues": 12,
"pull_requests": 1
},
"file_meta": {
"content_id": "07ad... |
a018d33d-0d42-4709-bf80-f6c75c8ffb21 | TaylonCosta/AutomatoCelular_aeds1 | automato.cpp | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
using namespace std;
void ImprimeVetor (char vetor[], char tamanho)
{
int n;
for (n=0; n<tamanho; n++)
if(vetor[n]==1)
cout<<"*";
else if (vetor[n]!=1)
cout<<" ";
cout<<"\n";
}
void Copi... | ALGO | 0.998054 | 3.758682 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-03-25T13:56: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": "d06459f258... |
36ca1a41-ee46-47af-a463-06df75680050 | rewted/ICPC | practice/seven_wonders.cpp | #include <iostream>
#include <string>
int min (int a, int b, int c) {
if (a <= b && a <= c) {
return a;
}
if (b <= a && b <= c) {
return b;
}
return c;
}
using namespace std;
int main () {
string s;
cin >> s;
int t = 0;
int c = 0;
int g = 0;
for (auto x : s) {
if (x == 'T') {
... | ALGO | 0.999586 | 3.811701 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2018-09-15T18:31:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af1ed5ee4... |
f5cda5f7-f026-4939-a15e-73e8811b23e2 | Soumik-HasanSMK/Phitron | CPP/Data Structure/Module 10.5 Practice Day 01(Doubly LL)/problem_04.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int val;
Node *next;
Node *prev;
Node(int val)
{
this->val = val;
this->next = NULL;
this->prev = NULL;
}
};
void insert_tail(Node *&head, Node *&tail, int val)
{
Node *newNode = new Node(val);
if ... | ALGO | 0.99988 | 4.567045 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-09-04T18:36: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": "9a2523858eb1... |
7cdac569-665d-4534-908b-6fc9b1e55ba2 | JackeyLove1/Leetcode | leetcode/leetcode1219.cpp | #include <unordered_map>
#include <map>
#include <iostream>
#include <vector>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <queue>
#include <sstream>
#include <numeric>
// #pragma GCC optimize(2)
using namespace std;
inline void fhj() {
ios::sync_with_std... | ALGO | 0.999892 | 5.261727 | {
"github_metadata": {
"branch": "master",
"commit_count": 547,
"repo_created_at": "2020-08-14T01:48:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1267a671... |
69700f51-8f96-4ac6-bb0b-cf16c19d844a | tasimba/assignment-3 | classPolicies.h | /*
* name: <NAME>
* date: 10 May 2014
* policy class for the program . characterizes behaviour of the class / class object
*
*/
#ifndef CRYPTSPOLICIES_H_
#define CRYPTSPOLICIES_H_
#include "classTraits.h"
#include "CryptoMachine.h"
#include "types.h"
#include <iterator>
#include <algorithm>
#include <cctype>
#include ... | TOOL | 0.919395 | 4.426588 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2014-05-14T03:54: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": "015c47ba54... |
e101fe74-d867-4d5c-a4cf-93d8e4d6891e | lty0829/pat_practice | A+B Format/1024.cpp | /*#include<iostream>
#include<string>
using namespace std;
string N;
int K;
bool isre(string a) {
for (int i = 0;i < a.size() / 2;i++) {
if (a[i] != a[a.size() - 1 - i]) {
return false;
}
}
return true;
}
int main() {
int i,compare=0;
cin >> N >> K;
string a = N;
string a1 = a;
for (i = 0;i < K;i++) {
... | ALGO | 0.999878 | 3.545922 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-07-16T05:21: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": "592b26c2ef... |
e71151e5-b209-4e6a-aba1-1302203116f3 | syedtaha22/Intro-to-Programming-CPP | Lab_Solutions/Lab4/Task2.cpp | /*
Task 2:
Write a C++ program that uses a `for` loop to calculate and display the sum of all even numbers between 1 and a positive integer N entered by the user.
*/
// Include the iostream library
#include <iostream>
// main function
int main() {
// Declare a variable to store the user's input
in... | ALGO | 0.999324 | 5.613947 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2024-08-20T17:20:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "552201c48a6... |
bf814f53-417c-49ad-86b6-9fd38595d16f | MicrosoftDocs/cpp-docs | docs/parallel/concrt/codesnippet/CPP/creating-asynchronous-operations-in-cpp-for-windows-store-apps_3.cpp | // PrimesLibrary.cpp
#include "pch.h"
#include "Primes.h"
#include <atomic>
#include <collection.h>
#include <ppltasks.h>
#include <concurrent_vector.h>
using namespace concurrency;
using namespace std;
using namespace Platform;
using namespace Platform::Collections;
using namespace Windows::Foundation;
using namespa... | ALGO | 0.998747 | 7.207701 | {
"github_metadata": {
"branch": "main",
"commit_count": 20472,
"repo_created_at": "2016-11-14T19:38:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1539,
"forks": 968,
"issues": 0,
"pull_requests": 50
},
"file_meta": {
"content_id": "724... |
e02aaab1-d2f6-429d-bc80-28ed961296ae | j42xiong/Competitive-Programming | DMOJ/DMOPC '18 Contest 3 P4 - Bob and English Class/DMOPC '18 Contest 3 P4 - Bob and English Class/main.cpp | #include <bits/stdc++.h>
using namespace std;
#define scan(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0)
char _;
#define pb push_back
#define MOD 1000000007
#define MAXN 1000
#define INF 0x3f3f3f3f
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef ... | ALGO | 0.999986 | 3.870702 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2019-07-26T21:48: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": "51d509662... |
1570d4d4-978f-4098-bef4-b9ac4469a42a | yyamada12/atCoder | agc/8_a.cpp | #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
#define REP(i,n) for(int i = 0; i < n; i++)
#define RREP(i,n) for(int i = n - 1; i >= 0; i--)
#define ALL(v) v.begin()... | ALGO | 0.999927 | 3.652886 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2019-04-23T21:13: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": "b85a51429... |
a377e2f0-082d-4651-8a73-f7df1a6c4f3d | anroysko/contestlib | src/datastruct/seg/tester.cpp | #include <iostream>
#include <fstream>
#include <random>
#include <chrono>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
// rand-function that works properly on windows, and is faster than rand
// https://codeforces.com/blog/entry/61587
mt19937 rng(chrono::steady_clock::now().time_s... | ALGO | 0.947521 | 4.464916 | {
"github_metadata": {
"branch": "master",
"commit_count": 267,
"repo_created_at": "2018-06-25T20:12:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "a93e1f9... |
5109771d-dfa4-4836-9836-a17181b8c3a8 | mrapp-ke/MLRL-Boomer | cpp/subprojects/common/src/mlrl/common/sampling/instance_sampling_with_replacement.cpp | #include "mlrl/common/sampling/instance_sampling_with_replacement.hpp"
#include "mlrl/common/sampling/partition_bi.hpp"
#include "mlrl/common/sampling/partition_single.hpp"
#include "mlrl/common/sampling/weight_vector_dense.hpp"
#include "mlrl/common/util/math.hpp"
#include "mlrl/common/util/validation.hpp"
template<... | TOOL | 0.976041 | 7.613595 | {
"github_metadata": {
"branch": "main",
"commit_count": 16103,
"repo_created_at": "2019-10-17T12:08:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 2,
"pull_requests": 2
},
"file_meta": {
"content_id": "61f3de30... |
2e76bfc2-88c5-4487-883a-47ac565406ce | neoneww/Solutions | 445-B.cpp | ////---https://codeforces.com/problemset/problem/445/B------///
#include<bits/stdc++.h>
#define pb push_back
#define ll long long
#define vi vector<int>
using namespace std;
vi adj[1000000];ll visited[1000000];
long long binpow(long long a, long long b) { //binary exponiation
long long res = 1;
whi... | ALGO | 0.999979 | 3.921091 | {
"github_metadata": {
"branch": "master",
"commit_count": 84,
"repo_created_at": "2020-05-10T10:47:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ee06d5ce... |
8f2f66ae-efd3-4849-a87f-f841c0d71917 | Antstein1651/hw3ecs34 | proj3/src/StringUtils.cpp | #include "StringUtils.h"
#include <algorithm>
#include <cctype>
#include <sstream>
namespace StringUtils {
std::string Slice(const std::string &str, ssize_t start, ssize_t end) noexcept {
if (end == 0) end = str.size();
if (start < 0) start += str.size();
if (end < 0) end += str.size();
if (start < 0)... | TOOL | 0.958295 | 6.515484 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2025-03-03T22:46: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": "cdb5d82596a... |
649da8d2-a6ce-48f3-8afc-aa096b5e948d | jyotideepjee1803/CSES-problem-solutions | Graph Algorithms/1671 Shortest Route/ShortestRoute_priorityqueue.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define ff first
#define ss second
#define all(u) u.begin(),u.end()
#define revall(u) u.rbegin(), u.rend()
#define srt(u,l,r) sort(u.begin()+l, u.begin()+r)
#define pb push_back
#define vi vector<int>
#define pii pair<int,int>
#def... | ALGO | 0.999971 | 5.019398 | {
"github_metadata": {
"branch": "main",
"commit_count": 110,
"repo_created_at": "2023-06-21T12:45: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": "2207e2f07a... |
67defdc7-3fac-445d-872b-f418a2894c9d | anggansptra/latwxdev | persamaan_x.cpp | #inlcude <cstdlib>
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int a,b,c;
float x1,x2,d;
cout <<"masukan nilai a: " ;
cin >> a;
cout <<"masukan nilai b: " ;
cin >> b;
cout <<"masukan nilai c: " ;
cin >> c;
d= b*b -(4*a*c);
if (d>0) {
x1 =(b + sqrt(d))/(2*a);
x2 =(b - sqrt(d))/(2... | ALGO | 0.999651 | 3.891395 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-11-21T03:31:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2730ff79557c... |
1cf96d0b-db60-48d5-8ad3-3df7e1422ca2 | sourabh59-coder/CrackYourPlacement_Arsh_Goyal | 09. Graph/10. Shortest Bridge/Approach1.cpp | class Solution {
public:
vector<pair<int,int>> moments = {{1,0},{0,1},{-1,0},{0,-1}};
bool check(int i,int j,int n,int m)
{
return (i>=0 && j>=0 && i<n && j<m);
}
void dfs_c(int i,int j,vector<vector<int>> &v)
{
int n = v.size();
int m = v[0].size();
if(v[i][j]==1... | ALGO | 0.999963 | 5.301946 | {
"github_metadata": {
"branch": "main",
"commit_count": 228,
"repo_created_at": "2024-07-14T18:20:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4cbb8c097... |
2524080f-27d5-4349-91c4-541e532387b5 | pranav1698/algorithms_implementation | Tries/max_xor_subarray.cpp | #include<bits/stdc++.h>
using namespace std;
class trieNode{
public:
trieNode* left;
trieNode* right;
};
void insert(int n, trieNode* head){
cout << n << endl;
trieNode* curr=head;
for(int i=31; i>=0; i--){
int b=(n>>i)&1;
if(b==0){
if(!(curr->left)){
cu... | ALGO | 0.99998 | 4.140138 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2019-08-06T21:08: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": "58f98b667... |
ba6f514d-d9c8-4729-b714-0bdc12ab45ec | jhonber/Programming-Contest | codeforces/Educational Codeforces Round 11/D.cpp | // http://codeforces.com/contest/660/problem/D
#include<bits/stdc++.h>
using namespace std;
#define io ios_base::sync_with_stdio(false); cin.tie(null);
#define endl '\n'
#define D(x) cout << #x << " = " << (x) << endl;
struct P {
double x, y;
P() {}
P(double a, double b): x(a), y(b) {}
};
int main() {
int n... | ALGO | 0.99966 | 4.824486 | {
"github_metadata": {
"branch": "master",
"commit_count": 861,
"repo_created_at": "2014-02-05T00:06:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cfb528e0... |
6b29ba11-cff4-44dc-b764-37d986655204 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/08/0810/personal_submission/cf949a_lyxxys.cpp | #include <bits/stdc++.h>
using namespace std;
using Pii = pair<int,int>;
using ll = long long;
const int N = 5050, mod = 1e9+7, inf = 1e9;
void solve(){
string s;
cin >> s;
int n = s.size();
s = " " + s;
vector<vector<int>> res(n);
int cur = 0, Max = 0;
for (int i = 1; i <= n; ++ i){
... | ALGO | 0.999314 | 3.572611 | {
"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": "e014... |
441eaecc-c89d-493a-ac70-80028f9dd104 | KarenDanielyan/Cpp-Modules | Cpp09/ex02/PmergeMe.hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PmergeMe.hpp :+: :+: :+: ... | ALGO | 0.99085 | 5.477392 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2024-06-16T18:29: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": "c630f8f20... |
7e9d7b7d-2ef0-4d5d-8182-2f154bbb91ac | BerriosSean/RicardoBerrios | P1.cpp |
1 Solicita al usuario un entero y crea un arreglo dinámico de ese tamaño.Luego, llena el arreglo con números ingresados por el usuario.
#include <iostream>
#include <iomanip>
using namespace std;
int main (){
int n;
cout << " Ingresa el tamaño del arreglo dinámico ";
do {
cin >>n;
if (n <= 0)
... | TOOL | 0.9375 | 3.10386 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-10-29T19:54:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a77fd4ad31c4... |
e694b476-ff3e-4174-9b5d-2a7d7e3f5199 | hyun78/CG_cs580 | Homework1/common/affine.hpp | #ifndef AFFINE_H
#define AFFINE_H
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include <glm/gtc/matrix_transform.hpp>
using namespace glm;
/*
* An affine matrix A can be factored as A = TL. You need to fill up two function named 'get_linear' and 'get_translation'
*/
// TODO: Fill up get_linear function
// input:... | ALGO | 0.953755 | 5.858779 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-03-15T13:29:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a02cefe957... |
3000cb78-a90b-4f48-b5dd-e13c6b978f8e | 192211659/B.Vamsikrishna | 7_Page replacment no pages faults.cpp | #include<stdio.h>
#include<stdlib.h>
#define MAX 100
int pageFaults(int pages[], int n, int capacity) {
int i, j, k, faults = 0;
int frame[capacity], counter[capacity];
for(i=0; i<capacity; i++) {
frame[i] = -1; // Initializing frame with -1
counter[i] = 0; // Initializing counter with 0
... | ALGO | 0.999934 | 5.365602 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-05-05T17:35: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": "2899a01ec81d... |
8f1e1892-ae2c-43bc-a9f1-5e1ba54befc1 | gbm-developers/gbm | src/pairwise.h | //---------------------------------------------------------------------------------
// GBM alteration by <NAME> (<EMAIL>)
//
// File: pairwise
//
// Contains: Distribution object to implement pairwise distributions for ranking
//
// History: 12/15/2011 Created
//
//-------------------------------------... | ALGO | 0.999306 | 7.356079 | {
"github_metadata": {
"branch": "master",
"commit_count": 200,
"repo_created_at": "2017-03-27T13:53:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 54,
"forks": 28,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca2f064... |
a92f8007-16c6-45d7-a2c4-37c26e8806bd | hedwig3798/codingtest | 프로그래머스/구 문제풀이/미로 탈출/solution.cpp | #include <bits/stdc++.h>
const int INF = 987654321;
using namespace std;
// bfs 함수
int bfs(pair<int, int> start, vector<string> &maps, char flag){
// 얼마가 걸리는지 리턴
int result = 0;
// 최대 크기 맵으로 방문 여부 확인
int is_visit[101][101] = {0, };
// bfs에 사용될 큐
queue<pair<int, int>> q;
// 시작점 초기화
... | ALGO | 0.999987 | 4.684885 | {
"github_metadata": {
"branch": "main",
"commit_count": 520,
"repo_created_at": "2022-12-14T07:28: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": "3e98d5ac1b... |
abf354f9-b304-4d3b-9cc5-a6183f76e003 | vlanore/new_bayescode | src/submodels/univariate_branch_map.hpp | #pragma once
struct branch_map {
template<class Chrono, class Process>
static auto make_branch_sums(Chrono& chrono, Process& process) {
auto ret = make_dnode_array<custom_dnode<double>>(
chrono.get_tree().nb_branches(),
[&ch=chrono, &process] (int branch) { return
... | ALGO | 0.983721 | 4.65176 | {
"github_metadata": {
"branch": "master",
"commit_count": 1438,
"repo_created_at": "2019-10-15T08:45: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": "b1f0265... |
297d2d4e-9d70-4951-ac62-3c88b82a63c2 | VolodiaH/HomeWorks | Hw8/main.cpp | #include <iostream>
#include <format>
void translateArray(int numbers[], int size);
void toUppercase(char str[]);
bool isPalindrom(const char str[]);
void parseStringLetters(const char str[], int &vowelsCount, int &constonantsCount);
bool isEqual(const char str1[], const char str2[]);
int main()
{
constexpr int buff... | ALGO | 0.997512 | 3.974389 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2023-06-15T17:03:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "cc1f29e97... |
81510aff-b6f5-4f42-98f1-7a7f73e24773 | dseco/acmudec | CesarBolivar/Semestre2-2017/10496.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(int argc, char const* argv[])
{
int T;
cin >> T;
while (T--) {
int M, N, x, y, n;
cin >> M >> N >> x >> y >> n;
// cout << M << ' ' << N << ' ' << x << ' ' << y << ' ' << n;
vector<pair<int,int>> v(n);
int best = ... | ALGO | 0.999934 | 4.387838 | {
"github_metadata": {
"branch": "master",
"commit_count": 264,
"repo_created_at": "2014-08-08T21:33:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 12,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "4966ca1... |
21c01dd1-7d03-47e1-bbfa-10011228cb6f | QVina/qvina | src/lib/visited.cpp | #include "visited.h"
double ele::dist2(std::vector<double> now){
double out=0;
for (int i=0;i<size();i++){
double d = this->x[i] - now[i];
out += d * d;
}
return out;
}
//static bool comp(std::pair<int, double> p, std::pair<int, double> q)
//{
// return (p.second<q.second);
//}
/** differences:
* 1- I check ... | ALGO | 0.999533 | 3.735204 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2015-09-26T05:23:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 152,
"forks": 49,
"issues": 10,
"pull_requests": 1
},
"file_meta": {
"content_id": "fb9728... |
1172f642-d34c-487f-bd15-3c06707124c4 | Kanhakhatri065/competitive_programming | codeforces/1381A1-PrefixFlipEasyVersion.cpp | /*** I came, I saw, I conquered. ***/
#include <bits/stdc++.h>
using namespace std;
#define FAST_IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;typedef unsigned long long ull;
/*** Input Output ***/
#define sc(a) cin >> a
#define pf(a) cout << a << endl
/*** Loops ***/
#define f(i, p, num) fo... | ALGO | 0.999998 | 4.469143 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2020-05-12T22:56: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": "5e01e0b98... |
c0a60ee0-efba-45a6-a0ee-381b4aa8928a | Kvngjaid04/cis-5 | class/MinMax/main.cpp | /*
* Author:
* Created on
* Purpose:
*/
//System Libraries
#include <iostream>
using namespace std;
//User Libraries
//Global Constants - Math/Physics Constants, Conversions,
// 2-D Array Dimensions
//Function Prototypes
void minmax(int,int,int,int&,int&);//Function to find the min and ma... | ALGO | 0.995121 | 3.506897 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-07-19T15:29: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": "479302b9a7f7... |
158e7268-3f4b-429b-9c65-0c633e5e8296 | DNS/Cafu | CaBSP/BspTreeBuilder/BuildBSPTree.cpp | /*
Cafu Engine, http://www.cafu.de/
Copyright (c) <NAME> and other contributors.
This project is licensed under the terms of the MIT license.
*/
// Für g++ darf diese Struktur nicht lokal in 'ChooseSplitPlane()' definiert sein,
// da sie ansonsten nicht als Template-Argument verwendet werden kann.
struct PlaneInfoT
{... | ALGO | 0.998381 | 4.368113 | {
"github_metadata": {
"branch": "master",
"commit_count": 1843,
"repo_created_at": "2019-10-29T00:51:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8682aae... |
5aecf420-c7dd-4dff-9342-2769dd3d1319 | Elojah/Meuh2.0 | sandbox/hdezier/minmax/src/Node.cpp | #include "Node.hpp"
#include "Rules.hpp"
#include <stddef.h>
#include <climits>
#include <iostream>
int Node::_alpha = INT_MIN;
int Node::_beta = INT_MAX;
Node::Node(void) :
_children(NULL),
_value(-1),
_max(INT_MIN),
_maxIndex(-1)
{}
Node::~Node(void)
{
if (_children == NULL)
return ;
for (int i = 0; i < BO... | ALGO | 0.996544 | 4.304907 | {
"github_metadata": {
"branch": "master",
"commit_count": 988,
"repo_created_at": "2015-01-07T22:40: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": "c232b29e... |
d256a132-1109-4f79-a964-f726576cd959 | sachuverma/DataStructures-Algorithms | Leetcode Daily Challenge/September-2021/08. Shifting Letters.cpp | /*
Shifting Letters
================
You are given a string s of lowercase English letters and an integer array shifts of the same length.
Call the shift() of a letter, the next letter in the alphabet, (wrapping around so that 'z' becomes 'a').
For example, shift('a') = 'b', shift('t') = 'u', and shift('z') = 'a'.
N... | ALGO | 0.999982 | 6.501263 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2020-10-07T10:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2049,
"forks": 541,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "41... |
042529fc-c41c-4596-aef5-a5266a38da79 | cactusnoh/bj | 14942.cc | #include <iostream>
#include <vector>
#define LOG 16
struct Edge {
int dest;
int cost;
};
int N;
int parent[100'001][LOG + 1];
int dist[100'001][LOG + 1];
int energy[100'001];
std::vector<Edge> adj_list[100'001];
bool visited[100'001];
void DFS(int node) {
visited[node] = true;
for (const auto &e : adj_lis... | ALGO | 0.999999 | 4.312075 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2022-05-16T10:21:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a88bce6da... |
320a2bb7-0106-41bf-9d18-1224ce6e7091 | totti3006/Laboratory_cpp | tranposition_matrix.cpp | #include <iostream>
#include <fstream>
using namespace std;
// matrix is two dimensional array. You should transposition matrix
void transposition(int rows, int cols, int **matrix)
{
int i = 0;
int j = 0;
for (i = 0; i < cols; i++)
{
for (j = 0; j < rows; j++)
{
cout << matrix[j][i];
if (j < rows -1) co... | ALGO | 0.949074 | 4.251555 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-05-19T10:51: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": "52c78108ab... |
98e20ce9-37bf-4700-aebf-dbdd02e531ce | ckennelly/advent-of-code-2020 | cpp/11/11a.cc | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/strings/ascii.h"
#include "absl/strings/numbers.h"
#include "absl/strings/match.h"
#include "ab... | ALGO | 0.999824 | 5.072368 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2020-12-08T17:01: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": "e160e2cadc9... |
87f68430-d1bf-4157-98b2-45e263a07499 | Justinshao33/competitive_programming | done/AtCoder/J_Segment_Tree.cpp | #pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define rep(X, a, b) for(int X = a; X < b; ++X)
#define pii pair<int, int>
#define... | ALGO | 0.99988 | 5.053573 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2025-07-01T18:14: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": "520773b4e5f... |
94c79b6a-2912-4bf9-8aa3-78dc781dc986 | grantgabriel/Competitive-Programming | Learning Progress/TLX Toki/Pemrograman Dasar/Submission/9/9E.cpp | #include <iostream>
#include <array>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <string>
#include <functional>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <stack>
#include <vector>
#include... | ALGO | 0.999835 | 4.270912 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2023-03-22T16:35:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "44d16ff936... |
fe95475b-0f4b-4711-8ebd-bb55c420fcdc | kk77777/CODEFORCES | A/Chat Room/program.cpp | //http://codeforces.com/problemset/problem/58/A
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "rt", stdin);
freopen("output.txt", "wt", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
... | ALGO | 0.999384 | 3.28824 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2020-01-22T10:55:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a2d10291... |
47dfa4d7-027a-47a3-972a-3ca5a38d7ccf | lorenzo-ferrari/olinfo | src/ois_annoluce.cpp | #include <bits/stdc++.h>
#define MAXN 100001
using namespace std;
ifstream in ("input.txt");
ofstream out ("output.txt");
int N, Q;
long double x, y, z;
long double query;
long double dist[MAXN];
int ricerca_binaria(long double target)
{
int up = N-1;
int down = 0;
if(dist[up] <= target) return N;
... | ALGO | 0.999988 | 4.764145 | {
"github_metadata": {
"branch": "main",
"commit_count": 195,
"repo_created_at": "2021-06-02T18:22:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "24ecf30f48... |
e1fb303e-e39a-4ff4-ba0d-fd41056c8036 | MronakX/poj-solutions | shu_suan/7. Graph/03.cpp | /*
郭大卫
1900012995
兔子与樱花 floyd + 栈逆序输出路径
20.12.03
*/
#include <iostream>
#include <iomanip>
#include <cmath>
#include <map>
#include <stack>
#include <string.h>
#include <algorithm>
using namespace std;
#define INF 1<<20
map<string, int> str2int;
map<int, string> int2str;
int p;
struct D
{
int dis = INF;
int p... | ALGO | 0.99999 | 4.113518 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-11-12T07:04: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": "1c561e81ef... |
b95c82dc-5bf4-41cd-954f-17b3923f49d5 | changsongzhu/leetcode | C++/seq_num/726_h.cpp | /*
726. Number of Atoms
Given a chemical formula (given as a string), return the count of each atom.
An atomic element always starts with an uppercase character, then zero or more lowercase letters, representing the name.
1 or more digits representing the count of that element may follow if the count is greater than... | ALGO | 0.999749 | 5.018661 | {
"github_metadata": {
"branch": "master",
"commit_count": 395,
"repo_created_at": "2017-03-15T23:33:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d4fdb26... |
795d599a-7d96-449e-bc5a-d9fa1f6285ff | om-mapari/Data-Structures-Implementation | Assignment_DSA_/Assignment1.cpp |
/* Assignment 1 : DSA
*
* NAME : <NAME>
* ROLL NO : 23245 (G10)
* PROBLEM STATEMENT :
Consider a student database of SEIT class (at least 15 records). Database contains different fields of
every student like Roll No, Name and SGPA.(array of structure)
a) Design a roll call list, arrange list of students according to ... | ALGO | 0.998916 | 5.488759 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2021-10-05T22:15:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21545e5abc... |
d21b8e01-5ebb-4c1b-a4a8-04145ecfc349 | railav61/DSA | 2-add-two-numbers/add-two-numbers.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* addTwoNumbe... | ALGO | 0.999969 | 6.161803 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2024-03-08T16:53: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": "8924bd58d9f... |
715fa72a-8c71-480a-9b46-79714da930dd | Al-mizan/Competitive-Programming | cses/Sum_of_Four_Values.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define endl '\n'
#define inf 1e18
#define ff first
#define ss second
#define pb push_back
#define mod 1000000007
#define newline cout <<... | ALGO | 0.99994 | 4.015125 | {
"github_metadata": {
"branch": "main",
"commit_count": 92,
"repo_created_at": "2024-08-30T04:57:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "843b68f91bb... |
8356e083-1913-497e-88d4-e5214487c5f2 | madalin1907/Automata-Theory | Project2.1 (NFA)/nfa_acceptance_engine.cpp | #include "NFA.h"
#include <iostream>
using namespace std;
int main(int argc, char *argv[]){
if (argc != 3) {
cout << "Comanda gresita\n";
return -1;
}
string nume = argv[argc-2];
int x = verif_NFA(nume);
switch(x){
case 0:
cout << "Automat Validat\n";
... | ALGO | 0.990045 | 3.9977 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2022-03-19T12:24: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": "65cc57b5b81... |
d4c2ece3-19d4-4314-8b37-df3ed247a78f | Tariqul-huda/CP-problem | Codeforces/Anansi_s_Cobweb.cpp | #include<bits/stdc++.h>
using namespace std;
// @author : tariq002
#define endl '\n'
#define int long long
const int N = 3e5 + 9;
struct DSU {
vector<int> par, rnk, sz;
int c;
DSU(int n) : par(n + 1), rnk(n + 1, 0), sz(n + 1, 1), c(n) {
for (int i = 1; i <= n; ++i) par[i] = i;
}
int find(int i) {
... | ALGO | 0.999987 | 4.682458 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2025-02-15T21:19:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4149fc90041... |
1b9f7e6e-65d4-45d7-b9f3-492b16109963 | marzuk16/competitive-programming | lightoj/1012_guilty_prince.cpp | #include<bits/stdc++.h>
using namespace std;
char arr[25][25];
int vis[25][25];
int prince(int col, int row)
{
int n=col,m=row,cnt=0;
//memset(arr,0,sizeof(arr));
memset(vis,0,sizeof(vis));
memset(arr,0,sizeof(arr));
queue<int>q;
for(int i=1; i<=m; i++)
{
for(int j=1; j<=n; j++)
... | ALGO | 0.99896 | 3.450348 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2021-05-13T14:19: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": "472c3ccc8... |
0ad173b0-2f0b-4e21-9de5-5753251b6067 | QianXunAmei/Algorithm | LanqiaoCup/螺旋加密.cpp | #include "iostream"
#include "cstring"
#include "cstdio"
#include "cstdlib"
using namespace std;
#define CHSIZE 27
char arr[20][20];
char char_table[CHSIZE][5];
int myitoa(int k, char *ctemp)
{
int i = 4, temp;
while(k > 0)
{
temp = k%2;
k /= 2;
switch(temp)
{
case 0:
ctemp[i] = '0';
break;
... | ALGO | 0.999949 | 3.541545 | {
"github_metadata": {
"branch": "master",
"commit_count": 104,
"repo_created_at": "2017-05-04T11:34: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": "f65945ae... |
ee5f907e-1a20-40bd-940c-ab7e10fd8563 | buiquochuy2508/LUYEN_CODE | LAKE.cpp | #include <bits/stdc++.h>
using namespace std;
using namespace std;
using ll = long long;
int m, n, k;
const int maxN = 10001;
int a[101][101];
bool visited[101][101];
int dR[] = {-1, 0, 1, 0};
int dC[] = {0, 1, 0, -1};
int biggestLake = 0;
int ans = 0;
bool isLegalMove(int r, int c) {
if(r < 1 || c < 1 || r > m || c ... | ALGO | 0.999852 | 4.21108 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-11-23T10:59: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": "90a6181b4693... |
9ee46ec7-6948-40f7-bd72-c2e704ec71e5 | tsunghuanghsieh/leetcode | problems/accounts-merge/main.cpp | #include <fstream>
#include <iostream>
#include <regex>
#include <vector>
using namespace std;
#include "Solution.cpp"
void printAccounts(vector<vector<string>> accounts) {
cout << "[";
for (int i = 0; i < accounts.size(); i++) {
cout << "[";
for (int j = 0; j < accounts[i].size(); j++) {
... | TOOL | 0.901228 | 4.615872 | {
"github_metadata": {
"branch": "master",
"commit_count": 758,
"repo_created_at": "2019-02-08T05:36: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": "7b92b905... |
53f9e381-6b6c-48b2-b23e-b5ee1b6290ec | Srhari1234/EXP-7 | array_search.cpp | //<NAME>
//Prn: 23070123131
//experiment 7: Arrays And Strings
#include<iostream>
using namespace std;
int main()
{
int marks[5];
int num, count = 0;
for (int i = 0; i < 5; i++)
{
cout << "Enter element " << i + 1 << ": ";
cin >> marks[i];
}
cout << "Enter element to be sea... | ALGO | 0.99695 | 3.964 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-08-06T09:26: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": "491c60c744c... |
b8f52877-29b8-4a59-a859-73a19079bc3d | xukp20/CG_labs | Project/code/include/bvh.hpp | #pragma once
#include <vector>
#include <string>
#include <float.h>
#include <algorithm>
#include "ray.hpp"
#include "group.hpp"
#include "object3d.hpp"
#include "rand.hpp"
class BVHNode : public Object3D {
public:
BVHNode() {}
BVHNode(std::vector<Object3D*> &objects, int start, int end, double time0, double... | ALGO | 0.995013 | 5.282176 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2023-03-25T06:01:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c56ed8fa4c... |
56307f64-13ae-4452-8087-7d7096308812 | modi-meet/DSA-problem-solving | two-pointers/3sum.cpp | // 3 sum
// Given an integer array,
// return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, j != k and nums[i] + nums[j] + nums[k] == 0.
// (answer should only contain Unique triplets)
// Brute Force
class Solution {
public:
vector<vector<int>> threeSum(vector<int>& nums) {
int n = ... | ALGO | 0.999872 | 6.188346 | {
"github_metadata": {
"branch": "main",
"commit_count": 119,
"repo_created_at": "2025-05-30T11:34: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": "3a8d37180a... |
5690fce7-8983-4aac-bb74-c8575e9d722d | sfd-mhrana/CP_CLUB | W-6/Codeforces Round 943 (Div. 3).cpp/Maximize.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define bye return
#define vinll(v, n) \
vector<int> v(n); \
for (ll i = 0; i < n; i++) \
cin >> v[i];
const int SMALL_LETTER_STATING_POINT = 97;
const int CAPITAL_LETTER_STATING_POINT = 65;
// GC... | ALGO | 0.999939 | 4.593562 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2024-03-14T16:51:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2e670993... |
74298305-1b4b-475b-a9e8-830eb6c6605e | rfluis/rcl | numerical.hpp | #ifndef NUMERICAL_HEADER
#define NUMERICAL_HEADER
#include "constants.hpp"
#include "tpoint.hpp"
#include <vector>
#include <cmath>
#include <iostream>
#include <iomanip>
namespace rcl{
inline unsigned int log2floor(const unsigned int& x){
return static_cast<unsigned int>(std::floor(std::log2(x)));
}
inline unsig... | ALGO | 0.981043 | 5.128125 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-11-18T22:35: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": "3f5caf05f... |
fada5d11-8156-4ee4-baed-668e0bdde11f | rsantos88/controller-experiments | main/softNeckVelocityIdentMultithreading.cpp | #include <iostream>
#include <fstream>
#include <thread>
#include <mutex>
#include "Cia402device.h"
#include "CiA301CommPort.h"
#include "SocketCanPort.h"
#include "imu3dmgx510.h"
#include "fcontrol.h"
#define LG0 0.003 //meters
#define RADIO 0.0075 //meters
/* Programa para controlar el cuello en modo velocidad ha... | TOOL | 0.940111 | 4.255987 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-02-16T12:45: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": "fd64201da253... |
76a99f77-3ced-4c18-bfb7-bc02e1b8cc8b | jwyx/ForFun | c-c++/algo/ZOJ/greedy/1076.cc | // 思路:类似于会议安排,选择结束时间最早的贪心
#include <iostream>
#include <algorithm>
#define N 1000
using namespace std;
struct exons {
long start; // choose long because at most 50000 basis
long end;
int pos;
};
bool comp(const exons &a, const exons &b) {
return (a.end <= b.end);
}
int main(int argc, char *argv[])
{
int... | ALGO | 0.999926 | 3.897746 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2012-11-30T10:39:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "88c2b3bb9... |
6c3e8697-c98a-41d1-8fdd-f3fbee05555e | adefiks/Interview_questions | src/question_4.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int returnMissingInt(vector<int> vec1, vector<int> vec2)
{
sort(vec1.begin(), vec1.end());
sort(vec2.begin(), vec2.end());
for (size_t i = 0; i < vec1.size(); i++)
{
if (vec1[i] != vec2[i])
{
r... | ALGO | 0.998757 | 5.450242 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-08-07T17:22:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e5613ae76... |
a4490e62-922c-4e65-a709-30f503c3ef8b | SCUTMSC/SCUT-Course | 软件学院/数据结构/源码/KDmain.cpp | // From the software distribution accompanying the textbook
// "A Practical Introduction to Data Structures and Algorithm Analysis,
// Third Edition (C++)" by <NAME>.
// Source code Copyright (C) 2007-2011 by <NAME>.
// Test program for KDtree
// This code could be greatly improved. Right now, the coordinate (key)
// ... | ALGO | 0.991204 | 4.943231 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2019-09-02T14:58:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e823cde0a... |
48f21b51-6e2c-4792-bef9-386314dbb2c5 | litaoran/leetcode-daily | cpp/785-is-graph-bipartite.cc | class Solution {
public:
bool isBipartite(vector<vector<int>>& graph) {
unordered_set<int> set1, set2;
for (int i=0;i<graph.size();i++) {
bool res = dfs(graph, i, true, set1, set2);
if (!res) {
return false;
}
}
return... | ALGO | 0.999914 | 6.024245 | {
"github_metadata": {
"branch": "main",
"commit_count": 137,
"repo_created_at": "2020-11-10T11:16: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": "51f32da2cf... |
9deecb40-b38e-44ce-9133-13f5cffeed81 | syauqylei/Final_Project | C++Programs/source.main.gpu.fd/wavesim.cc | #include <iostream>
#include <iomanip>
#include <accelmath.h>
#include "arrayman.h"
#include "hider.h"
#include "abcon.h"
#include "openacc.h"
double **wvenacd(double *vel, int nx, int ny,int srcloc, double freq,double h, double dt,double T){
int nt=int(T/dt);
int Nx=nx+2;
int Ny=ny+2;
//Alloc array to store wav... | ALGO | 0.999624 | 4.71471 | {
"github_metadata": {
"branch": "master",
"commit_count": 317,
"repo_created_at": "2018-07-31T04:56: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": "131e60a9... |
f463e488-d3f6-46e0-91cd-bac6af36ece2 | andriisemenov/cpp_exercises | image_downloader/download_images_challenge.cpp | /**
* Challenge: Download a collection of images
*/
#include <boost/asio.hpp>
#include <future>
#include <cstring>
#include <string>
#include <iostream>
#include <curl/curl.h> // curl support https://curl.haxx.se/
#include <mutex>
/* declarations for download_image helper function */
size_t download_image(int image_... | ALGO | 0.977853 | 7.072334 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-02-05T18:16: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": "72110fbd4eb... |
f01d16b1-3fe2-4478-9c33-fe952bcb4433 | otherlab/geode | geode/vector/DiagonalMatrix3x3.h | //#####################################################################
// Class DiagonalMatrix3x3
//#####################################################################
#pragma once
#include <geode/vector/Matrix.h>
#include <geode/vector/Vector3d.h>
#include <geode/math/min.h>
#include <geode/math/minabs.h>
namespac... | TOOL | 0.900298 | 5.521681 | {
"github_metadata": {
"branch": "master",
"commit_count": 1586,
"repo_created_at": "2012-08-20T03:26:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 86,
"forks": 23,
"issues": 53,
"pull_requests": 3
},
"file_meta": {
"content_id": "1e6ee... |
cfe3c374-fdef-4134-aa1e-15e0724b30ae | kantuni/Codeforces | 1451C/string-equality.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
int n, k;
cin >> n >> k;
string a, b;
cin >> a >> b;
vector<int> ac(26), bc(26);
for (int i = 0; i < n; i++) {
ac[a[i] - 'a']++;
bc[b[i]... | ALGO | 0.999991 | 5.140038 | {
"github_metadata": {
"branch": "master",
"commit_count": 1466,
"repo_created_at": "2017-02-05T18:52:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 211,
"forks": 58,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "256f... |
ab045060-5bb5-420e-ade0-78370f3c2182 | uhmQuez/COP2001Demos | VirtualDay2/VirtualDay2/main.cpp | //
// main.cpp
// VirtualDay2
//
// Created by <NAME> on 5/24/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
#include <iostream>
int main(int argc, const char * argv[]) {
double principle = 15000;
double principlePaid;
double newPrinciple;
double interestOwed;
double monthlyInter... | ALGO | 0.993018 | 3.936197 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-03-27T22:18: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": "7e4998f806... |
9bf56167-f8bd-4aff-aa90-5093cccf7627 | RileyA/gnat | src/gfx/math/matrix4.cc | #include "gfx/math/matrix4.h"
#include "gfx/math/vector3.h"
#include "gfx/math/quaternion.h"
namespace gnat {
const Matrix4 Matrix4::ZERO(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
const Matrix4 Matrix4::IDENTITY(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
const Matrix4 Matrix4::CLIPSPACE2DTOIMAGESPACE(0... | ALGO | 0.985623 | 7.256694 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2014-03-12T04:31: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": "940d6678... |
c991ebdf-e747-4552-a846-9f9db0be1b90 | pateash/cp | src/main/my_codes/ap_algo_codes/Stack/ds3_stack implementation of growable array/stack_impl_arr_a.CPP | #include<stdio.h>
#include<conio.h>
#include<iostream.h>
#include<alloc.h>
#include<stdlib.h>
void header()
{
clrscr();
cout<<" STACK IMPLIMENTATION OF ARRAY"<<endl;
cout<<" _____________________________"<<endl;
cout<<endl;
}
void push(int ,int*,int ,int& ); //taking the valu... | ALGO | 0.999416 | 3.624243 | {
"github_metadata": {
"branch": "master",
"commit_count": 253,
"repo_created_at": "2016-10-24T11:19:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2675b64e... |
eda0e019-6cc1-4da2-9d59-dcb93d933fbf | FluidityProject/fluidity | libadaptivity/load_balance/src/functional_2d.cpp | /*
* Copyright (c) 2004-2006 by <NAME>
* Copyright (c) 2006- Imperial College London
* See COPYING file for copying and redistribution conditions.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published b... | ALGO | 0.977466 | 5.739292 | {
"github_metadata": {
"branch": "main",
"commit_count": 9330,
"repo_created_at": "2014-05-21T14:00:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 375,
"forks": 117,
"issues": 26,
"pull_requests": 17
},
"file_meta": {
"content_id": "5fc0... |
0e411f0d-8ef7-4441-9b4d-c43e72bdf077 | hemantshirsath/DSA | Trees/leftviewofbinarytree.cpp | #include<iostream>
#include<vector>
#include<queue>
#include<map>
#include "buildtreefromlevelordertraversal.cpp"
using namespace std;
vector<int> leftview(Node *root){
vector<int> finalans;
if(root==NULL){
return finalans;
}
vector<int> ans;
queue<Node *> q;
q.push(root);
q.push(NUL... | ALGO | 0.99998 | 5.097517 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-05-30T11:00: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": "6a4f2afcbd... |
5fb6993a-6226-49b5-a1b1-3bc47f53ad04 | Arsh-ak7/CSES-Problem-Set | RangeQueries/xorRangeQueries.cpp | #pragma GCC optimize("O2")
#include <bits/stdc++.h>
using namespace std;
vector<long long> tree;
long long query(int node, int node_low, int node_high, int l, int r)
{
if (l <= node_low && r >= node_high)
return tree[node];
if (l > node_high || r < node_low)
return 0;
int last_in_left =... | ALGO | 0.999995 | 5.122594 | {
"github_metadata": {
"branch": "main",
"commit_count": 105,
"repo_created_at": "2021-03-20T04:52: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": "214d86c9cd... |
203237b7-a307-4a4d-910c-bdacd5c2ab21 | mytony/Leetcode | PalindromeLinkedList.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
// 做法大概都是把其中一半翻轉,然後跟另一半一個一個比較
// 但翻轉的做法有看到兩種,一種是普通的找到那一半的開頭然後作翻轉
// https://discuss.leetcode.com/topic/18304/share-my-c-solution-o-n-time-and-o-1-memory/15
// 但另... | ALGO | 0.999978 | 5.745245 | {
"github_metadata": {
"branch": "master",
"commit_count": 72,
"repo_created_at": "2016-02-15T20:24: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": "eefb26ec0... |
6f973cbb-fa82-4f11-9e39-aa49bd178d67 | thwee-alchemist/graph-visualization | src/cpp/Edge.cpp | #include <sstream>
#include "Vertex.h"
#include "Edge.h"
#include <iostream>
#include <cassert>
#include <random>
using namespace sc;
Edge::Edge(unsigned int _id, Vertex* _source, Vertex* _target, bool _directed, double _strength, LayoutGraph* _graph){
assert(_source != _target);
// https://stackoverflow.com/a/... | ALGO | 0.993978 | 5.513008 | {
"github_metadata": {
"branch": "master",
"commit_count": 105,
"repo_created_at": "2020-01-22T08:28:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 17
},
"file_meta": {
"content_id": "037bf4c... |
43082596-326e-4675-a147-e2948450ceb3 | sippathamm/GiantBOBO | ROS2MTHPlanner/include/BasePlanner.h | //
// Created by <NAME> on 17/2/2024 AD.
//
#ifndef BASE_PLANNER_H
#define BASE_PLANNER_H
#include "Debug.h"
#include "Utility.h"
#include "Point.h"
#include "spline.h"
#include <iostream>
#include <vector>
#include <random>
#include <cmath>
namespace MTH
{
class ABasePlanner
{
public:
ABasePlan... | ALGO | 0.998423 | 5.062744 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-03-23T11:10:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4e6bfcc8d0e... |
a44ba37f-528d-4b56-b018-4ea617ca39b6 | belanasaikiran/DSA-OS-Others | LeetCode/1524_Number_of_Sub-Arrays_With_Odd_Sum.cpp | #include <assert.h>
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int numOfSubarrays(vector<int> &arr) {
vector<int> AllSubArrays;
int left = 0, right = 0;
for (long long itr : arr) {
int val = 0;
right = left;
while (right < arr.size()) {
... | ALGO | 0.999778 | 4.910803 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2024-08-28T18:40: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": "83236f812ea... |
b1f5c7bf-1fcc-4f45-b5a0-487d6d68bbbb | koritafei/leetcode | dp/coinsNum.cc | #include <vector>
class Solution {
public:
// 动态规划解法
int coinNum(std::vector<int> &nums, int aim) {
int len = nums.size();
if (0 == len || aim == 0) {
return 0;
}
std::vector<std::vector<int>> memo =
std::vector<std::vector<int>>(len + 1, std::vector<int>(aim + 1, 0));
// base c... | ALGO | 0.999941 | 5.458954 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2021-02-24T02:09:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "28d519425c9... |
409895d1-27e9-4842-a475-7ff84a282783 | lucka-me/ingress-drone-explorer-cpp | src/explorer/load.cpp | #include "explorer/explorer_t.hpp"
#include <chrono>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <boost/json.hpp>
#include "extensions/tag_invoke.hpp"
#include "utils/match_pattern.hpp"
namespace ingress_drone_explorer {
void explorer_t::load_portals(const std::vector<std::string>& filena... | TOOL | 0.92835 | 6.060249 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-04-30T10:20:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed28df267a3... |
cc9f3eed-ef71-40ee-b77d-f2b3f9ded1b1 | ishandutta2007/codeforces-r | realcomplex/normal/348/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
typedef double db;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define all(x) ((x).begin(),(x).end())
#define len(x) ((ll)(x).size())
const ll N... | ALGO | 0.999914 | 3.819286 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "253416930cb2... |
673d9db1-2af9-400d-aca6-bd31d4e65c93 | Nedriia/Hacker_Rank_Solutions | HackerRank_Solutions/Problem_Solving/Insertion_Sort-Part_2/Solution.cpp | #include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
// Complete the insertionSort2 function below.
void insertionSort2(int n, vector<int> arr) {
int value = 0;
int j = 0;
for (int i = 1; i < n; i++)
{
value = arr[i];
j = i;
while (j > 0 && value < arr[j - 1])
{
arr[j] = ... | ALGO | 0.999941 | 5.689157 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2019-07-30T12:21: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": "a2a00e1b0... |
ac2757de-97aa-41df-a775-a0269857f631 | hakank/hakank | gecode/3_jugs2.cpp | /*
3 jugs problem in Gecode.
Problem from
Taha "Introduction to Operations Research", page 245f .
This is a constraint programming approach (or at least with a
more CP bent), as the MIP approach in the MiniZinc model:
http://www.hakank.org/minzinc/3jugs.mzn
Compare with the following models:
* ... | ALGO | 0.999483 | 3.33871 | {
"github_metadata": {
"branch": "master",
"commit_count": 616,
"repo_created_at": "2013-08-06T20:12:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 381,
"forks": 78,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b50c2... |
b6c4fb82-4941-4013-b336-6a9f33fe6daf | PraveenKumarRana/Problem-Solving | C_Double_ended_Strings.cpp | // author: @iamyours
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define NL "\n"
#define int long long int
#define vi vector<int>
#define pi pair<int, int>
#define all(x) x.begin(), x.end()
#define tc int t; cin>>t; while(t--)
const int mod = 1e9 + 7;
template<typename T>
void read(v... | ALGO | 0.99991 | 4.57931 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2021-03-26T08:43: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": "b25a2a368... |
3c93b49e-536e-4b32-b36d-af8fcaecb67d | rwietter/data-structures | University/data-structures-ll/1º Bimestre/aulas/Aula_3/Aula3_Codigos_Aula_Quarta/PilhaV.cpp | // Implementação de pilha com vetor
#include <stdlib.h> /* malloc, free, exit */
#include <stdio.h> /* printf */
#define MAX 50
// A estrutura que representa o tipo pilha deve, portanto, ser composta pelo vetor e pelo
// número de elementos armazenados.
struct pilha {
int n;
float vet[MAX];
};
typedef struct pilh... | ALGO | 0.999028 | 5.049756 | {
"github_metadata": {
"branch": "main",
"commit_count": 130,
"repo_created_at": "2020-06-20T16:23:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "014188477e... |
251b271b-b90f-4c53-8ad3-bdfebced1d62 | R-fzx/code | problem/luogu/P2000-P2999/P2184.cpp | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#include <iomanip>
// #define TIME
using namespace std;
using LL = ... | ALGO | 0.999611 | 4.353677 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2021-11-07T12:57:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b7af07d8... |
caaeba4a-64cf-4f57-ac14-f3c7c4b611fe | ishandutta2007/codeforces-n | neoorgano/normal/1255/C.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5;
array<int, 3> arr[MAXN];
int cnt[MAXN];
pair<int, array<int, 3>> inter(array<int, 3> a, array<int, 3> b) {
sort(a.begin(), a.end());
sort(b.begin(), b.end());
int cur = 0;
int j = 0;
array<int, 3> res = {-1, -1, -1};
for (int ... | ALGO | 0.999973 | 4.55215 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "df47641acbc8... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.