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 |
|---|---|---|---|---|---|---|---|
88dee5a7-b001-42c4-b9bf-c5aa4cf6dcee | Xilinx/Vitis-Tutorials | Vitis_System_Design/Design_Tutorials/01-Versal_Custom_Thin_Platform_Extensible_System/vitis/ip/aie/src/kernels/datamover_scalar.cc | //
// Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
// SPDX-License-Identifier: X11
//
#include <adf.h>
#include "coeffs.h"
// This example uses mul8 to copy 8 lanes of data with value 1 (represented as 32767 i.e. shift of 15)
// This should examplify typlical delay through a mul command
// As... | ALGO | 0.944646 | 4.805977 | {
"github_metadata": {
"branch": "2025.1",
"commit_count": 3080,
"repo_created_at": "2019-09-30T17:08:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1419,
"forks": 572,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d... |
59bc8761-5117-4742-9923-396a15076587 | nissimnatanov/des | cpp/main/generators/SudokuBoardGeneratorState.cpp | #include "SudokuBoardGeneratorState.h"
#include "SudokuSolutionGenerator.h"
bool shouldContinueByLevel(SudokuLevel desiredLevel, Random &r)
{
switch (desiredLevel)
{
case SudokuLevel::EASY:
// For easy games - keep trying (otherwise, game can be too easy).
return r.percentProbability(95);
... | ALGO | 0.994497 | 6.977587 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2021-05-17T22:53:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19473668c71... |
4cc479d7-7228-4bc1-8392-6970089f590d | HaewonSeo/Algorithm-Note | C++/Samsung_SDS/03정수론/11653_소인수분해.cpp | #include <cstdio>
#include <vector>
using namespace std;
int main() {
// n의 최대값은 10,000,000
// 10,000,000의 제곱근(3162.xx)까지의 범위에서 소수를 체크
// 여기서는 대략 3200으로 설정, 정확하게 하려면 3162로 설정해야함
bool iscomposite[3200] = {0,};
for (int i = 2 ; i < 3200 ; i++) {
if (iscomposite[i]) continue;
// int j = i + i ; 로 했었는데, 사실 이는 2의 ... | ALGO | 0.999987 | 4.268736 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2020-07-29T02:38: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": "0ea502207... |
15c29932-811d-4dfc-bb39-612a2491f903 | IvanDzanija/competitive_programming | CSES/Sort&Search/room_allocation.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <tuple>
#define INF (int)1e9
using ll = int64_t;
using namespace __gnu_pbds;
int main(void) {
std::ios_base::sync_with_stdio(0), std::cin.tie(0), std::cout.tie(0);
int n;
std::cin >... | ALGO | 0.999977 | 3.958723 | {
"github_metadata": {
"branch": "main",
"commit_count": 262,
"repo_created_at": "2024-07-21T00:00: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": "5add21bb3f... |
60ea9eea-e4d0-42cb-b090-92cca5e6d850 | yangkaiyu-web/cscc-db | src/execution/executor_agg.h | #pragma once
#include <cstring>
#include <memory>
#include <set>
#include <unordered_set>
#include "common/common.h"
#include "defs.h"
#include "errors.h"
#include "execution_defs.h"
#include "execution_manager.h"
#include "executor_abstract.h"
#include "index/ix.h"
#include "record/rm_defs.h"
#include "system/sm.h"
#... | TOOL | 0.969664 | 5.245943 | {
"github_metadata": {
"branch": "main",
"commit_count": 219,
"repo_created_at": "2023-09-10T10:04:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "506c040955... |
68a6e3ca-92d1-438c-b810-ba6ba6ff32ee | faithful-dragon/Compititive-Programming | DYNAMIC_PROGRAMMING/7.cpp | // ninja training
// 3 3
// 1 2 5
// 3 1 1
// 3 3 3
// 3 3
// 18 11 19
// 4 13 7
// 1 8 13
#include <iostream>
#include <vector>
using namespace std;
// memorization
// TC = O(N * t)
// SC = O(N) O(N * t)
int max_points(int t, int day, int last, vector<vector<int>>points, vector<vector<int>>&dp){
if(day==0){
... | ALGO | 0.999929 | 5.21243 | {
"github_metadata": {
"branch": "main",
"commit_count": 405,
"repo_created_at": "2023-08-09T11:29:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7581f01c4... |
0775d3b6-14d0-4a45-ad69-6c5fe953fa0e | sudoker0/cpp-coding-stuff | 2024-11-30/THONGKE.cpp | #include <bits/stdc++.h>
using namespace std;
int power(int a, int b) {
int out = 1;
for (int i = 0; i < b; i++) out *= a;
return out;
}
int str_to_num(string s) {
int out = 0, p = 0;
reverse(s.begin(), s.end());
for (int i = 0; i < s.size(); i++) {
out += (s[i] - '0') * power(10, p);... | ALGO | 0.999877 | 3.932584 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-11-30T12:09: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": "46954d21707a... |
2a910441-3b79-4406-8eba-482e69964ba2 | saiimmani/DAA | QuickSort.cpp | #include <iostream>
#include <vector>
using namespace std;
// Quick Sort Implementation
void quickSort(vector<int>& arr, int left, int right) {
if (left < right) {
int pivot = arr[right];
int i = left - 1;
for (int j = left; j < right; j++) {
if (arr[j] < pivot) {
... | ALGO | 0.999988 | 6.034234 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2025-01-24T16:49: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": "debf22ed6f9... |
0fa3ef03-73b6-45ad-bdb3-ac8b91bc00e6 | yaoyaowd/competitivecoding | codefoce/cf1172d.cc | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#i... | ALGO | 0.999699 | 3.40466 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-05-04T16:17: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": "67a66bb046... |
3d2035f5-8876-42d3-98b0-e9d9eb09b303 | alexrussomanno/arduino_code | Stepper Motor Code/stepper_motor_debug/stepper_motor_debug.ino | /*
9/3/14
This is the raw code used to drive a stepper motor. It was taken from the Stepper.h library.
*/
#define motor_pin_1 8
#define motor_pin_2 9
int step_number = 0; // which step the motor is on
int speed = 0; // the motor speed, in revolutions per minute
int direction = 0; // motor ... | ALGO | 0.903143 | 5.004535 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-11-20T00:42: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": "e78034bf04... |
c61e573a-f8e5-4f43-af5e-d6c0d8e21d71 | fabioasdias/calib | ModifiedGML/MEX_sources/apps/MatLabDll/mxMain.cpp | /* $Revision: 1.2 $ */
#include "mex.h"
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <vector>
#include "../../CSL/base/gmlcommon.h"
#include "../../CSL/math/gmlmath.h"
#include "../../calibinit/dmcalibinit.h"
//=======================================================================
//= Function name :... | TOOL | 0.977618 | 6.200827 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2015-03-28T03:58:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "426b365cf... |
a604f854-b0b2-4f4e-b088-17f664630519 | IntelSDM/DMAByDaylight | DMAByDaylight/Config/ConfigUtilities.cpp | #include "Pch.h"
#include "ConfigUtilities.h"
#include "ConfigInstance.h"
json Config;
std::string Path;
ConfigInstances Configs;
void SetUpConfig()
{
std::filesystem::path filePath = std::filesystem::path(getenv(LIT("USERPROFILE"))) / LIT("Documents") / LIT("Hunt") / (LIT("Default.json"));
std::filesystem::c... | CONFIG | 0.918162 | 5.287122 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-04-25T10:33:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 90,
"forks": 23,
"issues": 4,
"pull_requests": 1
},
"file_meta": {
"content_id": "f6ddb24f0... |
43dc63a4-b7a5-463e-a58d-847312aa2735 | Sonins/Algo | BOJ/3108/code.cpp | #include <iostream>
#include <vector>
#define MAX 1010
using namespace std;
bool meet[MAX][MAX];
bool visit[MAX];
typedef struct {
int x1 = 0;
int x2 = 0;
int y1 = 0;
int y2 = 0;
} rec;
bool isMeet(rec r1, rec r2) {
if (r1.y2 < r2.y1 || r2.y2 < r1.y1)
return false;
if (r1.x2 < r2.x1... | ALGO | 0.999868 | 4.590328 | {
"github_metadata": {
"branch": "master",
"commit_count": 324,
"repo_created_at": "2020-01-19T13:31: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": "ec0b4877... |
f7b8e368-5e3f-4976-9664-90a25a650178 | anant-pushkar/competetive_programming_codes | old/summers/cpp/Between_the_Mountains/main.cpp | /*
Project name : Between_the_Mountains
Created on : Tue Jun 3 17:39:49 2014
Author : <NAME>
http://www.spoj.com/problems/ACPC11B/
*/
#include<iostream>
#include<cstring>
#include<cstdio>
#include<deque>
#include<queue>
#include<utility>
#include<vector>
#include<climits>
#include<algorithm>
#include<stack>
using name... | ALGO | 0.999957 | 4.060006 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2014-09-02T12:25:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f42ee5f9d... |
c138a762-cc81-4d0e-b63a-83d546a3855e | vedbulsara04/Cryptography-with-CPP | row_column_transposition.cpp | #include<iostream>
#include<string>
#include<string.h>
#include <bits/stdc++.h>
using namespace std;
void row_col_transpos_encrypt(string message) {
stringstream ss(message);
string word;
string inp[100];
char mess[100][100];
int idx1 = 0, idx2 = 0;
while (ss >> word) {
inp[idx1] = wo... | ALGO | 0.99942 | 4.835511 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-05-13T13:08: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": "c0dc8f61f828... |
5f3f1039-9a21-43fb-b0be-60f5f53eb449 | Mrwatermolen/cppProject | Leecode/61旋转链表.cpp |
//给你一个链表的头节点 head ,旋转链表,将链表每个节点向右移动 k 个位置。
/*
* 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:
... | ALGO | 0.999902 | 5.736678 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2020-11-12T03:09: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": "ef1016fbd... |
edd48b41-c8a6-4ab9-9978-cf51dccda1e3 | kassonlab/gmxapi | src/gromacs/math/coordinatetransformation.cpp | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2019,2020, by the GROMACS development team, led by
* <NAME>, <NAME>, <NAME>, and <NAME>,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*
* GROMACS... | ALGO | 0.937507 | 7.400099 | {
"github_metadata": {
"branch": "master",
"commit_count": 19315,
"repo_created_at": "2017-05-25T14:05:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 13,
"issues": 93,
"pull_requests": 2
},
"file_meta": {
"content_id": "30cb... |
619aad80-b24f-4bf5-8c99-1c73a06b7365 | Autodesk/Central64 | include/central64/smoothing/GreedySmoothing.hpp | #pragma once
#ifndef CENTRAL64_GREEDY_SMOOTHING
#define CENTRAL64_GREEDY_SMOOTHING
#include <central64/smoothing/AbstractSmoothing.hpp>
namespace central64 {
/// A derived class for the greedy smoothing method.
template <int L>
class GreedySmoothing : public AbstractSmoothing<L>
{
public:
explicit GreedySmoothin... | ALGO | 0.998881 | 6.574282 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-07-27T02:39:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 17,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d06a3400f16... |
e9eeff0b-ce95-4c58-889f-546c44dd971f | ishandutta2007/codeforces-nonalphabetic | 353cerega/normal/1654/G.cpp | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define X first
#define Y second
//const ll mod = 1000000007;
const ll mod = 998244353;
ll gcd(ll a, ll b)
{
a = abs(a);
b = abs(b);
if (a==0 or b==0) return a+b;
return gcd(b,... | ALGO | 0.999975 | 4.269526 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:49: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": "8e4d5e6947ce... |
13b3894e-7c2f-4a07-a3c2-eedd3e8cc511 | andremralves/competitiveProgramming | codeforces/round912/b.cpp | /**
* author: mralves
* created: 30-11-2023 13:33:01
**/
#include <bits/stdc++.h>
#define pb(x) push_back(x)
#define all(x) x.begin(),x.end()
using namespace std;
using ll = int64_t;
using pii = pair<int, int>;
ll ceil(ll a, ll b) {return a % b == 0 ? a / b : a / b + 1;}
vector<pii> dir4 = {{1, 0}, {... | ALGO | 0.999716 | 5.419119 | {
"github_metadata": {
"branch": "master",
"commit_count": 147,
"repo_created_at": "2022-09-16T06:11:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ddf7315d... |
07622edb-0634-47f5-a13d-abcbe8d9ed94 | akhilkammila/leetcode-screenshotter | editorial_code/1-999/664. Strange Printer/cpp-0.cpp | class Solution {
public:
int strangePrinter(string s) {
int n = s.size();
vector dp(n, vector<int>(n, n));
for (int length = 1; length <= n; length++) {
for (int left = 0; left <= n - length; left++) {
int right = left + length - 1;
int j = -1;
... | ALGO | 0.999991 | 4.692721 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2023-06-02T16:24:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 912,
"forks": 294,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "728764c... |
bfa260a1-4234-41ac-b332-0a9224a07dc6 | przewooz/ffe_cache | !island_ga_fitness_caching/IslandGA/Selection.cpp | #include "Selection.h"
#include "BinaryCoding.h"
#include "CommandParam.h"
#include "GenePattern.h"
#include "RandUtils.h"
#include "RealCoding.h"
#include "UIntCommandParam.h"
#include <unordered_set>
using namespace std;
template <class TGenotype, class TFenotype>
CSelection<TGenotype, TFenotype>::CSelection(CPro... | ALGO | 0.990907 | 4.77976 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-04-18T09:02: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": "30fc1a1f3a... |
333200f3-e106-4dee-9d1f-fa4d05bd227b | langningchen/XMOJ | UnAC/1038.cpp | #include <iostream>
// #include <cstring>
using namespace std;
int val[1005] = {0};
// bool used[1005][1005]={false};
bool found[1005] = {false};
int main()
{
freopen("count.in", "r", stdin);
freopen("count.out", "w", stdout);
// memset(used,false,sizeof(used));
int n = 0, ans = 0;
cin >> n;
for... | ALGO | 0.999946 | 3.780892 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2023-06-17T12:02:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30cbea509... |
2ac2cfe7-d35c-4549-a7ab-3995550e680f | TheBananaWolf/ECE650-Methods-and-Tools-for-Software-Engineering | project/ece650-prj.cpp | #include <iostream>
#include <sstream>
#include <vector>
#include <regex>
#include <list>
#include <queue>
#include <algorithm>
#include "vertex.hpp"
#include <minisat/core/SolverTypes.h>
#include <minisat/core/Solver.h>
#include <pthread.h>
#include <time.h>
using namespace std;
pthread_mutex_t lock;
pthread_cond_t... | ALGO | 0.999839 | 5.34741 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-11-23T00:40:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af5a0c75839e... |
20fe3645-199d-4acf-baa6-9b1a4eaddcc7 | ualbertagreen/competitive-coding | kattis/kattis_coke.cpp | #include <iostream>
#include <algorithm>
using namespace std;
int memo[151][101][51];
int buy(int c, int c1, int c5, int c10) {
if (c1 < 0 || c5 < 0 || c10 < 0)
return 1500;
if (c == 0)
return 0;
if (c5 == 0 && c10 == 0)
return c * 8;
if (memo[c][c5][c10] != -1)
return memo[c][c5][c10];
memo[c][c5][... | ALGO | 0.997852 | 3.819447 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2021-07-10T01:32: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": "85d9cbbfdee... |
4cce9af8-45ee-4b0e-8af3-23f7a2b86f6b | DivyamVJ0901/Love-Babbar-DSA-Youtube-Course-all-Codes | L62_Binary_Tree.cpp | #include <iostream>
#include <queue>
using namespace std;
class Node
{
public:
int data;
Node *left;
Node *right;
Node(int data)
{
this->data = data;
this->left = NULL;
this->right = NULL;
}
};
Node *TreeFormation(Node *rootNode)
{
cout << "Enter data : " << endl;
... | ALGO | 0.999894 | 4.662606 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-07-26T05:48:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b5186e9102b1... |
d9895f7f-49e2-4ae9-87e4-249d8f5e68f7 | spandey1296/CODEMONK-2022 | Linked List/11_Linked_List_Cycle_II.cpp | // https://leetcode.com/problems/linked-list-cycle-ii/
#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
using ll = long long;
#define endl '\n'
struct ListNode
{
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNod... | ALGO | 0.999973 | 5.146866 | {
"github_metadata": {
"branch": "main",
"commit_count": 179,
"repo_created_at": "2022-09-17T06:08:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 53,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3647cc20... |
d2abe9da-c0ce-4efb-a7aa-8b8da1068399 | ishandutta2007/codeforces-k | krijgertje/normal/935/F.cpp | #include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <list>
#include <cassert>
#include <ctime>
#include... | ALGO | 0.999409 | 4.517151 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06: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": "eff665c9391d... |
a41c30e6-384c-4c92-97b3-6974522a4b82 | suraj-517/Dynamic-Programming-By-Striver | 42_Print_LIS.cpp | // Print Longest Increasing Subsequence (https://leetcode.com/problems/longest-increasing-subsequence/)
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// Algorithmic Approach
// Let dp[i] is the longest increase subsequence of nums[0..i] which has nums[i] as the end element of the sub... | ALGO | 0.999995 | 5.955594 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-09-13T20:18:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa878d617b... |
e7877bac-677d-47d6-ad67-83d63aac184b | krzysztof-turowski/koala-networkit | include/flow/maximum_flow/KrtEdgeDesignator.hpp | /*
* KrtEdgeDesignator.hpp
*
* Created on: 30.03.2023
* Author: <NAME>
* Ported by: <NAME> (<EMAIL>)
*/
#pragma once
#include <map>
#include <optional>
#include <unordered_set>
#include <vector>
#include <networkit/graph/Graph.hpp>
namespace Koala {
class KRTEdgeDesignator {
// Constraint: R0 ... | ALGO | 0.949772 | 6.7485 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2021-10-05T17:07:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 15,
"issues": 15,
"pull_requests": 3
},
"file_meta": {
"content_id": "488fb00... |
dbecb4c7-6cee-4a0f-ab89-fe2ddd6f86e8 | imran-mamin/tower-defense-cpp | src/map_parser.cpp | #include "map_parser.hpp"
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <exception>
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
#include <queue>
#include "enemy_wave.hpp"
#include "json.hpp"
#include "pos.hpp"
#include "vec2d.hpp... | TOOL | 0.903337 | 6.487682 | {
"github_metadata": {
"branch": "master",
"commit_count": 552,
"repo_created_at": "2024-01-21T21:29: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": "0200c2ce... |
b98d1e0c-9fb6-4f0c-a30f-f72a5be2cbb5 | KarlRong/Safe-RL-for-Driving | fmt/cppfmt/src/doublebvp.cpp | #include "doublebvp.h"
#include <math.h>
#include <float.h>
#include <iostream>
#include <algorithm>
#include "matplotlibcpp.h"
#include <map>
#include <string>
std::vector<double> solveBVP(double x0, double x1, double v0, double v1, double T)
{
// 无解的情况没有充分讨论
double x10 = x1 - x0;
if (T < 0)
{
... | ALGO | 0.999962 | 4.456164 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2019-09-20T13:42:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da85b834a... |
f4fe0ec9-82c5-4757-9824-c41fb4a58463 | maheshjainckd/Hacktoberfest2022-for-everyone | CPP/Graph/prims-algorithm.cpp | #include <iostream>
#include <vector>
using namespace std;
int findMin(vector<int> dist, vector<bool> visited)
{
int minValue = INT_MAX, j = -1;
for (int i = 0; i < dist.size(); i++)
{
if (visited[i] == false && dist[i] < minValue)
{
minValue = dist[i];
j = i;
... | ALGO | 0.999998 | 5.121155 | {
"github_metadata": {
"branch": "main",
"commit_count": 1700,
"repo_created_at": "2021-10-22T16:00:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 147,
"forks": 719,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "36db7... |
55d14d75-a26c-4b4c-9821-12e68b6591b8 | ankiit29/MSC | interval.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int fun(int n, vector<vector<int>>& jobs, vector<int>& comp, vector<int>& dp) {
int m = jobs.size();
fill(dp.begin(), dp.end(), 0);
for (int i = 0; i < m; ++i) {
int take = jobs[i][2];
... | ALGO | 0.999936 | 5.52308 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-11-14T09:15: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": "e0b304f3d192... |
631da25e-0e1b-4f77-b7c5-2c660cb1b2c7 | astro-heree/Cpp- | n-queen.cpp | #include<bits/stdc++.h>
using namespace std;
// in O(n^2)
bool safe(vector<string>& board , int row,int n , int col)
{
//left side
int temp_row = row;
int temp_col = col;
while(col>=0)
{
if(board[row][col] == 'Q')
return false;
col--;
}
row = temp_row;
col = te... | ALGO | 0.999987 | 5.330361 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2022-12-26T17:06: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": "d66f404b53... |
17d5c7b6-5d06-4a5f-888e-0bc8c61ea4c4 | qk12/Contest | ICPC/2018/Xuzhou/H-RyujiDosenotWantToStudy.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 5;
struct BIT
{
ll n, bit[maxn];
int lowbit(int x) { return x & -x; }
void add(int pos, ll x)
{
while (pos <= n)
bit[pos] += x, pos += lowbit(pos);
}
ll query(int pos) //区间[1,pos]的和
... | ALGO | 0.999887 | 4.252837 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-10-04T06:21: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": "39ba408183... |
165457c7-119d-4a0b-b2d8-3e1c37e9c09e | loco-3d/crocoddyl | benchmark/all_robots.cpp | ///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2019-2025, LAAS-CNRS, University of Edinburgh,
// Heriot-Watt University
// Copyright note valid unless otherwise stated in individual files.
// All rights reserved.
/////... | ALGO | 0.995206 | 5.91209 | {
"github_metadata": {
"branch": "devel",
"commit_count": 6487,
"repo_created_at": "2019-06-04T11:46:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1024,
"forks": 193,
"issues": 14,
"pull_requests": 3
},
"file_meta": {
"content_id": "0c2... |
42f98549-70ee-41cf-8483-d2e19f52aa39 | joeyuan19/CodeEval | easy/data_recovery.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
vector<int> splitInt(string s) {
string buf = "";
vector<int> v;
int tmp;
for (int i = 0; i < s.size(); i++) {
if (s[i] == ' ') {
stringstream(buf) >> tmp;
... | TOOL | 0.949965 | 3.826483 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-11-06T03:52: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": "faa3276ab9... |
4e9f03a7-5d60-457b-a70d-bc5ba2f8fa69 | cgaueb/ods | ThirdParty/BayesOpt/include/conditionalbayesprocess.hpp | /** \file conditionalbayesprocess.hpp
\brief Kernel based nonparametric process, conditional
on kernel hyperparameters. */
/*
-------------------------------------------------------------------------
This file is part of BayesOpt, an efficient C++ library for
Bayesian optimization.
Copyright... | ALGO | 0.998863 | 7.106678 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-05-15T14:11:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "00f273e32de03... |
91c7f565-8078-4f33-aa04-d0268a81e581 | xfcherish/codeforces | 377/DD.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <cmath>
#include <algorithm>
#include <set>
using namespace std;
#define pb push_back
#define mp make_pair
typedef long long LL;
typedef pair<int,int> PII;
const int maxn = (1e5)+10;... | ALGO | 0.999975 | 3.11195 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2017-04-11T19:41: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": "cfc953887... |
4d22b4d3-3d52-4709-ad95-a736c2dda49f | Lzrui/LeetCode | leetcode_cookbook/Queue/leetcode_641.cpp | #include<bits/stdc++.h>
using namespace std;
class MyCircularDeque {
private:
int front;
int rear;
int capacity;
vector<int> elements;
public:
MyCircularDeque(int k) : front(0), rear(0), capacity(k + 1), elements(vector<int>(capacity)) {}
bool insertFront(int value) {
if (isFull())
return fa... | ALGO | 0.989781 | 5.275003 | {
"github_metadata": {
"branch": "main",
"commit_count": 266,
"repo_created_at": "2022-04-01T04:16: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": "1f9fb6da96... |
f2ef32f7-6641-447e-896c-7eaa2074d4c3 | cyscgzx33/Leetcode-Practice | Algorithm_in_topics/stack/flatten_nested_list_iterator.cpp | /**
* // This is the interface that allows for creating nested lists.
* // You should not implement it, or speculate about its implementation
* class NestedInteger {
* public:
* // Return true if this NestedInteger holds a single integer,
* // rather than a nested list.
* bool isInteger() const;
*... | ALGO | 0.99939 | 6.326736 | {
"github_metadata": {
"branch": "master",
"commit_count": 266,
"repo_created_at": "2018-08-31T18:59:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63742277... |
4ed144fe-87f6-4de7-ba2b-20013f2f8216 | Tomcat-42/maratona_de_programacao | uri_online_judge/beginner/2486.cpp | #include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <sstream>
#include <unordered_map>
#define RECOM_LOWER 110
#define RECOM_UPPER 130
using namespace std;
int main(int argc, char **argv) {
string vit, input;
stringstream ss;
int n, t, total;
const unordered_map<string, int... | ALGO | 0.998428 | 3.691257 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2019-03-15T23:47:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "49df7143f... |
dbd5b1ac-7fac-4e4b-89fa-6a2ebaceded7 | hadron43/codeforces | archives/CF#697/B.cpp | /*
* @hadron43, Expert soon
* Good luck!
*/
#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define maxsize 200000
typedef long long ll;
// map<ll, ll> m;
ll T, q, d, in;
vector<vector<bool>> mat(9);
void solve() {
cin >> q >> d;
for(int i=0; i<q; ++i) {
bool ans = true;
... | ALGO | 0.999126 | 4.253171 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2021-01-18T14:56:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c34252c1... |
674b55e0-5560-41b3-af79-c55d37559486 | oflynned/Computer-Graphics-CS4052 | Lab3/Lab1/main.cpp |
//Some Windows Headers (For Time, IO, etc.)
#include <windows.h>
#include <mmsystem.h>
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <iostream>
#include "maths_funcs.h" //Anton's math class
#include "teapot.h" // teapot mesh
#include <string>
#include <fstream>
#include <iostream>
#include <sstream>
#inclu... | TOOL | 0.944109 | 5.105711 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-09-26T15:28: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": "77c252390... |
ba655688-2c25-4d00-ac1e-20c18a4c432b | Pramodjais517/competitive-coding | GFG must do questions/count the no of islands.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define rs reserve
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define fi(i,s,e,inc) for(auto i=s;i<e;i+=inc)
#define fie(i,s,e,inc) for(auto i=s;i<=e;i+=inc)
#define fd(i,s,e,dec) for(auto ... | ALGO | 0.999904 | 4.270999 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2019-09-14T13:34:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2ead2720... |
398f4796-17b3-4b25-b19c-e4bf7130db55 | MasterIceZ/IMSO | Retired/IceYag.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 100;
struct edge_t {
int u, v, w;
edge_t(int _u, int _v, int _w):
u(_u), v(_v), w(_w) {}
bool operator < (const edge_t& o) const {
return w < o.w;
}
};
struct disjoint_set_union {
int *parent;
int c, n;
d... | ALGO | 0.999946 | 4.404856 | {
"github_metadata": {
"branch": "main",
"commit_count": 127,
"repo_created_at": "2022-01-04T04:37:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "898720a287... |
563de48c-afb8-4fe7-ab0f-734702b8039f | Xin401/PD | c++/mid/p3.cpp | #include <iostream>
using namespace std;
int main()
{
int Wh = 0, Wl = 0, Th = 0, Tl = 0, wood = 0, time = 0, Ph = 0, Pl = 0, max = 0;
cin >> wood >> time >> Wh >> Wl >> Th >> Tl >> Ph >> Pl;
int maxhigh = 0;
maxhigh = min(wood / Wh, time / Th);
for (int i = maxhigh; i >= 0; i--)
{
int ... | ALGO | 0.999702 | 3.6063 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-12-30T05:58: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": "217f06107f... |
285ab2c3-9c3d-42e0-8cbe-4689be684f85 | StuartRiffle/Jaglavak | Source/TreeSearch/BranchSelection.cpp | // JAGLAVAK CHESS ENGINE (c) 2019 <NAME>
#include "Jaglavak.h"
#include "TreeSearch.h"
double TreeSearch::CalculateUct( TreeNode* node, int childIndex )
{
BranchInfo* nodeInfo = node->_Info;
BranchInfo& childInfo = node->_Branch[childIndex];
const ScoreCard& scores = childInfo._Scores;
u64 nodeP... | ALGO | 0.999145 | 5.627588 | {
"github_metadata": {
"branch": "master",
"commit_count": 211,
"repo_created_at": "2019-03-14T20:06:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "16d36c87... |
42952cce-a40a-43c8-a8af-48cb21cc2394 | Yyl06/some-coding | C++/Assignment.cpp | #include <iostream>
#include <string>
using std::string;
#include <cstring>
int main(){
string str = "<NAME>";
char elements;
char blank =' ';
// Create a character array with sufficient size
char charArray[100];
// Copy string to character array
strcpy_s(charArray, str.c_str());
// P... | TOOL | 0.920864 | 3.838762 | {
"github_metadata": {
"branch": "main",
"commit_count": 85,
"repo_created_at": "2025-03-23T08:17: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": "3db15613367... |
f4826053-2f5c-4d5a-b594-4e77b2c5e1d6 | labmec/neopz | Util/pznumeric.h | /**
* @file
* @brief Contains declaration of the TPZNumeric class which implements several methods to calculation.
*/
#ifndef TPZNUMERIC_H
#define TPZNUMERIC_H
#include "pzvec.h"
#include "fad.h"
/**
* @ingroup util
* @brief Implements several methods to calculation. \ref util "Utility"
* @author <NAME>
*/
c... | ALGO | 0.993802 | 5.376693 | {
"github_metadata": {
"branch": "main",
"commit_count": 10847,
"repo_created_at": "2015-04-03T02:18:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 35,
"forks": 11,
"issues": 17,
"pull_requests": 3
},
"file_meta": {
"content_id": "6525b8... |
02ba27e9-cf3d-4a9e-ba9e-5603e9ecf5a8 | YiranK/Leetcode | 102 Binary Tree Level Order Traversal.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
vector<vector<int>> levelOrder(TreeNode* root) {
vector<vector<int>> ans;
vecto... | ALGO | 0.999982 | 5.996401 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2018-07-22T15:32:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "adaf56578... |
67261ad1-604b-4e20-8070-cb56b54bd52d | Shaohua-rue/motion_planner | src/global_planner/sample_planner/src/informed_rrt_star.cpp | #include "informed_rrt_star.h"
Informed_RRT_Star::Informed_RRT_Star(Vector2d _start, Vector2d _goal, vector<vector<double>>& obs, vector<vector<bool>>& obstacle_map_,Vector2d rand_area,
double expand, double goal_sample, int _max_iter,
double _robot_radius){
start = make_shared<Node>(_start[0], _st... | ALGO | 0.999879 | 4.98139 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-06-06T12:39: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": "d7b910aba42f... |
23bb4909-dff5-4738-b443-399f2fd11c88 | cslab-ntua/OPTIMA-ICCS | template_project/optima/src/matrix_vector_generation.hpp | #ifndef MATRIX_VECTOR_GENERATION_HPP
#define MATRIX_VECTOR_GENERATION_HPP
#include <stdlib.h>
#include <vector>
#include <cmath>
#include <unistd.h>
const float FLAG[4] = {-1.0, 0.0, 1.0, -2.0};
inline int max_(int num1, int num2)
{
return (num1 > num2 ) ? num1 : num2;
}
/**
* Find minimum between two numbers.
... | TOOL | 0.981271 | 4.027872 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2021-05-30T14:47:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e3fd387bd67... |
9f14643b-bd73-4701-8c4a-434db285486e | liardety/AlgoImages_TP | src/TP1/include/KFCM.h | //
// Created by Patataa on 02/12/2015.
//
#ifndef ALGOIMAGE_KFCM_H
#define ALGOIMAGE_KFCM_H
#include <assert.h>
#include <bits/stl_bvector.h>
#include <cmath>
#include <numeric>
template <typename F, typename KernelFunctorType>
struct KFCM {
const F m_constA;
const KernelFunctorType & f_kernel;
KFCM(... | ALGO | 0.99824 | 6.425092 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2016-01-26T18:10: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": "a77f7b176... |
a3af48a1-d7e5-43c5-9294-41a6318e027c | pcmaniac23/LeetCode | Binary_Search_Tree_Iterator/Main.cpp | // Problem: Binary Search Tree Iterator
// Algorithm:
// Method 1 (My own solution):
// Use the iterative traversal solution with the use of Stack.
// Each time next() gets called:
// 1. We traverse down the left sub-tree path until we find the left-most child,
// pushing the left children into the Stack and break... | ALGO | 0.999995 | 6.152565 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-03-12T15:19: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": "20ce1c0928... |
cde47715-ecdd-4663-902f-04b28d25ad07 | notiom/Mystudy | leetcode/代码随想录/动态规划/零钱兑换||.cpp | // 1.我自己的解
// 动态规划方程为dp[j] += dp[j - coins[i]]
// 因为新一轮可能的选择为当前上一轮的状态加上这一轮如果选了的状态
class Solution
{
public:
int change(int amount, vector<int>& coins)
{
// 零钱兑换
// 本题是一个完全背包问题
int n = coins.size();
vector<int> dp(amount + 1,0);
dp[0] = 1;
for(int i = coins[0];i... | ALGO | 0.999988 | 5.004887 | {
"github_metadata": {
"branch": "main",
"commit_count": 465,
"repo_created_at": "2024-04-01T08:50: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": "fefdbcb8f6... |
b2d775b1-8e7f-4177-bbd1-dcfab08197f5 | justicezyx/puzzles | place_board.cc | #include "common/common.h"
using namespace std;
struct cover_direction {
bool left_dia;
bool right_dia;
bool vertical;
cover_direction() {
left_dia = false;
right_dia = false;
vertical = false;
}
bool can_place() {
return !left_dia && !right_dia && !vertical... | ALGO | 0.999081 | 3.594944 | {
"github_metadata": {
"branch": "main",
"commit_count": 97,
"repo_created_at": "2013-05-18T01:49:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3581deb62a3... |
d1bbffb2-e1eb-442e-a3f0-b16b9c9a81fc | tsgfx/cpp | cppPractice/2-2-3-05.cpp | #include <iostream>
#define ElemType int
#define MaxSize 10
using namespace std;
typedef struct
{
ElemType data[MaxSize];
int length;
}SqList;
bool initList(SqList &L)
{
L.length = 0;
return true;
}
bool repeatDelete(SqList &L)
{
if(L.length == 0) return false;
int i, j;
for(i = 0, j = 1... | ALGO | 0.999177 | 3.82254 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-03-06T05:16: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": "e4875fac5a8... |
720f7cbc-a353-4b9b-9f0a-fcb75f7f9ed4 | sidvarun/DSA-LeetHub | sqrtx/sqrtx.cpp | class Solution {
public:
int mySqrt(int x) {
int res = 0;
int l = 1;
int r = x;
while(l <= r){
long long int mid = l + (r - l)/2;
if(mid * mid == x){
res = mid;
break;
}
if(mid * mid < x && (mid + 1) * (m... | ALGO | 0.999984 | 4.909903 | {
"github_metadata": {
"branch": "main",
"commit_count": 269,
"repo_created_at": "2021-08-16T07:13: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": "0508ba68e2... |
69c99c58-f2ba-4b07-bda2-a4548e1d8143 | PS1076/snn_project | src/networks.cpp | #include "networks.hpp"
#include "config.hpp"
#include <iostream>
// SNN Implementation with proper SLAYER framework
SNN::SNN(const std::vector<int>& model_size, const slayer::CUBAParams& params)
: model_size(model_size), neuron_params(params) {
// Build CUBA dense blocks
for (size_t i = 0; i < model_... | DATA | 0.952609 | 7.03153 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-06-07T17:22: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": "85b4ab9406dd... |
3b8d9e0b-76ab-4ffc-9d42-68705f7484b6 | llahti/CarND-PID-Control-Project | src/optimizer.cpp | #include "optimizer.h"
#include <iostream>
#include <cmath>
#include <algorithm>
Optimizer::Optimizer() {
setPIDCoefficients(0,0,0);
setChangeCoefficients(1,1,1);
errors_update.clear();
best_PID_coefficients.clear();
control_output.clear();
}
Optimizer::Optimizer(PID* pid ) {
this->setPIDCoefficients(pid-... | ALGO | 0.998335 | 4.732621 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2017-07-31T19:48: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": "6d3f05ab9... |
8c246571-1ccd-4cfc-9790-4e7a8c2e3039 | hxz1998/funny_leetcode | CPP/examination/alibaba/alibaba2022_2.cc | /**
* Created by Xiaozhong on 2022/4/15.
* Copyright (c) 2022/4/15 Xiaozhong. All rights reserved.
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <map>
#include <queue>
#include <functional>
#include <iomanip>... | ALGO | 0.999943 | 3.796039 | {
"github_metadata": {
"branch": "master",
"commit_count": 272,
"repo_created_at": "2020-05-04T22:52:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc6ae371... |
2b5eb5ed-2021-4fa0-a49a-b467dc6dd350 | zulqarnainra/Link-List-in-DSA | LinkedListQueue.cpp | #include <bits/stdc++.h>
using namespace std;
class QNode {
public:
int data;
QNode* next;
QNode(int d)
{
data = d;
next = NULL;
}
};
class Queue {
public:
QNode *front, *rear;
Queue()
{
front = rear = NULL;
}
void enQueue(int x)
{
// Create a new LL node
QNode* temp = new QNode(x);
i... | ALGO | 0.999078 | 3.802816 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-07-04T16: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": "f488f543c771... |
24db6ce0-a1e2-48d0-80b0-9b6a79aff70e | HookUban/c_learning | labuladong_learning/DataStructure.cpp | #include <cstring>
#include <iostream>
#include <vector>
using namespace std;
void my_print(int *arr, int len)
{
for (int i = 0; i < len; i++)
{
cout << arr[i]<<"\t";
}
cout<<endl;
}
//int main()
//{
//// int a[10];
//// memset(a, 0, sizeof(a));
////
//// cout << a[0] << endl;
//// ... | ALGO | 0.985241 | 3.635843 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2025-06-09T09: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": "3ba7b0edcea... |
f8a86ff5-38f3-4292-bfc1-cb9469694af7 | P79N6A/Codes-1 | 2015.1~2015.6/Ice Sculptures/Ice Sculptures/main.cpp | #include <iostream>
#include <cstdio>
using namespace std;
const int MAXN = 2e4 + 111;
int t[MAXN];
int main() {
int ans = 0;
int n; scanf("%d", &n);
for (int i = 1; i <= n; ++i)
{
scanf("%d", &t[i]);
ans += t[i]; //让ans初始为总和
}
for (int i = 2; i <= n / 3; ++i) //至少要留下3个雕像,可暴力的... | ALGO | 0.999966 | 3.440912 | {
"github_metadata": {
"branch": "master",
"commit_count": 232,
"repo_created_at": "2019-04-23T01:06:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f64243a4... |
692e37c2-9ead-4340-8148-afc61fa36ec5 | Senxoq/OOP | LABA3/Project1/Source1.cpp | #include <iostream>
using namespace std;
#include "Header.h"
void Dif(complex a, complex b) {
if (a.Re == NULL || a.Im == NULL || b.Re == NULL || b.Im == NULL) {
cout << "Error NULL";
exit(1);
}
cout << "Re = " << a.Re - b.Re << endl;
cout << "Im = " << a.Im - b.Im << endl;
};
void Castoe(complex a, complex b) ... | ALGO | 0.977454 | 4.031356 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-03-02T07:55: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": "9cf4d85666d1... |
69ead64e-74c3-4e54-ad2f-a45278822535 | vignatej/cses | Contests/codeforces_round_984/4.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
bool contains(string &s, int i){
int n = s.size();
if(i>n-4) return false;
if(s[i]=='1' && s[i+1]=='1' && s[i+2]=='0' && s[i+3]=='0') return true;
return false;
}
signed main(){
int t;
cin>>t;
while(t--){
... | ALGO | 0.999817 | 5.219033 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2024-09-09T05:06: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": "f74d26f1888... |
254fc288-8db5-44b4-9229-bccb21ac7f63 | stone725/AOJ-SourceCode | Volume 11/1187.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RA... | ALGO | 0.999867 | 3.201926 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2014-12-29T00:44:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cb930d28... |
738d149e-7d14-480f-8165-abb64e46c7f8 | dropbox/djinni | support-lib/jni/djinni_support.cpp | //
// Copyright 2014 Dropbox, 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... | TOOL | 0.914825 | 4.104095 | {
"github_metadata": {
"branch": "master",
"commit_count": 471,
"repo_created_at": "2014-09-08T20:09:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2889,
"forks": 487,
"issues": 53,
"pull_requests": 24
},
"file_meta": {
"content_id": "bb... |
4dc2ffea-48b5-4a5e-b706-6c9c28027b62 | AnniCarl20/Programacion--avanzada | En clase/NumeroMayorFrecuencia.cpp | /*********************************************************************************
Autor: <NAME>
Fecha: 27/01/2023
Problema: Crear un arreglo, imprimir el número que más se repita y la frecuencia.
*********************************************************************************/
#include<iostream>
using namespace std;... | ALGO | 0.999827 | 4.844584 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2023-02-03T22:37: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": "1f81b8f236e... |
7708ec37-440a-4ab6-98f5-9da37a392e1b | scepticalbeaver/GraphAlgorithms | s.cpp | //! @file
//! @author <NAME>
//! @brief Problem S. BFS 0-2
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <queue>
#include <limits>
#include <stdexcept>
#include <math.h>
#include <algorithm>
#include <unordered_map>
#ifdef WIN32
#define LLD "%I64d"
#else
#define LLD "%lld"
#endif
using names... | ALGO | 0.999953 | 4.02585 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2015-06-08T10: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": "e88ee2e4b9... |
19aa05a7-5da4-4052-a805-77325c655a4e | devweekends/Fellowship-2025-DSA-Series | Level 1/Week 07/K way merge [Heaps]/IPO/code.cpp | /*
Approach:
Use two heaps:
- Min heap for projects by capital
- Max heap for available projects by profit
At each step, move all projects affordable with current capital to the max heap, then pick the most profitable one.
Time Complexity: O(n log n + k log n)
Space Complexity: O(n)
*/
#include <vector>
#include <q... | ALGO | 0.999983 | 5.830691 | {
"github_metadata": {
"branch": "main",
"commit_count": 83,
"repo_created_at": "2025-06-06T11:54:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 91,
"forks": 17,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "8d13ed2299... |
46d8b3c4-2eed-480a-8d1d-da2459c5659f | Piicksarn/HWDM | headfile/PSO.hpp | #include <opencv2/opencv.hpp>
#include <vector>
#include <string>
#include <cmath>
#include "Target.hpp"
using namespace std;
using namespace cv;
class Agent {
private:
Point position;
Point velocity;
Point best_pos;
double fitness;
double best_val;
double gray_thre_val;
vector<int> goal_se... | ALGO | 0.999565 | 4.033128 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2017-01-04T08:55: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": "874b1069b... |
b9c421ba-ec3a-4ef3-bcd9-8e9db84442a0 | satyajit-patel/algoCamp | recursion/backtracking/1593. Split a String Into the Max Number of Unique Substrings.cpp | class Solution {
public:
/*
Example 1:
Input: s = "ababccc"
Output: 5
Explanation: One way to split maximally is ['a', 'b', 'ab', 'c', 'cc'].
Splitting like ['a', 'b', 'a', 'b', 'c', 'cc'] is not valid
as you have 'a' and 'b' multiple times.
Example 2:
... | ALGO | 0.999822 | 5.928303 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2023-12-22T19:22: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": "fe642e8be... |
78680320-24bd-458d-a8b2-5b00ef301de0 | M0D4/Competitive-Programming-Problems-Solutions | CodeForces/GNU C++17/1749A | Cowardly Rooks/177150261.cpp | #include "bits/stdc++.h"
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#define endl "\n"
#define all(v) v.begin(), v.end()
#define debug(x) cout << #x << " is " << x << endl
#define pow(n, m) (int)powl(n, m)
#define clr(x, value) memset(x, value, sizeof(x))
using nam... | ALGO | 0.999837 | 5.173304 | {
"github_metadata": {
"branch": "main",
"commit_count": 3590,
"repo_created_at": "2022-06-03T20:54:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a74e7370b... |
067fd835-6f6d-4b6f-a6f5-9150872a5328 | anmoanmo/acm_exercises | acm/cf/jly/gray/constructive algorithms/25.cpp | //
// Created by ᕕ(◠ڼ◠)ᕗ on 24-7-31.
//
#include<bits/stdc++.h>
#define ll long long
using namespace std;
void sol() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
if (n & 1) {
cout << 4 << '\n';
cout << 1 << ' ' << n - 1 << '\n';
... | ALGO | 0.999679 | 3.412294 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2023-09-18T13:02:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b12acf1dced... |
a7438fce-5013-4af6-ad0f-43d2d7157df7 | praneetmehta/Lindenmayer-Systems | DrawUtil.h | #include <bits/stdc++.h>
#include <GLFW/glfw3.h>
using namespace std;
class DrawUtil{
public:
struct RGB{
double R;
double G;
double B;
RGB():R(0),G(0),B(0){};
RGB(double _r, double _g, double _b) : R(_r), G(_g), B(_b) {};
};
RGB Colors[4];
void initializeColors()
{
RGB c1(0.0,0.5,0.0); //light g... | TOOL | 0.978132 | 3.962574 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-07-11T15:32:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "92e9010588... |
f8e6c76a-63e8-405c-9b71-b69639a7c262 | mohamedGamalAbuGalala/Practice | Before Summer 2017/SummerTrain Archieve/Source.cpp |
#include "stdafx.h"
//// 6.Sort Sort And Sort.cpp : Defines the entry point for the console application.
////
//
//#include "stdafx.h"
//#include <iostream>
//#include <algorithm>
//
//using namespace std;
//
//struct input {
// int num;
// int mod;
//} a [10001];
//
//int n;
//int m;
//
//bool odd (int x)
//{
// if (... | ALGO | 0.999865 | 3.26795 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2017-11-24T03:37:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d345f111... |
62c27c13-4ee6-437f-bf3d-2f4299686f20 | SynTax19/LeetCode-Solutions | Sort by Set Bit Count - GFG/sort-by-set-bit-count.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
static bool cmp(pair<int,pair<int,int>> p1 , pair<int,pair<int,int>> p2) {
if (p1.first > p2.first) return true;
else if (p1.first == p2.first)
if (p1.second.first < p2.... | ALGO | 0.999939 | 5.542088 | {
"github_metadata": {
"branch": "main",
"commit_count": 276,
"repo_created_at": "2022-01-09T07:46: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": "d4ea2840f5... |
43e436cc-8d23-4321-b5c8-1affe3ce953e | Foxious/phEngine | phEngine/Collision.cpp | #include "stdafx.h"
#include "Collision.h"
#include <assert.h>
bool IsWithin (Box box, const Vector2* points)
{
for (int i = 0; i < 4; ++i)
{
if (points[i].x >= box.position.x
&& points[i].x <= box.position.x + box.size.x
&& points[i].y >= box.position.y
&& points[i].y <= box.position.y + box.size.y)
{... | ALGO | 0.912522 | 5.488377 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2012-11-03T22:37: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": "3a74bfffc... |
55925a5e-750a-4dde-a457-680dc7968853 | Viktor-pnkn/VMK-MK-CONTEST-3 | 3.3.cpp | #include <iostream>
#include <vector>
#include <math.h>
#include <climits>
using namespace std;
int Find(int x, vector<int> & p) {
if (p[x] == x) {
return x;
}
return p[x] = Find(p[x], p);
}
int main() {
int N, M;
cin >> N >> M;
vector<int> p(N);
for (int i = 0; i < N; i++) {
... | ALGO | 0.999721 | 3.711724 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-10-12T18:34: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": "a633b95297... |
e3377186-e2d9-46ce-85d6-2e4a6707f88c | zwkcoding/sas_path_planner | include/sas_space_explore/motion_primitive.hpp | #ifndef INCLUDE_SAS_SPACE_EXPLORE_MOTION_PRIMITIVE_HPP_
#define INCLUDE_SAS_SPACE_EXPLORE_MOTION_PRIMITIVE_HPP_
#include <vector>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <opt_utils/circle.hpp>
#include <opt_utils/vector2d.hpp>
#include "sas... | ALGO | 0.944918 | 5.594466 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-04-23T16:17:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "554c0adb38... |
c53895d9-97af-4b8d-b887-063cd4bedd1f | CodeIsLie/CompetitiveProgramming | Train1/interactive/upper_bound.cpp | //
// Created by admin on 08.09.2018.
//
#include <iostream>
#include <stdio.h>
#include <time.h>
#include <vector>
#include <algorithm>
#include <random>
#include <set>
using namespace std;
void lowerBound(){
int n, start, x;
cin >> n >> start >> x;
vector<pair<int, int>> values;
int maxQueries = 1... | ALGO | 0.999953 | 3.700159 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2018-09-01T17:19:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e77ad9f09... |
daae4014-a15d-4644-9e89-1597fb183842 | slightech/MYNT-EYE-MapLab-Sample | algorithms/map-optimization-legacy/src/landmark-covariance-estimation.cc | #include <map-optimization-legacy/landmark-covariance-estimation.h>
#include <Eigen/Core>
#include <ceres/ceres.h>
#include <gflags/gflags.h>
#include <maplab-common/threading-helpers.h>
#include <vi-map/landmark-quality-metrics.h>
DEFINE_uint64(
cov_estimation_min_landmark_observer_count, 4,
"Minimum require... | ALGO | 0.998074 | 7.522633 | {
"github_metadata": {
"branch": "mynteye-s",
"commit_count": 62,
"repo_created_at": "2018-08-31T13:09:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 17,
"forks": 10,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d593b... |
3445b4df-8e6a-44a9-9886-501c03835e74 | rishisethia258/Cf_solutions | Hamburgers.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define rapido ios_base::sync_with_stdio(false);cin.tie(NULL);cout.t... | ALGO | 0.99987 | 3.579668 | {
"github_metadata": {
"branch": "main",
"commit_count": 128,
"repo_created_at": "2021-10-11T10:01:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "314b4eb48... |
b471f251-718c-43b9-a004-1240a3882dbb | yfliu017258/CPP_programs | CodeForce/Problems/1811A.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
#define rep(i, a, b) for(int i = a; i < b; i++)
#define rrep(i, a, b) for(int i = a; i <= b; i++)
#define rvep(i, a, b) for(int i = a; i >= b; i--)
void f(){
int n;
char d;
string str;
cin >> n >> d >> str;
... | ALGO | 0.998426 | 4.079971 | {
"github_metadata": {
"branch": "master",
"commit_count": 244,
"repo_created_at": "2020-03-27T15:18: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": "8301d682... |
35df3926-ec69-4cc4-9d8f-e53149a18769 | simran-ctrl/100daysofcode | First and last occurrences of X - GFG/first-and-last-occurrences-of-x.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
vector<int> firstAndLast(vector<int> &arr, int n, int X) {
// Code here
int firstOccurrence = -1, lastOccurrence = -1;
// Finding the first occurrence using binary search
... | ALGO | 0.999825 | 6.063967 | {
"github_metadata": {
"branch": "main",
"commit_count": 415,
"repo_created_at": "2023-06-29T17:18:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf701d6bce... |
5c1f84b0-71e4-4850-82a0-aaa5e936ceaf | SparshJain2000/GFG_Solutions | Greedy/maximum-intervals-overlap.cpp | // { Driver Code Starts
// Program to find maximum guest at any time in a party
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
vector<int> findMaxGuests(int Entry[], int Exit[], int N) {
sort(Entry, Entry + N);
sort(Exit, Exit + N);
int num ... | ALGO | 0.999871 | 5.758838 | {
"github_metadata": {
"branch": "main",
"commit_count": 282,
"repo_created_at": "2020-12-10T18:09:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71ed844459... |
58b779d7-32f9-412a-a9dc-19aa8584ed79 | Yoodahun/Studied-in-University | Algorithms/3. Max and Min heap/Algorithm_03_maxHeap/Algorithm_03_maxHeap/main.cpp | //
// main.cpp
// Algorithm_03_maxHeap
//
// Created by 유다훈 on 2017. 9. 21..
// Copyright © 2017년 yoo_dahun. All rights reserved.
//
#include <iostream>
#include <time.h>
#include <stdlib.h>
#include <cmath>
int Parent(int i) {
if( (i%2) == 0) {
return (i-2)/2;
} else {
return (i-1)/2;
... | ALGO | 0.99906 | 3.901469 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-05-05T06:32: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": "4bba1c0237... |
9d0ab6dc-95cd-44f1-b253-21de7456bf67 | gpoussel/copro-plus | codeforces/problems-19xx/1968/B.cpp | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numbers>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define nl '\n'
#define de... | ALGO | 0.99962 | 4.381266 | {
"github_metadata": {
"branch": "main",
"commit_count": 513,
"repo_created_at": "2025-01-04T21:02:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed3eb258ed... |
9ce64956-196e-46a9-bae6-e222fe0dace1 | md1894/c-ds | recursion2_/printSubSetOfArray.cpp | /*
Print Subsets of Array
Send Feedback
Given an integer array (of length n), find and print all the subsets of input array.
Subsets are of length varying from 0 to n, that contain elements of the array. But the order of elements should remain same as in the input array.
Note : The order of subsets are not important. J... | ALGO | 0.999781 | 5.401262 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2019-10-31T17:31:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0830bef... |
be335a7f-a963-413e-8558-f2e1b11cee04 | fightinggg/hexo-blog | themes-configs/hexonext/source/cpp/tree/binary_tree/vantage_point_tree/main.cpp | #include <bits/stdc++.h>
using namespace std;
// 内存池
template <class T>
class memery_pool {
vector<T*> data;
vector<int> used;
vector<T*> rubbish;
public:
memery_pool() { used.push_back(2); }
~memery_pool() {
for (T* p : data) delete[] p;
}
T* get() {
T* res;
if (!rubbish.empty()) {
r... | ALGO | 0.999892 | 5.038043 | {
"github_metadata": {
"branch": "master",
"commit_count": 580,
"repo_created_at": "2020-04-04T08:43: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": "e00569cc... |
6f8b4e96-5c04-4def-95a6-c80f19d3b7bf | Xilinx/mlir-aie | test/unit_tests/aievec_tests/aie2/i8_i32_add_reduce/dut.cc | void dut(int8_t *restrict v1, int32_t *restrict v2) {
int32_t v3 = 0;
int32_t v4 = 4;
int32_t v5 = 8;
int32_t v6 = 16;
int32_t v7 = 32;
v32int32 v8 = concat(broadcast_zero_s32(), broadcast_zero_s32());
size_t v9 = 0;
size_t v10 = 1024;
size_t v11 = 32;
v32int32 v12;
v32int32 v13 = v8;
for (size_... | TOOL | 0.904915 | 3.699118 | {
"github_metadata": {
"branch": "main",
"commit_count": 2231,
"repo_created_at": "2021-08-27T17:36:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 442,
"forks": 135,
"issues": 80,
"pull_requests": 41
},
"file_meta": {
"content_id": "b19b... |
496e6f41-e7af-412a-8b97-a93dd0e1d977 | 12-Algo/Algo | 20241015/junhee/두 큐 합 같게 만들기.cpp | #include <string>
#include <vector>
#include <queue>
using namespace std;
int solution(vector<int> queue1, vector<int> queue2) {
int answer = 0;
vector<int> q;
long long sum1 = 0;
long long sum2 = 0;
for(int i = 0; i < queue1.size(); i++) {
q.push_back(queue1[i]);
sum1 += queue1[i]... | ALGO | 0.999981 | 4.043308 | {
"github_metadata": {
"branch": "main",
"commit_count": 143,
"repo_created_at": "2024-07-15T10:29:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22b08759531... |
a191c6da-d54b-4613-93fd-ccb68de0c278 | HanaYukii/CSES | 1189.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fr(i,j,k) for(int i=j;i<k;i++)
#define f(n) fr(i,0,n)
#define f1(n) fr(i,1,n+1)
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
const int mod = 1e9 + 7;
const int maxn = 2005;
void solve() {
int n;... | ALGO | 0.999988 | 3.757441 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-07-06T17:14:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8009fdb3c... |
af9a6f96-85d1-4342-a8a7-ea25d0b4697c | dhnesh12/codechef-solutions | 04-CodeChef-Hard/86--Chef and Polyhedron.cpp | /**
* author: ks3rr
* created: shiva.shiva.shiva krishna:krishna:krishna
* <NAME>!
**/
#include "bits/stdc++.h"
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order... | ALGO | 0.999986 | 4.046305 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-04-06T05:27: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": "6716aaf91b... |
6dd7404b-c479-4061-8d60-289e21571e96 | flexflow/flexflow-train | lib/runtime/src/parallel_tensor_mapping.cc | #include "parallel_tensor_mapping.h"
using namespace Legion;
namespace FlexFlow {
template <int NDIM, int TDIM>
void map_linear_weight(ParallelTensor weight,
Op const *op,
LegionConfig const &config,
CompMode computationMode) {
using namespace Le... | TOOL | 0.94887 | 6.649622 | {
"github_metadata": {
"branch": "master",
"commit_count": 2614,
"repo_created_at": "2018-12-08T23:43:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1809,
"forks": 240,
"issues": 231,
"pull_requests": 14
},
"file_meta": {
"content_id": "... |
b028ebdc-2b72-44f3-b2dd-7cbf1789329a | Kuu44/Coding-Projects | C/CProgs/OOP/cpp-master/lab5/Integer.cpp | /********
*
* <NAME>
* lab 5
*
* problem 3
*
* 3.Compare the two object that contains integer values that demonstrate the overloading of equality (==), less than (<), greater than (>), not equal (!=),greater than or equal to (>=) and less than or equal to(<=) operators.
*/
#include <iostream>
#define SUCCES... | ALGO | 0.920784 | 4.381704 | {
"github_metadata": {
"branch": "master",
"commit_count": 116,
"repo_created_at": "2019-11-03T16:38:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1d600457... |
3a8ce3df-82a8-4dc4-8e7c-f4af3c0c4bbe | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1245/Standings4/29600558_64030361.cpp | #include <iostream>
#include <algorithm>
#include <cstdlib>
const int N = 2000;
using ll = long long;
int abs(int x) {
return x < 0 ? -x : x;
}
int x[N + 5], y[N + 5];
int c[N + 5], k[N + 5];
int n;
int is[N + 5], ini[N + 5];
ll toc[N + 5];
int rc[N + 5], rt, pr[N + 5][2], pt;
struct EE {
int a, b;
... | ALGO | 0.999919 | 3.632109 | {
"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": "22db2b7fc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.