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 |
|---|---|---|---|---|---|---|---|
e1701e40-bf95-4b80-bc04-fddc08bb01eb | divlalwani/csci_b657_Computer_Vision | project/recognition.h | #include "opencv2/ml/ml.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
using namespace cv;
using namespace std;
const int train_samples = 10;
const int classes = 10;
const int sx = 20;
const int sy = 30;
const int Image... | DATA | 0.96597 | 4.547482 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2014-11-14T21:33:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba5744b7af... |
bff0f940-c788-47c0-aa4e-3063f0465ecd | ishandutta2007/codeforces-f | ffao/normal/1179/B.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
... | ALGO | 0.999922 | 3.075797 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:43: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": "196379e267df... |
13fab312-9ada-4f20-b8b1-ebf48c651bfb | millie4/INF1015-TD1-H23-Fichiers | NombresPremiers.cpp | #include <iostream>
using namespace std;
#include <cmath>
int main () {
int nombre; // notre nombre entier
bool estPrime = true;
cout << "Entrez un nombre entier : ";
cin >> nombre;
// O et 1 ne sont pas des nombres premiers
if (nombre == 0 || nombre == 1) {
estPrime = false;
}
... | ALGO | 0.993815 | 3.459181 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2023-01-17T17:55:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "397d88e29... |
54b8f7dd-e1fa-449f-848b-81639c0b8b5c | stden/olymp | ru-olymp-train-winter-2007/Submits/070117b/18_16_51_12_E_1311.CPP | #include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
using namespace std;
typedef long long LL;
typedef long dou... | ALGO | 0.999959 | 3.511498 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2012-07-23T22:46:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "086b43c0fa... |
e0b3c574-2583-4ab2-9b51-542e828a0729 | ping-ter/ping-ter.github.io | src/algorithm_study/tree/tests/tozip.cpp | #include <stdio.h>
#include <limits.h>
#include <queue>
#include <stack>
#include <list>
using namespace std;
struct node
{
int data;
int max_sum;
int max_route_len;
static node *nullNode;
node *leftChild;
node *rightChild;
node *parent;
int rank;
node(int data)
{
max_su... | ALGO | 0.999994 | 4.180336 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2023-11-19T04:58:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0c3a3a1eb... |
3d678ee6-ed10-46cd-a544-dd28fb2eb465 | hubcio2115/cpp | main.cpp | #include <iostream>
class Point {
private:
int x;
int y;
public:
Point(int x, int y) : x(x), y(y) {}
Point(const Point &point) {
x = point.x;
y = point.y;
};
[[nodiscard]] std::string toString() const {
return "x: " + std::to_string(x) + ", " + "y: " + std::to_string(y... | TOOL | 0.951656 | 5.868809 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-03-09T14:45: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": "4403b3bbae3a... |
1b768ae8-74db-47ee-9286-0f1d778fc138 | bmusuko/aoc2023 | 4/part_1.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <set>
#include <sstream>
#include <cmath>
// Function to print a set
void printSet(const std::set<int>& s) {
for (const int& value : s) {
std::cout << value << " ";
}
std::cout << std::endl; // Print a newline afte... | ALGO | 0.991696 | 5.305634 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2023-12-08T08:27:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "15e62c8fc... |
a95cb9c8-98a4-4ae9-8afc-524afc58dafb | huozhi/algorithm | leetcode/sudoku-solver.h | /*
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
A sudoku puzzle...
Note:
Solution:
validate each new point
dfs, like n-queens
*/
class Solution {
public:
bool valid(vector<vec... | ALGO | 0.999663 | 6.535936 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2014-03-30T09:24:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a1a25f44a... |
bebab56f-8554-4c8d-ba85-15a2f6e5a4c9 | wakamebu/AtcoderPractice | abc300/c/main.cpp | #include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll = long long;
using P = pair<int,int>;
using Graph = vector<vector<int>>;
#define OVERLOAD_REP(_1, _2, _3, name, ...) name
#define REP1(i, n) for (auto i = std::decay_t<decltype(n)>{}; (i) != (n); ++(i))
#define REP2(i... | ALGO | 0.999974 | 3.799186 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-12-03T11:43:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52db4cbb7e... |
e6a928fa-cfe9-4a88-95ed-7e223702bb76 | tutuwu2019/cpp_code | sort/bubble.cpp | #include <iostream>
#include <vector>
template<typename T>
void func(std::vector<T>& vec){
int n = vec.size();
for(int i = 0; i < n - 1; i++){ //循环的次数 只需要循环 n - 1 轮
for(int j = 0; j < n - 1 - i; j++){ // 比较的次数 n - 1 -i 次 因为前面排好顺序了就不用再排序了
if(vec[j] > vec[j + 1]){
... | ALGO | 0.999548 | 5.291654 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2024-05-23T10:36:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec4f6bb203... |
bc32e2f1-6da9-41d1-a67f-473997e425fe | grinisrit/inq | examples/nitrogen_paper.cpp | /* -*- indent-tabs-mode: t -*- */
/*
Copyright (C) 2019 <NAME>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
... | ALGO | 0.963923 | 4.275998 | {
"github_metadata": {
"branch": "master",
"commit_count": 3692,
"repo_created_at": "2022-05-04T09:41: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": "3eebf63... |
5a40bedc-0b2d-4120-8a0f-6b6fadd37449 | Yaswanth-2874/Code-forces | C_2_Skibidus_and_Fanum_Tax_hard_version.cpp | #include <bits/stdc++.h>
#define int long long
using namespace std;
// optimally b[j] - a[i] value must be as close to prev as possible
class Solution {
public:
void solve() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (auto& input : a) {
cin >> input;
... | ALGO | 0.999981 | 3.967436 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-08-08T14:58: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": "0f5ece34ee8... |
b93deac6-f117-4614-ad22-90e922421d0c | puspraj-india/Miscellaneous-cpp | applylovesone.cpp | #include <iostream>
#include <cstdlib>
#include <algorithm>
using namespace std;
void max_val(int *arr, int n_arr, int *Max, int &sec_max)
{
int temp;
int count = 0;
int left = 0, right = n_arr - 1;
while (arr[left] == 1 && left < n_arr)
left++;
if(left < n_arr)
{
for(int i = ... | ALGO | 0.999927 | 3.730145 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-02-12T15:23:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c20a24180f... |
241159d2-475e-4e55-82cc-85fd59ab03f1 | AmarKumar-AK/College-Courses | computer-graphics-masilamani/lab8/q2.cpp | #include <bits/stdc++.h>
#include <GL/glut.h>
using namespace std;
// triangle coordinates
int t_x1 = 650, t_y1 = 300, t_x2 = 750, t_y2 = 350, t_x3 = 700, t_y3 = 250;
// width and height of screen
int width = 1200, height = 600;
float borderCol[3] = {1.0, 0.0, 0.0};
// for checking if point lies inside triangle
float ... | ALGO | 0.971876 | 4.325951 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2020-10-22T18:33:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d1aec7b482... |
f09a9868-1c49-44bb-8fbe-1121ed267b52 | Jun2-Lee/AlgorithmStudy | Junhee/week 4/2116_주사위 쌓기.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int answer = 0;
int n;
int square[10001][6];
// 0, 5 짝 1, 3 짝 2, 4 짝
int find_back(int front) {
switch (front) {
case 0:
return 5;
case 1:
return 3;
case 2:
return 4;
case 3:
return 1;
case 4:
return 2;
case 5:
return ... | ALGO | 0.9999 | 3.847893 | {
"github_metadata": {
"branch": "main",
"commit_count": 317,
"repo_created_at": "2024-03-11T12:32:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff7227d683... |
301d580f-066a-496d-b8ef-bdbc2363eb2a | nh0znoisung/Online_Judge-Competitive_Programming | VNOI/2022/South/l.cpp |
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ccomplex>
#include <cfenv>
#inc... | ALGO | 0.999657 | 4.651141 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-10-28T13:33: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": "fb3f463050e... |
76432b46-a2f7-4140-b455-35434368a5fb | ishandutta2007/codeforces-g | greencis/normal/1400/B.cpp | #include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
using namespace std;
using ld = long double;
using ll = int64_t;
using pii = pair<int, int>;
using ull = uint64_t;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int ttt;
... | ALGO | 0.99956 | 3.730539 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:55: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": "f41c5c1afe1a... |
ebcf0da4-ddd7-4fd4-b343-4abd57ab14d5 | EluvK/LeetCode | algorithm/257.二叉树的所有路径.cpp | /*
* @lc app=leetcode.cn id=257 lang=cpp
*
* [257] 二叉树的所有路径
*/
// @lc code=start
/**
* 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<st... | ALGO | 0.999918 | 6.167385 | {
"github_metadata": {
"branch": "VScode-LC-plugin",
"commit_count": 123,
"repo_created_at": "2020-01-07T14:22: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":... |
586c57dc-17ff-43ea-977c-8a6de7e5ad89 | mahmoudfarouq/theRepo | miniProjects/github project/5Problems.cpp | //https://github.com/mvillaloboz/5problems
#include <iostream>
using namespace std;
//problem 1
int for_loop(int *arr, int len){
int sum = 0;
for(int i = 0; i < len; i++)
sum += arr[i];
return sum;
}
int while_loop(int *arr, int len){
int sum = 0;
while(len > 0)
{
sum += arr[--... | ALGO | 0.999537 | 3.85626 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-06-08T14:31:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f4846cd5... |
9b591075-b5b0-45f2-87ed-e52728d0f984 | MaybeShewill-CV/mortred_model_server | src/models/object_detection/centerface_detector.inl | /************************************************
* Copyright MaybeShewill-CV. All Rights Reserved.
* Author: MaybeShewill-CV
* File: CenterFace.cpp
* Date: 23-10-18
************************************************/
#include "centerface_detector.h"
#include <random>
#include "MNN/Interpreter.hpp"
#include "glog... | ALGO | 0.943228 | 5.783226 | {
"github_metadata": {
"branch": "main",
"commit_count": 1045,
"repo_created_at": "2022-06-02T03:31:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 43,
"forks": 9,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c5fcb78... |
8d57ad8c-52aa-4070-9c6c-8a6e79f87387 | enitink/prj | generic/codes/leetcode/neetcode-islandandtreasure.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
class Solution {
public:
void islandsAndTreasure(vector<vector<int>>& grid) {
int n = grid.size(),i,j;
int m = grid[0].size();
queue<pair<int, int>> multiSourceQueue;
for (i = 0; i < n; i++) {
... | ALGO | 0.999861 | 5.685762 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2014-02-02T13:22: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": "4362d352... |
c2ed1d8a-e3d0-438d-b35f-d19e20f92cbc | ayushjha1064/The-Huffman-Highway-230258 | Assignment-6/question3.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <tuple>
using namespace std;
struct Point {
int x, y, z;
};
bool isValid(int x, int y, int z, int X, int Y, int Z, vector<vector<vector<int>>> &grid, vector<vector<vector<bool>>> &visited) {
return (x >= 0 && x < X && y >= 0 && y < Y && z >= 0 &... | ALGO | 0.999939 | 5.895073 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-05-19T18:24: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": "664c4a6bb92... |
c59e9a63-bf20-4aa9-b28a-d0e82c64c043 | sojungoh/algorithm-ps | 2022_kakaotech_internship/03.cpp | #include <bits/stdc++.h>
using namespace std;
int dp[181][181];
int solution(int alp, int cop, vector<vector<int>> problems) {
int answer = 0, max_alp = 0, max_cop = 0;
// find the largest alp and cop
for(vector<int> vec : problems) {
max_alp = max(max_alp, vec[0]);
max_cop = max(max_cop, vec[1]);
}
alp ... | ALGO | 0.999466 | 4.400544 | {
"github_metadata": {
"branch": "main",
"commit_count": 351,
"repo_created_at": "2021-03-18T14:25: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": "0b5ae537e9... |
2ad109d7-831b-4b72-aa5e-393b2d7a3428 | actium/codeforces | 1200/60/1264a.cpp | #include <iostream>
#include <vector>
template <typename T>
std::istream& operator >>(std::istream& input, std::vector<T>& v)
{
for (T& a : v)
input >> a;
return input;
}
void answer(unsigned x, unsigned y, unsigned z)
{
std::cout << x << ' ' << y << ' ' << z << '\n';
}
void solve(const std::vec... | ALGO | 0.999391 | 4.707179 | {
"github_metadata": {
"branch": "master",
"commit_count": 4876,
"repo_created_at": "2020-06-17T16:27:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32278da... |
da668199-39d4-487a-b54a-7fad7d54b034 | RainerGrimm/DesignPatternsAndArchitecturalPatterns | solution/hiddenFriendExplicit.cpp | #include <iostream>
class MyDistance{
public:
explicit MyDistance(double i):m(i){}
friend MyDistance operator +(const MyDistance& a, const MyDistance& b){
return MyDistance(a.m + b.m);
}
friend MyDistance operator +(const MyDistance& a, double b){
return MyDistance(a.m + b);
}
... | TOOL | 0.976983 | 5.08639 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2022-08-07T15:01:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3887aa2a53... |
92922ad4-ae87-446e-8358-9ada0fcc2ba8 | ClarkWang1214/FaceAR_Detect_Demo | include/rcr/landmarks_detect.hpp | #pragma once
#ifndef LANDMARK_DETECT_HPP_
#define LANDMARK_DETECT_HPP_
#include "landmark.hpp"
#include"rcr/pre_frame_params.hpp"
#include"rcr/model.hpp"
#include"rcr/landmarks_stabilize.hpp"
#include "rcr/face_detect.hpp"
#include "rcr/camshift_tfy.hpp"
#include <opencv2/opencv.hpp>
#include <iostream>
#include <cstr... | ALGO | 0.960508 | 4.200748 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-09-21T11:04:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d48ef004f... |
7be98611-a7c1-4e7e-8da5-dd46c6cd3423 | Nath-Sant/Fatec | 2°Semestre/Estrutura de dados/EDD 7 - Função recursiva/Exercicio18/Exercicio18.cpp | #include <stdio.h>
#include <ctype.h>
#include <string.h>
int palRec(char s[], int p, int u) {
if (p >= u) { // condição de parada: quando não há mais caracteres para comparar
return 1; // a string é palíndroma
} else {
// ignorando brancos
while (isspace(s[p])) {
p++;
... | ALGO | 0.9998 | 4.398662 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2023-11-01T00:18:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4eae214728... |
34bd523a-a883-4101-937e-fd740c39ed40 | chinhhi102/GiaiThuat | codeforces/Math/Summarize to the Power of Two.cpp | #include <map>
#include <set>
#include <queue>
#include <cmath>
#include <vector>
#include <cstdio>
#include <bitset>
#include <cstring>
#include <cstdlib>
#include <complex>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <iomanip>
#include <list>
#include <tuple>
#include <ctype.h>
#include <stack... | ALGO | 0.999668 | 3.397614 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-12-01T05:23: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": "18de8c9644... |
9f7ae26b-8c17-45a3-9a3b-35116222d3c4 | robvoe/embedded-util | StringUtil/general_string_functions.cpp | /*
* general_string_functions.c
*
* Created on: 27.07.2020
* Author: <NAME>
*
* Description:
* Contains general string functions.
*/
#include "general_string_functions.h"
#include <stdint-gcc.h>
#include <string.h>
namespace StringUtil {
char *trim(const char *input_string, bool insert_trailing_n... | TOOL | 0.967408 | 6.925277 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2020-03-28T17:16: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": "1a71e505d... |
f8bcbe7f-00c2-4ffc-a40a-1f93b40b08bc | vishnu1777/Algorthms_And_Data_Structures | Arrays/4Sum.cpp | #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<set>
#include<vector>
using namespace std;
// Given an array nums of n integers, return an array of all the
// unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:
// 0 <= a, b, c, d < n
// a, b, c, and d are distinct.
// nums[a] + nums[... | ALGO | 0.999946 | 5.273636 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2023-04-08T16:54:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71ca0fb0b29... |
782842fb-64f8-4b8d-a935-44e909d07c31 | Nouzan/Data-Structure | data-structure/BinarySearchTree.cpp | #pragma once
#include <iostream>
using namespace std;
template<typename T>
class BSTree {
private:
T value;
BSTree *left;
BSTree *right;
BSTree *parent;
int height;
static bool cmp(const T& a, const T& b) {
return a < b;
}
BSTree *successor() {
if(right != NULL) {
BSTree *y = this;
BSTree *x = right... | ALGO | 0.999899 | 4.35409 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2018-05-01T01:04: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": "0b864d638... |
2523e351-8357-4204-b90a-f3832a583795 | prayaglehana/Coding-Problems | geeksforgeeks/hashing/nuts_bots.cpp | #include <iostream>
using namespace std;
int main() {
int T;
cin>>T;
int ar[9];
while(T--){
int N;
cin>>N;
for(int i=0;i<9;++i) ar[i]=0;
for(int i=0;i<N;++i){
char ch;
cin>>ch;
if(ch=='!') ar[0]=1;
else if(ch=='#'... | ALGO | 0.988599 | 3.357824 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-08-15T18:45: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": "c36220af1f... |
1319bd45-302b-4e5b-9a13-b694eda4f193 | Simonhancrew/SCL | Graph/BFS/边权恒定最短路/Leetcode2045-到达目的地的第二短时间.cpp | #include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> PII;
#define x first
#define y second
const int INF = 0x3f3f3f3f;
int n, changes;
vector<vector<int>> edges;
string input;
class Solution {
public:
int secondMinimum(int n, vector<vector<int>>& ed... | ALGO | 0.999839 | 4.374817 | {
"github_metadata": {
"branch": "main",
"commit_count": 738,
"repo_created_at": "2021-08-08T02:13:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9660bddfa4... |
10723c3c-fff5-4054-9b3a-026b178b6092 | dtecta/solid3 | src/convex/DT_TriEdge.cpp | /*
* SOLID - Software Library for Interference Detection
*
* Copyright (C) 2001-2003 Dtecta. All rights reserved.
*
* This library may be distributed under the terms of the Q Public License
* (QPL) as defined by Trolltech AS of Norway and appearing in the file
* LICENSE.QPL included in the packaging of this f... | ALGO | 0.997583 | 6.319908 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2016-08-17T19:08:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 100,
"forks": 17,
"issues": 1,
"pull_requests": 4
},
"file_meta": {
"content_id": "ef2b62... |
2bc2f33c-25f1-413e-b862-67e9d4e94d1f | drlongle/leetcode | algorithms/problem_1498/solution.cpp | /*
1498. Number of Subsequences That Satisfy the Given Sum Condition
Medium
Given an array of integers nums and an integer target.
Return the number of non-empty subsequences of nums such that the sum of the minimum and maximum element on it is less or equal than target.
Since the answer may be too large, return it ... | ALGO | 0.999975 | 6.41209 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2017-02-08T14:00:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "48abdeb... |
b40776b7-bb7e-4e12-ba4c-d9c81ce7f80b | ozgurcekmer/CUDA-NvidiaBlog | 1_EasierIntroduction/codes/Parameters.h | #pragma once
#include <complex>
#include <cmath>
#include <vector>
typedef float Real;
/* VECTOR SIZE:
1<<25 : 34M
1<<24 : 17M
1<<23 : 8M
1<<22 : 4M
1<<21 : 2M
1<<20 : 1M
1<<14 : 16k
*/
// Vector dimension
const size_t N = 1 << 25;
//const size_t N = 72 * 1024;
static const s... | TOOL | 0.940006 | 3.125161 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2023-12-24T09:14:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "738c72249e6... |
89bbe387-0000-48a9-8c29-be02f2d8d1f7 | Ri-Nai/CompetitionCode | ACM/2024-2025-1/牛客多校/3/Bridging_the_Gap_2.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> Pr;
#define End(X) return cout << (X) << '\n', void()
bool Nai;
int rd()
{
int res = 0, f = 1;
char c;
do
(c = getchar()) == '-' && (f = -1);
while (!isdigit(c));
while (isdigit(c))
res = (c ^ ... | ALGO | 0.999979 | 3.097651 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-04-28T09:32: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": "96299ff82a1... |
339f37d7-5027-49b6-8071-c18a1c21eef0 | nmslib/nmslib | query_server/cpp_client_server/QueryClient.cpp | /**
* Non-metric Space Library
*
* Main developers: <NAME>, <NAME>, <NAME>, <NAME>, <NAME>
*
* For the complete list of contributors and further details see:
* https://github.com/nmslib/nmslib
*
* Copyright (c) 2013-2018
*
* This code is released under the
* Apache License Version 2.0 http://www.apache.org/l... | CONFIG | 0.91567 | 6.381349 | {
"github_metadata": {
"branch": "master",
"commit_count": 1581,
"repo_created_at": "2013-07-10T11:06:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3515,
"forks": 458,
"issues": 88,
"pull_requests": 8
},
"file_meta": {
"content_id": "91... |
d0cec215-4804-46f2-ad7c-010ae18cc656 | mforde84/RNAseq_BigMechanism_DARPA | STAR/source/BAMbinSortByCoordinate.cpp | #include "BAMbinSortByCoordinate.h"
#include "ErrorWarning.h"
#include "serviceFuns.cpp"
#include "BAMfunctions.h"
void BAMbinSortByCoordinate(uint32 iBin, uint binN, uint binS, uint nThreads, string dirBAMsort, Parameters *P) {
if (binS==0) return; //nothing to do for empty bins
//allocate arrays
char *b... | ALGO | 0.992335 | 5.089263 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-12-20T21:40:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71ac460f5f... |
d3bbb4bd-7ca9-4e09-87ac-27345a44c6fb | LutsenkoAnton/simple-9-game | main.cpp | #include <bits/stdc++.h>
using namespace std;
const int SZ = 3;
using Matr = vector<vector<int>>;
set<Matr> used;
void print_matrix(const Matr& matrix) {
for (int i = 0; i < SZ; ++i) {
for (int j = 0; j < SZ; ++j) {
cout << matrix[i][j] << ' ';
}
cout << '\n';
}
cout... | ALGO | 0.999998 | 4.671938 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-10-16T06:04: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": "7dbfcd7e8df0... |
bc23c844-e1a2-4e64-b6f7-0b2d0384180e | busebd12/InterviewPreparation | LeetCode/C++/General/Hard/CrackingTheSafe/solution.cpp | #include <cmath>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
/*
Solution: inspired by these resources
1) https://www.youtube.com/watch?v=NejzI9DxwjM
2) https://leetcode.com/problems/cracking-the-safe/solutions/708740/dfs-with-explanation-clean-code/
Time Complexity: O(|V| + |E|)... | ALGO | 0.999965 | 6.007727 | {
"github_metadata": {
"branch": "master",
"commit_count": 218,
"repo_created_at": "2015-12-15T14: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": "e70991b2... |
1779d970-adf9-44a9-956f-45d217703f57 | AgustinRoca/Arqui-TP | Snake.cpp | #include "Snake.h"
// TODO: Chequear constraints iniciales
Snake::Snake(uint16_t initialLength, Direction initialDirection, uint32_t initialSpeed, uint16_t initialRow, uint16_t initialColumn, uint16_t _columns, uint16_t _rows) {
currentDirection = initialDirection;
currentLength = initialLength;
currentSpeed = i... | TOOL | 0.943593 | 5.471409 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2019-06-05T20:19: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": "cec36df4e... |
19a70dcc-ed87-4c0f-87ee-b023b2b2899c | oscarlaaaa/fun-algo-stuff | LeetCode/Medium/1962_Remove_Stones_to_Minimize_the_Total/Solution.cpp | // 2022-12-27 (heap)
class Solution {
public:
int minStoneSum(vector<int>& piles, int k) {
/*
input: list of int num of stones in piles, int k
output: minimum total of stones after applying k operations
notes:
- operation = removing floor(piles[i]/2) from a p... | ALGO | 0.999249 | 6.029055 | {
"github_metadata": {
"branch": "main",
"commit_count": 327,
"repo_created_at": "2022-05-01T01:58:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "426fe2ad90... |
90d7e4c1-c324-4ef2-b8b6-573e8d74b12c | resilient-swarms/ASVLite | c_legacy/dependency/VTK-9.1.0/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/particleadvection/ParticleAdvectionWorklets.h | //============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURP... | ALGO | 0.996065 | 6.438882 | {
"github_metadata": {
"branch": "master",
"commit_count": 807,
"repo_created_at": "2018-11-13T16:27:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 26,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "131b5c6... |
e9638e61-c3c5-4e6e-9b57-f99e904954b5 | Manish-Sharma26/DSA | Day26/C_Professor_and_Propose_Day.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string reduce(string word)
{
string ans = "";
for (int i = 0; i < word.length(); i++)
{
if (word[i] == word[i + 1])
{
continue;
}
ans += word[i];
}
return ans;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie... | ALGO | 0.999958 | 4.176637 | {
"github_metadata": {
"branch": "Main",
"commit_count": 40,
"repo_created_at": "2024-12-21T08:31: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": "bc846f130d2... |
ffeb880e-0a1b-480d-91bf-9fcfa9e78526 | produdez/C-Fundamental-182 | Stolen/Lab7(Class)/Question6/Template_code_Question_179.cpp | /**
Faculty of Computer Science and Engineering
Ho Chi Minh City University of Technology
Programming fundamentals - spring 2019
Lab 07: 07004b_ini.cpp
@author CSE - HCMUT
@version 1.0 Fri Apr 26 15:55:21 2019
*/
#include <iostream>
#include <fstream>
#include <string>
#include <cstring>
#inclu... | TOOL | 0.92698 | 4.171247 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-11-17T03:01: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": "10312019c7... |
92bf8a10-36f3-4ec4-ba46-0cd8f97e4f51 | gabriel88766/C-CPP-AlgorithmsAndContests | Codeforces/1016/B.cpp | #include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
const ll INF_LL = 0x3f3f3f3f3f3f3f3f, MOD = 998244353; //1e9+7
const int INF_INT = 0x3f3f3f3f;
const long double PI = acosl(-1.), EPS = 1e-9;
using namespace std;
//cout << fixed << setprecision(6)
int main(){
ios_base::sync_wi... | ALGO | 0.999967 | 4.238038 | {
"github_metadata": {
"branch": "master",
"commit_count": 436,
"repo_created_at": "2020-08-21T00:21:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "abcab178... |
b9e070bd-9e05-4459-968e-53e3e3739253 | NVIDIA/cutlass | include/cutlass/epilogue/threadblock/epilogue_workspace.h | /***************************************************************************************************
* Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are p... | ALGO | 0.975463 | 7.001846 | {
"github_metadata": {
"branch": "main",
"commit_count": 667,
"repo_created_at": "2017-11-30T00:11:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8078,
"forks": 1336,
"issues": 322,
"pull_requests": 54
},
"file_meta": {
"content_id": "6c... |
00ee4886-0aeb-4612-a992-56f90316d8ac | CodewithMK180105/DSA-using-Cpp | Aptitudes/ION.cpp | // Problem Statement: Minimum Processing Time
// You are given:
// 1. An integer array requiredMemory where requiredMemory[i] represents the amount of memory required to process the ith program.
// 2. An integer array processType where processType[i] represents the type of the i th program.
// 3. An integer maxMemory ... | ALGO | 0.999984 | 6.945662 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2024-10-17T16:16:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f17ab9b0ea... |
65a124c6-c121-4592-a11b-2aa1ddeb7ed4 | mpsilfve/mpsilfve | hfst/fst_corpus_weights/path_utils.cc | #include "path_utils.hh"
#ifndef TEST_path_utils_cc
#include <iostream>
using hfst::StringVector;
using hfst::implementations::HfstState;
using hfst::HfstBasicTransition;
using hfst::StringPair;
using hfst::StringPairVector;
static std::string epsilon("@_EPSILON_SYMBOL_@");
bool is_special_char(const std::string &... | TOOL | 0.990697 | 5.842355 | {
"github_metadata": {
"branch": "master",
"commit_count": 220,
"repo_created_at": "2014-09-19T13:17:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac1ef511... |
1b6d6845-4e5a-4086-8b89-610c9a4ac283 | itwitch13/parallel-solutions | DisariumNumber/mpiDisarium.cpp | #include <iostream>
#include <list>
#include <math.h>
#include <numeric>
#include <fstream>
#include <string>
#include <mpi.h>
using namespace std;
list <int> separate_digits(int number){
list <int> separated;
while(number > 0){
int digit = number % 10;
number /= 10;
separated.push_... | ALGO | 0.99479 | 4.206369 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-03-12T09:58:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c44ce38b5fc8... |
b8ebcc31-b813-4775-b018-9f5acebb46b5 | PosPse/C- | DataStruct/1、线性表的顺序表示和实现.cpp | #include <iostream>
using namespace std;
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define LIST_INIT_SIZE 100
typedef int ElemType;
typedef int Status;
typedef struct {
ElemType *elem;
int length;
}Sqlist;
//构造一个空的线性表L
Status InitList(Sqlist &L) {
... | ALGO | 0.999635 | 3.696434 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2020-05-31T15:03: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": "f1ef24cfa... |
93625322-0969-4dd2-a797-2ef4a2f71860 | OpenSees/OpenSees | SRC/analysis/algorithm/equiSolnAlgo/BFGS.h | /* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... | ALGO | 0.994354 | 5.613167 | {
"github_metadata": {
"branch": "master",
"commit_count": 8721,
"repo_created_at": "2018-09-12T00:49:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 667,
"forks": 719,
"issues": 42,
"pull_requests": 23
},
"file_meta": {
"content_id": "6f... |
5b4adc75-bb7e-4f70-86d9-fd4ce4ae4663 | RosettaCommons/rosetta | source/src/core/conformation/symmetry/SymmetryInfo.cc | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | TOOL | 0.936662 | 6.740236 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "010f... |
05f858e1-bf61-4cf3-be38-0e2de4a7de24 | JainitBITW/CP | codeforces/ladder a/100.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define FOK(i, a, n) for (int i = n; i > a; i--)
#define JALDI ios_base::sync_with_stdio(false);
#define jaldi cin.tie(NULL);
#define F first
#define MP make_pair
#define PB push_back
#define S second
#define nl cout << endl
... | ALGO | 0.998823 | 3.451654 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-05-04T17:55: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": "fa7b112bc... |
aece71dd-5056-4a21-a123-5446a582c489 | malwares/Botnet | AthenaBotnet/Source - Bot/Source/Protection/ConfigSetup.cpp | #include "../Includes/includes.h"
/* <------------------------------> Settings START <------------------------------> */
#define SPECIAL_RC4_KEY "Imagination is more important than knowledge."
#define SPECIAL_STRING_1 "<KEY>"
#define SPECIAL_STRING_2 "<KEY>"
#define SPECIAL_STRING_3 "Pts7o<KEY>~~"
#define SPECIAL_ST... | TOOL | 0.956525 | 3.118872 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-03-02T11:00:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 906,
"forks": 445,
"issues": 8,
"pull_requests": 2
},
"file_meta": {
"content_id": "345d9fe... |
b67e1a38-3999-4884-9ffb-099509132b72 | faxinwang/OJ_HDU | dp/1143.Tri_Tiling.cpp | /*
Tri Tiling
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Problem Description
In how many ways can you tile a 3xn rectangle with 2x1 dominoes? Here is a sample tiling of a
3x12 rectangle.
Input
Input consists of several test cases followed by a line containing -1. Each test ca... | ALGO | 0.999888 | 3.836123 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-03-31T03:43: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": "bd9ad31391... |
06e97085-1639-4dfc-b99a-52aced7555e6 | teja963/Advanced-DSA-and-CS-Theory | Samsung R & D/DFS/5. Brust Ballon.cpp | /*
/*
There are n balloons and n bullets and each balloon is assigned with a particular number (point).
Whenever a particular balloon is shot the no of points increases by
1.the multiplication of point assigned to balloon on left and that of right side.
2.point assigned to left if no right exists
3.point assigned to ri... | ALGO | 0.999987 | 3.490121 | {
"github_metadata": {
"branch": "master",
"commit_count": 880,
"repo_created_at": "2021-09-30T17:12:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 209,
"forks": 80,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2126... |
f4717287-0bcd-41f9-9ffb-340a9cd8c662 | avinash625/CodingProblems | data structures/linked list/Intersection_of_two_LinkedList.cpp | /* Link list Node
struct Node {
int data;
struct Node* next;
}; */
//returns the length of the linked list .
int getLength(Node *head){
Node *temp = head;
int count = 0 ;
while(temp){
count++;
temp = temp->next;
}
return count;
}
/* Sh... | ALGO | 0.999773 | 4.331364 | {
"github_metadata": {
"branch": "master",
"commit_count": 384,
"repo_created_at": "2016-08-24T16:27:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63485cc6... |
f4030a16-960b-4d14-b99d-08cd213492b7 | alexandraback/datacollection | solutions_2749486_0/C++/rrabenel/main.cpp | //
// main.cpp
// Round1C_B
//
// Created by RRA on 5/12/13.
// Copyright (c) 2013 com.mycompany. All rights reserved.
//
#include <iostream>
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algo... | ALGO | 0.99997 | 3.643201 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8c0cebae... |
378842de-8e69-466a-a579-6ea2c77745fe | sane-aalam/a2z-dsa-solutions | Leetcode Problems/1381. Design a Stack With Increment Operation.cpp | // 1381. Design a Stack With Increment Operation
class CustomStack {
public:
// Array + Lazy Propagation
// working of lazy increment, it increase one by one,[lazy,like me]
// being lazy peoples have more power!
// i will improving every single day!
// date [30,sep,2024]
// we will meet again!
... | ALGO | 0.999752 | 6.409192 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-08-27T16:06: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": "fc490e915d2... |
46ed85d4-cb5c-454d-9489-727d6df9d327 | yirong-c/CLRS-code-solution | src/ch11/direct_address_tables.cpp | #include "../stdafx.h"
struct ElementInSet
{
int key;
void* satellite_data;
};
ElementInSet* DirectAddressSearch(vector<ElementInSet*>& table, int key)
{
return table[key];
}
void DirectAddressInsert(vector<ElementInSet*>& table, ElementInSet* element)
{
table[element->key] = element;
}
void Direct... | ALGO | 0.996246 | 4.296329 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2021-02-28T11:52:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8bbf145a... |
e6d2e1ca-6a05-40f9-b1d5-8acee71b519f | thucvu2001/c-dsa | #8.ThuatToanQuyHoachDong/Bai24_TongBinhPhuong.cpp | // Mọi số nguyên dương N đều có thể phân tích thành tổng các bình phương của các số nhỏ hơn N.
// Ví dụ số 100 = 10^2 hoặc 100 = 5^2 + 5^2 + 5^2 + 5^2.
// Cho số nguyên dương N. Nhiệm vụ của bạn là tìm số lượng ít nhất các số nhỏ hơn N mà có tổng bình phương bằng N.
#include <bits/stdc++.h>
using namespace std;
int m... | ALGO | 0.999866 | 4.379293 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2022-04-23T04:55:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5605969f4... |
cd900013-e15b-4441-9869-457e19f8e546 | harshita9104/DSA | 78-subsets/subsets.cpp | class Solution {
public:
// Main function to generate all possible subsets (the power set)
vector<vector<int>> subsets(vector<int>& nums) {
vector<vector<int>> ans; // This will store all the subsets
vector<int> curr; // Temporary vector to build each subset
helper(nums, 0... | ALGO | 0.999534 | 6.695389 | {
"github_metadata": {
"branch": "main",
"commit_count": 366,
"repo_created_at": "2024-05-19T17:29:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e83ca86bc8... |
1a619482-10cf-47d4-8133-3f49cff965b6 | AndreyTokmakov/Algorithms | Arrays/algorithms/Find_Missing_Number_Sorted_Array.cpp | /**============================================================================
Name : Find_Missing_Number_Sorted_Array.cpp
Created on : 26.02.2025
Author : <NAME>
Version : 1.0
Copyright : Your copyright notice
Description :
===========================================================================... | ALGO | 0.999422 | 5.709462 | {
"github_metadata": {
"branch": "main",
"commit_count": 180,
"repo_created_at": "2025-02-09T03:33: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": "c51cbf1eb5... |
3f9071ae-183e-45a6-ab72-43d030df6dcc | RocShi/leetcode_answers | code/top-100-liked/cpp/21.合并两个有序链表.cpp | /*
* @lc app=leetcode.cn id=21 lang=cpp
*
* [21] 合并两个有序链表
*
* https://leetcode.cn/problems/merge-two-sorted-lists/description/
*
* algorithms
* Easy (66.26%)
* Likes: 3435
* Dislikes: 0
* Total Accepted: 1.6M
* Total Submissions: 2.4M
* Testcase Example: '[1,2,4]\n[1,3,4]'
*
* 将两个升序链表合并为一个新的 升序
*... | ALGO | 0.999949 | 6.471429 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-03-16T14:31:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d5fe195d640... |
9313ed1c-dc30-48b7-9f50-67670c727269 | Hunterdii/Leetcode-POTD | November 2024 Leetcode Solution/November-23.cpp | class Solution {
public:
vector<vector<char>> rotateTheBox(vector<vector<char>>& box) {
int rows = box.size();
int cols = box[0].size();
vector<vector<char>> result(cols, vector<char>(rows, '.'));
for (int i = 0; i < rows; i++) {
int empty_spot = cols - 1;
fo... | ALGO | 0.999957 | 6.148073 | {
"github_metadata": {
"branch": "main",
"commit_count": 211,
"repo_created_at": "2024-11-18T03:00:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2fd0333a53... |
87569a43-0cf1-4005-9a0e-5f16d720bba4 | Subodhrana390/DSAwithCPP | Sorting/QuickSort.cpp | #include <iostream>
#include <vector>
using namespace std;
int partition(vector<int>& arr, int low, int high) {
int pivot = arr[high];
int i = low - 1;
for (int j = low; j < high; j++) {
if (arr[j] < pivot) {
i++;
swap(arr[i], arr[j]);
}
}
i++;
swap(ar... | ALGO | 0.999993 | 6.233213 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-05-17T19:46: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": "c64f346973c... |
092ff42b-1375-4fc1-aec5-39a145bf7ab1 | 1398690148/haizei-oj-practice | EP-41.cpp | /*************************************************************************
> File Name: EP-41.cpp
> Author: liqiang
> Mail: <EMAIL>
> Created Time: 2019年08月19日 星期一 16时52分25秒
************************************************************************/
#include <iostream>
#include <cmath>
#include <cstrin... | ALGO | 0.99966 | 5.019853 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2019-07-22T06:24: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": "5f954556e... |
f9911f7d-a366-4262-a615-ceb02b4877d2 | iam1513/CPP-DSA | C48jaLongComPrefix.cpp | //Longest common prefix
#include<iostream>
#include<vector>
#include<cstring>
#include<algorithm>
using namespace std;
//Here we will first arrange all the strings in lexicographical order and the find common prefix between first and last string.
//This is because, first and last strng have least in common and that... | ALGO | 0.99984 | 4.962858 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2024-03-11T16:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2c9ab83d6... |
0b73027f-0081-4067-825e-293c3270f8f0 | edisonhello/competitive_programming | TOJ/AC/391.cpp | #pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#define fread fread_unlocked
#define fwrite fwrite_unlocked
inline char gtx(){
const int N=4096;
static char buffer[N];
static char *p=buffer,*end=bu... | ALGO | 0.998858 | 4.662457 | {
"github_metadata": {
"branch": "master",
"commit_count": 843,
"repo_created_at": "2016-03-15T14:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "98ec9204... |
2f4ad665-f9a6-437f-a932-291557be168c | IssamLaribi/leetcode-solutions | leetcode/easy/9-palindrome-number.cpp | class Solution {
public:
bool isPalindrome(int x) {
if (x < 0) return false;
int xdigits = digits(x);
if (xdigits == 1) return true;
int temp = x;
int tempdigits = xdigits;
while (tempdigits > 1) {
int rdigit = temp % 10;
int ldigit = temp / po... | ALGO | 0.999955 | 5.664521 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2025-06-21T14:49:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d3c90db24a... |
a9d22b73-d999-4aa7-9e0c-b20ca279f7be | AndrewYGHUB/leet | solution/1600-1699/1697.Checking Existence of Edge Length Limited Paths/Solution.cpp | class Solution {
public:
vector<int> p;
vector<bool> distanceLimitedPathsExist(int n, vector<vector<int>>& edgeList, vector<vector<int>>& queries) {
p.resize(n);
for (int i = 0; i < n; ++i) p[i] = i;
sort(edgeList.begin(), edgeList.end(), [](const auto& e1, const auto& e2) {
... | ALGO | 0.999993 | 5.950666 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-07-21T06:56: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": "ac89961f3db4... |
5234e277-14b7-4559-b66a-d270b01eb265 | danielstarodubtsev/MIPT-alogirthms-and-data-structures | 1st term/contest 1/B.cpp | #include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
const auto kPrec = std::setprecision(4 * 5);
int main() {
size_t cnt;
std::cin >> cnt;
std::vector<long double> sounds(cnt);
for (size_t i = 0; i < cnt; i++) {
std::cin >> sounds[i];
sounds[i] = std::log2(sounds[i]);
}
std... | ALGO | 0.999861 | 4.838451 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-05-04T16:10:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8053c115482... |
a236a6f5-ec3c-441c-a93b-8c7844cd3c4f | Asad-Bin/IUPC-problem-solutions | cuss div 2024/preli G. Another Tree Problem (dsu on tree).cpp | // . . . <NAME> . . .
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#ifndef ONLINE_JUDGE
#define dbg_out cout
#define debug(...) dbg_out << "DBG )> "; __f(#__VA_ARGS__, __VA_ARGS__);
template<typename T1, typename T2> ostream& operator<<(ostream& out, pair<T1, T2> pr) { out << "{ " << pr.first ... | ALGO | 0.999987 | 4.540507 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2022-06-15T10:35: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": "449f7c80eb5... |
fd515554-cb36-40ef-91a3-76e6c7a09b1f | Crizj/OJpractice | leetcode/challenge/April LeetCoding Challenge 2021/Determine if String Halves Are Alike.cpp | #include<iostream>
#include<string>
using namespace std;
class Solution
{
public:
bool halvesAreAlike(string s)
{
int result = 0;
int i = 0;
for(; i < (s.length()/2); i++)
{
switch(s[i])
{
case 'a': result++;break;
case 'e... | ALGO | 0.999857 | 5.013956 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2021-03-18T05:51: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": "725a80e21d6... |
6a04efe3-3f20-424d-b7f8-f476e094f085 | ilovehanseo/TIL_Baekjoon | STL_5.cpp | #include<iostream>
using namespace std;
//
//int main() {
// ios::sync_with_stdio(false);
// cin.tie(NULL);
//
// string str;
// cin >> str;
//
// sol1) 시간 초과
// size_t len = str.length();
//
// int max = 0;
// int flag = 0;
// char tmp = ' ';
// for (char& ch : str) {
// if (ch >= 'a' && ch <= 'z') {
// ch -= 32;... | ALGO | 0.999943 | 3.147298 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2025-03-14T08:11:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d360d6bb7... |
1a10dd75-0eee-4d31-bba3-70323e99dd0a | Hojun1123/Daily-Coding-Problem | 백준/Gold/19640. 화장실의 규칙/화장실의 규칙.cc | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <queue>
#include <stack>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <map>
using namespace std;
int N, M, K;
struct Node {
int d, h, idx, n;
bool operator<(Node o) const {
if (d > o.d)... | ALGO | 0.999972 | 3.428218 | {
"github_metadata": {
"branch": "main",
"commit_count": 612,
"repo_created_at": "2023-11-13T23:59: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": "1c701b44ed... |
b644b9fc-db3d-410e-a6c3-6fa8ef40da44 | fengrenchang86/PKU | 1836/3683373_RE.cpp | #include <iostream>
using namespace std;
double dA[12];
double dB[12];
int nN;
int FromSmall ( int nBegin, int nEnd, double dX )
{
if ( nBegin == nEnd )
return nBegin;
int nMid = (nBegin+nEnd)/2;
if ( dB[nMid] == dX )
return nMid;
else if ( dB[nMid] < dX )
return FromSmall ( nMid+1, nEnd, dX );
else
return... | ALGO | 0.99995 | 3.580593 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-03-07T13:40: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": "3a7673c099... |
2932a8d2-d713-4b36-ab2c-26927ae83365 | absolly/DeepBlueDX12 | mge_v17_student_version/src/Content/Behaviours/FlockingBehaviour.cpp | #include "Content/Behaviours/FlockingBehaviour.hpp"
#include "mge/behaviours/AbstractBehaviour.hpp"
#include "mge/core/GameObject.hpp"
#include <SFML/Window/Keyboard.hpp>
#include <vector>
#include <iostream>
#include <random>
using namespace std;
#include "Content/GameObjects/FishTank.hpp"
FlockingBehaviour::Flockin... | TOOL | 0.934131 | 4.163481 | {
"github_metadata": {
"branch": "master",
"commit_count": 371,
"repo_created_at": "2018-05-31T13:58: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": "73feb065... |
1d4a3f3b-6b1d-4ea3-8579-33ae69635474 | MollaMohammadIbrahim/DSA | LInkedList/linklist.cpp | #include<bits/stdc++.h>
using namespace std;
struct Node{
int data;
Node *next;
};
Node *root = NULL;
//appending node at the beginning or ending of the list.
void append(int data){
//appending at the beginning the list
if( root == NULL ){
root = new Node();
root->data = data;
... | ALGO | 0.999734 | 4.076702 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-09-30T08:42:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e42428fd34a... |
e246726a-7d0b-4deb-a32e-2f9ea5b7dc43 | Hanu812002/leetcode | 2477-minimum-fuel-cost-to-report-to-the-capital/2477-minimum-fuel-cost-to-report-to-the-capital.cpp | class Solution {
public:
// long long minimumFuelCost(vector<vector<int>>& roads, int seats) {
// int n=roads.size();
// // int dis[n+1]={-1};
// vector<int>dis(n+1,-1);
// dis[0]=0;
// vector<int>adj[n+1];
// vector<int>vis(n+1,0);
// vis[0]=1;
// ... | ALGO | 0.999842 | 5.72543 | {
"github_metadata": {
"branch": "main",
"commit_count": 3128,
"repo_created_at": "2022-06-24T10:41: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": "eabc2cf5c... |
2bbc1357-7f2f-4497-980b-5c00184463ac | zgrigoryan/parallel_summation | main.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <thread>
#include <atomic>
#include <numeric>
#include <chrono>
#include <mutex>
#include <algorithm>
#include <random>
#include <cstdlib>
#include <queue>
#include <future>
#include <functional>
// For C++17 parallel algorithm
#ifdef... | TOOL | 0.999252 | 6.876052 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2025-04-09T12:23: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": "3d44acb0a74... |
6bff5b4d-826a-4441-8620-3069d6903edd | sburuiana/adventofcode | 2020/day12/part2.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define mp make_pair
#define CHECK(x) if(!(x)) return false;
#define CHECKRET(x, y) if(!(x)) return (y);
#define SKIP(x) if((x)) continue;
typedef pair<int, int> pii;
vector<string> getAllLines() {
vector<string> v;
string s;
while (getline(cin,... | ALGO | 0.999924 | 3.857851 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2020-12-03T05:19:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8be0437e... |
0714f338-74ad-4c92-b1d0-329f5efc0d18 | tamle29092004/CauTrucDuLieu | Session_4/Chương 6/Bai_6_10.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
using namespace std;
class GieoMam {
private:
int R, C; // Số hàng và cột
vector<vector<int>> grid; // Ma trận ô, lưu trạng thái của các ô (0: trống, 1: hạt chưa nảy mầm, 2: cây non)
int dx[4] = {-1, 1, 0, 0}; // Di chuyển theo ... | ALGO | 0.999902 | 5.915551 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2025-01-12T16:58: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": "8fbd0c84d... |
08d0f145-4973-4a71-b9c4-250fe80b3017 | ishandutta2007/codeforces-nonalphabetic | .tx/normal/1373/D.cpp | #ifndef CONTESTSMTH_HEADER_H
#define CONTESTSMTH_HEADER_H
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
template <typename K, typename V = __gnu_pbds::null_type>
using tree = __gnu_pbds::tree<K, V, less<K>, __gnu_pbds::rb_tree_tag, __gnu_pb... | ALGO | 0.999941 | 4.494504 | {
"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": "a4aea0c6b4eb... |
5171b019-c192-4cc9-aeb7-7ae31780e1e5 | Mattrixwv/Hello_World | Sorts/Sorts.cpp | //Tutorials/Sorts/Sorts.cpp
//<NAME>
// Created: 3-7-18
//Modified: 3-7-18
//This file contains the function that compares the different sorts
#include <iostream>
#include <iomanip>
#include <random>
#include <cstdint>
#include <algorithm>
#include <vector>
#include <chrono>
#include "BubbleSort.hpp"
#include "QuickS... | ALGO | 0.980214 | 5.585147 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2017-12-06T20:06:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cff8b8353... |
02a09e5c-5ab5-48de-801e-3342e0ab13f0 | Linumm/LeetCode | 0743-network-delay-time/0743-network-delay-time.cpp | class Solution {
public:
int _MAX = 100000; // Max limit of input weight sum
int networkDelayTime(vector<vector<int>>& times, int n, int k) {
// Adjacent matrix with weight value
vector<vector<pair<int,int>>> adj(n);// pair: {dst, weight}
vector<int> distance(n, _MAX); // distance from k... | ALGO | 0.999987 | 5.521461 | {
"github_metadata": {
"branch": "main",
"commit_count": 305,
"repo_created_at": "2023-03-26T09:48: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": "33284b346f... |
52aaf576-967f-4baa-b578-6907e796509a | ishivxnshh/Leetcode-Solutions | Recursion and Backtracking/Q_46.cpp | #include <iostream>
#include <vector>
using namespace std;
class Solution
{
public:
void recurPermute(vector<int> temp, vector<int>& nums, vector<vector<int>>& res, int* fq)
{
if (temp.size() == nums.size())
{
res.push_back(temp);
}
for (int i = 0; i < nums.size(); ... | ALGO | 0.999997 | 6.499012 | {
"github_metadata": {
"branch": "main",
"commit_count": 157,
"repo_created_at": "2024-06-28T16:31:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a122dd0d25... |
33ed89bd-a2d1-4ab9-99d1-3a875ed708e1 | Alex-Shen1121/SZU_Learning_Resource | 计算机与软件学院/面向对象程序设计/代码库/课后练习3-类和对象/分数类(类与构造).cpp | #include<iostream>
using namespace std;
class CFraction
{
private:
int fz, fm;
public:
CFraction(int fz_val, int fm_val);
CFraction add(const CFraction& r);
CFraction sub(const CFraction& r);
CFraction mul(const CFraction& r);
CFraction div(const CFraction& r);
void set(int x, int y);
in... | ALGO | 0.998759 | 4.820415 | {
"github_metadata": {
"branch": "main",
"commit_count": 88,
"repo_created_at": "2021-05-16T05:17:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 317,
"forks": 97,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0628e67a... |
45ef9f65-1b13-4848-8cba-a15f31616e62 | 2464599943/PAT | A1080/main.cpp | #include <iostream>
#include<algorithm>
#include<string.h>
#include<stdio.h>
#include<math.h>
using namespace std;
struct student{
int GE;
int GI;
int all;
int id;
int prefer[6];
int r;
int admit;
};
bool cmp1(student a,student b){
if(a.all!=b.all)return a.all>b.all;
return a.GE>b.GE... | ALGO | 0.999993 | 3.119948 | {
"github_metadata": {
"branch": "master",
"commit_count": 193,
"repo_created_at": "2019-03-25T13:15: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": "9f0df02e... |
6cc6fdc4-2897-4064-8cde-d6fe8e6b65c9 | maspypy/library | string/run_enumerate.hpp | #include "string/zalgorithm.hpp"
// (period, l, r)
// 極大, つまり S[l:r] は周期 p (ただし r-l >= 2p) を持つが、S[l-1:r], S[l:r+1]
// はそうではない
// 高々 n 個以下
// sum of (r-l)/p = O(n)
template <typename STRING>
vc<tuple<int, int, int>> run_enumerate(const STRING& S) {
ll N = len(S);
using T = tuple<int, int, int>;
using P = pair<int... | ALGO | 0.997737 | 4.540269 | {
"github_metadata": {
"branch": "main",
"commit_count": 10525,
"repo_created_at": "2022-04-15T18:55:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 92,
"forks": 11,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a1b73... |
4b31e390-57b0-4527-a14b-de58e7f73c0d | DevHub-iLab/Advent-of-Code-2024 | anAcc22/day_04/part_01.cpp | #include <bits/stdc++.h>
// #include <fmt/ranges.h> // WARN: remove before submission
using namespace std;
using ll = long long;
constexpr int DI = 8, WORD = 4;
array<int, DI> di{ 0, 1, 1, 1, 0, -1, -1, -1 };
array<int, DI> dj{ 1, 1, 0, -1, -1, -1, 0, 1 };
string line;
int n, m ;
int main() {
cin.tie(nullptr)->... | ALGO | 0.994226 | 4.722969 | {
"github_metadata": {
"branch": "main",
"commit_count": 136,
"repo_created_at": "2024-12-01T09:02:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ab6c0671bd... |
c2e28303-26bd-4f21-b4b6-5c3ac88fe547 | akashkinkarpandey/AdityaVermaYoutube | Binary Search Programs(Last qs left)/16FindElementinBitonicarray.cpp | #include <iostream>
#include <vector>
using namespace std;
int BinarySearch(vector<int> &a)
{
//Finding Max element in Bitonic Array
int t=a.size();
int low = 0, high = t - 1;
while (low <= high)
{
int mid = low+(high - low) / 2;
if(mid>0 and mid<t-1)
{
if(a[mid]>a[mid-1]... | ALGO | 0.999968 | 5.130964 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2022-05-01T16:06:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e12a41a8603... |
df0721b2-4316-47b3-95b3-7b90cadc265d | wethura/learn | algorithm/trapping-rain-water-ii.cpp | #include<bits/stdc++.h>
#include "time.h"
#include "logger.h"
using namespace std;
/**
* idea: binary search the height of the place, and cover the same height near it.
*/
// class SolutionFailed {
// private:
// int maxn = 0, m, n;
// vector<vector<bool>> confirmed;
// const vector<vector<int>> directi... | ALGO | 0.999993 | 5.796786 | {
"github_metadata": {
"branch": "dev",
"commit_count": 133,
"repo_created_at": "2022-02-13T07:45: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": "c2a87120372... |
ed0c6dcd-672b-4feb-94df-1d34800e19c9 | aswanthpp/Data-Structures-and-Algorithms | Hackerrank/InterviewPreperation/Linked Lists/reverseDoubleList.cpp | #include <bits/stdc++.h>
using namespace std;
class DoublyLinkedListNode {
public:
int data;
DoublyLinkedListNode *next;
DoublyLinkedListNode *prev;
DoublyLinkedListNode(int node_data) {
this->data = node_data;
this->next = nullptr;
this->prev =... | ALGO | 0.999485 | 4.480571 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2018-01-16T18:25:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68ed940d2... |
2103c3a7-591d-49f3-9023-14eff454bbb8 | YiminWang-MIT/Cola_public | Detector/simplex.cc | //
// $Id: simplex.cc 2216 2008-06-13 21:13:47Z distler $
//
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include "fitspline.h"
#define MAXSTEP 100000
double simplextry(double **s, double f[], double cms[], double trial[], int hi,
double (*function)(double []), int dim, double factor)
{
double ... | ALGO | 0.999981 | 5.040033 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2021-09-20T12:10: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": "bb521c8f8... |
0d660cdb-d3ad-4f81-b166-c1188014d21f | dcalandria/swad-fotomaton | cascade.cpp | /*
* FOTOMATON. Detector de rostros de la plataforma SWAD
*
* Copyright (C) 2008 <NAME> &
* <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either ver... | ALGO | 0.964055 | 3.953701 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2012-02-05T19:40:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac6867b385... |
8f29f4c3-a642-46e9-b11b-ff7ef61eb671 | dh-epfl-students/point-cloud-alignment | code/PointCloudAlignment/include/plane_merging.h | #pragma once
#include "common.h"
#include "segmented_points_container.h"
class PlaneMerging {
public:
void init(function<void(PointNormalKCloud::Ptr, ivec3, vector<int>, bool)> callable, bool isSource);
void start_merge(vector<SegmentedPointsContainer::SegmentedPlane> &p_list, PointNormalKCloud::Ptr p_cloud);... | ALGO | 0.965654 | 6.035961 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2019-12-16T09:25:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f2ac0826... |
1f0574fb-c5b6-40dd-a901-4e52b58db256 | rene-d/hackerrank | data-structures/linked-lists/compare-two-linked-lists.cpp | // Compare two linked lists
// Compare the data in two linked lists node by node to see if the lists contain identical data.
//
// https://www.hackerrank.com/challenges/compare-two-linked-lists/problem
//
///////////////////////////////////////////////////////////////////////////////
// main function
/////////////////... | ALGO | 0.999804 | 5.61927 | {
"github_metadata": {
"branch": "master",
"commit_count": 197,
"repo_created_at": "2018-03-27T13:10:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 86,
"forks": 25,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "00ec22... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.