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 |
|---|---|---|---|---|---|---|---|
fd116426-6ce0-4255-b2f3-9b4f8d7827b4 | tks3210/Atcoder | abc124/abc124_d.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int n, k;
string s;
cin >> n >> k;
cin >> s;
vector<int> hito_num;
vector<int> hito_sum;
int before_style = s[0];
int tmp_num = 1;
int tmp_sum = 1;
hito_num.push_back(0);
hito_sum.push_back(0... | ALGO | 0.999931 | 3.770001 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2018-08-27T12:21:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e34c4da22... |
8951308b-6b6e-401b-bada-1be43e93ab61 | mdshemul48/Data-Structures-And-Algorithms-Practice-Codes | 20. DS Linked List - 2/2_search_in_linkedList.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node *next;
Node(int data)
{
this->data = data;
next = NULL;
}
};
void print(Node *head)
{
Node *temp = head;
while (temp != NULL)
{
cout << temp->data << "->";
temp = temp->ne... | ALGO | 0.999859 | 4.147284 | {
"github_metadata": {
"branch": "main",
"commit_count": 118,
"repo_created_at": "2021-11-30T18:06: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": "a35005ccae... |
2e78ae6a-34c6-40a5-a385-f830c6b51de7 | ThisIsGagan19/daily_code_challenge | leetcode/2024_4_april/c++/22_open_the_lock.cpp | // CODE
class Solution {
public:
int openLock(vector<string>& deadends, string target) {
unordered_set<string> dead(deadends.begin(), deadends.end());
unordered_set<string> vis;
queue<string> q;
q.push("0000");
vis.insert("0000");
if(dead.find("0000") != de... | ALGO | 0.999972 | 5.709761 | {
"github_metadata": {
"branch": "master",
"commit_count": 319,
"repo_created_at": "2024-01-16T03:03: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": "5b61f72f... |
300e76ce-bbbc-46ab-888d-8eaf7600f827 | bobxiong88/Competitive-Programming-Solutions | DMOJ solutions/Uncategorized/arc1p5.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
int pars[10005][5005];
int ans[300005];
int find_par(int i, int u){
if (pars[i][u] == u) return u;
return pars[i][u] = find_par(i,pars[i][u]);
}
void join(int i, int u, int v){
u = find_par(i,u);
v = find_par(i, v);
if (u == v) retur... | ALGO | 0.999997 | 4.837415 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-12-28T07:45:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba5b58782955... |
774c781d-8316-4e5e-ad69-5108c6a475ec | ZhongZeng/Leetcode | lc728sfDvNum.cpp |
/*
Leetcode 728. Self Dividing Numbers
Next challenges: Perfect Number
Test Cases:
1
22
Runtime: 6 ms
*/
class Solution {
public:
vector<int> selfDividingNumbers(int left, int right) {
vector<int> num, dg(10,0), dr(2,0), rv;
// digits, #digits, divisive, return vector
int tn=left-1, ad... | ALGO | 0.999873 | 5.693104 | {
"github_metadata": {
"branch": "master",
"commit_count": 943,
"repo_created_at": "2017-03-03T15:41:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f412cf0c... |
d45a4dad-58d5-4250-8d26-dd2718ef7b17 | maruf-ahammed-75/problem-solve-for-cp | Code Forces/Maximum-Median.cpp | #include <bits/stdc++.h>
#define ll long long
#define int long long
#define ff first
#define ss second
#define full(a) a.begin(), a.end()
#define Y cout<<"YES\n"
#define N cout<<"NO\n"
using namespace std;
int n;
int x;
bool isok(vector<int> &a, int m){
int cnt = 0;
for(int i=n/2 ; i<n ; i++){
if (a[i]... | ALGO | 0.999979 | 4.446613 | {
"github_metadata": {
"branch": "main",
"commit_count": 351,
"repo_created_at": "2024-09-24T15:20: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": "5b35491caa... |
d99fef1e-4099-4255-8439-a08583442bde | Mzhangry/code_MzhangRy | S5/B08_2.cpp | // MzhangRy - 张容钰
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std;
int m, n;
int a[55][55];
bool vis[55][55];
int ans = 0, mx = 0;
int dx[4] = {0, -1, 0, 1},
dy[4] = {-1, 0, 1, 0};
int dfs (int x, int y) { // dfs(x, y... | ALGO | 0.999719 | 3.374673 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2022-07-20T00:59:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19b445fc2... |
205bb12d-044e-476d-8d61-ad2f4b19879d | pranith7867/Coding | Striver/AZsheetstriver/3_Binary_search/3_Find Answers by BS in Search Space/3_Koko Eating Bananas.cpp | //{ Driver Code Starts
/*
Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas.
The guards have gone and will come back in h hours.
Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of
bananas and eats k bananas from that pile. If t... | ALGO | 0.999915 | 5.99647 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2022-08-19T04:47: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": "b639241c9... |
42454460-9d62-48b2-b0d8-4848dd9a20ee | jackdeye/Sudoku-Solver | solverUtils.cpp | #include <iostream>
#include <cstdlib>
#include "solverUtils.h"
solverUtils::solverUtils(){
}
void clearConsole() {
#if defined(_WIN32) || defined(_WIN64)
std::system("CLS");
#elif defined(__APPLE__) || defined(__MACH__)
std::system("clear");
#elif defined(__linux__)
std::system("c... | ALGO | 0.955207 | 3.762854 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-01-02T04: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": "fa66cf10f61... |
1328cb30-3020-46d3-83a0-31b4b7d8b16d | timelord666/variometer | Stm32Vario280/Stm32Vario280.ino | // includes section ------------------------------------------------------------------------------
#include <Tone.h> // tone lib for stm32
#include <LCD5110_Graph.h> // display Nokia 5110
#include <Adafruit_Sensor.h> // need for Adafruit_BMP280
#include <Adafruit_BMP280.h> // sensor pressure lib
// includes section... | TOOL | 0.908225 | 4.850018 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-01-13T22:37: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": "f6c4f71b3... |
687b92a2-447d-4289-a056-70f82d6abadf | Zu-rin/AtCoder | AtCoder_Regular_Contest/ARC107/ARC107C.cpp | #include <iostream>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <algorithm>
#define rep(i, n) for(i = 0; i < (n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define MOD 998244353
#define PI 3.14159265358979323846
#define INF 1 << 30
using namespace std;
t... | ALGO | 0.999974 | 4.427142 | {
"github_metadata": {
"branch": "master",
"commit_count": 399,
"repo_created_at": "2020-09-29T02:43:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4a754ec4... |
30ba018f-fe37-4c18-a2e4-50327417b250 | zhanxw/rvtests | regression/Table2by2.cpp | #pragma GCC diagnostic ignored "-Wint-in-bool-context"
/*
* Table2by2.cpp
* LogitReg
*
* Created by <NAME> on 11/21/10.
* Modified by <NAME> 2014
* Copyright 2010 U of Michigan. All rights reserved.
*
*/
#include "Table2by2.h"
#include <cmath>
#include <cstring>
#include "libsrc/Error.h"
#include "third/... | ALGO | 0.97444 | 5.436856 | {
"github_metadata": {
"branch": "master",
"commit_count": 1204,
"repo_created_at": "2013-01-09T20:58:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 139,
"forks": 43,
"issues": 100,
"pull_requests": 5
},
"file_meta": {
"content_id": "a8... |
c28f04c2-2675-445f-ae10-d1081c285fd6 | ishandutta2007/codeforces-y | ympc2005/normal/1556/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1005;
int n;
ll ans, a[N], b[N];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%lld", &a[i]);
b[i] = i&1 ? a[i] : -a[i];
}
for (int l = 1; l < n; l += 2) {
ll s = 0, ... | ALGO | 0.999857 | 3.760189 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:40: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": "14e5b6e6d3ba... |
3bff4393-2dd1-4e7a-afe8-2d9c97851ca3 | Vishalyadav0804/Problem-solving-Interview-Bit | Arrays/Set Matrix Zeros.cpp | Given a matrix, A of size M x N of 0s and 1s. If an element is 0, set its entire row and column to 0.
Note: This will be evaluated on the extra memory used. Try to minimize the space and time complexity.
Input Format:
The first and the only argument of input contains a 2-d integer matrix, A, of size M x N.
Output ... | ALGO | 0.99983 | 5.797837 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2020-05-17T04:22: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": "cae593b6c... |
bed1a13c-11e2-4f6d-9a9c-50ea30aa4778 | VAKHANDER/KompGraf | Lab2.cpp | #include <SFML/Graphics.hpp>
#include <functional>
#include <iostream>
#include <vector>
#include "imgui-SFML.h"
#include "imgui.h"
float RAnd(float w1, float w2) { return w1 + w2 + std::sqrt((w1 * w1 + w2 * w2) - 2 * w1 * w2); }
float ROr(float w1, float w2) { return w1 + w2 - std::sqrt((w1 * w1 + w2 * w2) - 2 * w1 * ... | TOOL | 0.975596 | 5.0409 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-12-27T14:29: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": "51cd93a97d42... |
45520ef8-63fa-454b-83b1-9fbd348f89db | Tkr-Karan/Hacktober-Fest-2022 | third.cpp | #here in this we are creating and see how to print an subarrays in an array.
#include<iostream.h>
usung namespace std;
int main(){
// creating n size array
int n;
cin >> n;
int arr[n];
for(int i = 0; i < n; i++){
cin >> arr[i];
}
for(int i = 0; i < n; i++){
cout << arr[i] << endl;
... | ALGO | 0.999191 | 4.494278 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2022-10-01T04:29:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b102d677077... |
00dcdf9a-e24b-4f62-a8d4-97296f7450fe | hummingbird-12/algorithm-assignments | PHW04/closestPairMainD&C.cpp | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#define ERROR_BOUND 1.0e-30
void errorExit(const char *s);
void sortXid (double *X, unsigned *Xid, unsigned *TMP, unsigned N);
// input : X[] (x position array of N points)
// Xid[] (index array of X (initially [0,1,...,N-... | ALGO | 0.999664 | 4.302843 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2020-09-27T17:51: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": "4b9a2b3b404... |
da9b1b84-05e3-449b-8ea5-0f22f903b32d | Michs224/College | TUGAS SMS 2/Data Structures/TREE/Latihan menu bst.cpp | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
//AKU HACKER
struct node{
char pcode[10];
int price;
struct node*left,*right;
};
//node*tree=NULL;
struct node*newnode(node*tree,char phonecode[10],int price){
node*temp=(struct node*)malloc(sizeof(struct node));
temp->price=price... | ALGO | 0.996759 | 3.572542 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-07-20T08:48:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5a30e985fff... |
5a7ce718-a31c-40f0-a06e-ef7b67cb12fe | shawpujaa/LeetCode | 1038-binary-search-tree-to-greater-sum-tree/1038-binary-search-tree-to-greater-sum-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999966 | 4.736274 | {
"github_metadata": {
"branch": "main",
"commit_count": 848,
"repo_created_at": "2022-03-17T15: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": "b3defb85bc... |
09faf663-5ac6-4c03-9212-3fc834b2c241 | jkwiatk1/Leetcode-solutions | 1. Arrays & Hashing/128-Longest Consecutive Sequence/solution.cpp | #include <iostream>
#include <vector>
#include <set>
using namespace std;
class Solution {
public:
int longestConsecutive(vector<int>& nums) {
set<int> sortedNums;
int prevValue;
int tempConsecutive = 1;
int longestConsecutive = 1;
if(nums.size() > 0){
tempCons... | ALGO | 0.999979 | 5.256375 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2023-02-08T17:59: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": "029a08bb0ac... |
19829abf-da84-47ea-9939-343a8193f717 | camerondurham/leetcode | 2022/range-sum-of-bst/Solution.cpp | #include<iostream>
#include<vector>
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNod... | ALGO | 0.999997 | 6.814981 | {
"github_metadata": {
"branch": "main",
"commit_count": 117,
"repo_created_at": "2020-08-30T02:43: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": "0a655367c8... |
b43fa7df-6e15-4f78-8da3-aea5a4ee65ee | sudhanshu-t/DSA | HomePepCodes/Lec29/1_Generic Tree - 1.cpp | #include <iostream>
#include <string>
#include <vector>
#include <climits>
#include <list>
using namespace std;
class Node{
public:
int data;
vector<Node*> children;
Node(int data){
this->data = data;
}
};
Node* construct(vector<int>& dlist){
Node* root = NULL;
vector<Node*> nlis... | ALGO | 0.999783 | 3.225689 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-07-09T11:48: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": "b2c50a757... |
67432d22-abd6-426c-86db-86ea3e94a015 | the-stranded-alien/LeetCode | 0501_0600/547_Number_of_Provinces.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long int
#define double long double
#define F first
#define S second
#define pb push_back
#define pob pop_back
#define mp make_pair
#define si set <int>
#define vi vector <int>
#define vs vector <string>
#define... | ALGO | 0.99994 | 5.255113 | {
"github_metadata": {
"branch": "main",
"commit_count": 421,
"repo_created_at": "2022-01-01T17:46: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": "5fdc4307ea... |
e554d2f9-e5d7-4210-8dc0-562c425cff71 | omteja04/LeetCode | 2067-maximum-number-of-points-with-cost/2067-maximum-number-of-points-with-cost.cpp | class Solution {
public:
int r, c;
vector<vector<long long>> dp;
// long long rec(vector<vector<int>>& points, int row, int column) {
// if(row == 0) {
// int ans = 0;
// for(int i = 0; i < c; i++) {
// ans = max(ans, (points[0][i] - abs(column - i)));
// ... | ALGO | 0.999943 | 5.463936 | {
"github_metadata": {
"branch": "main",
"commit_count": 1088,
"repo_created_at": "2024-08-17T06:11: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": "99c135932... |
e61e794c-6bd8-4cca-9830-96ddbe03ac89 | Yash41882/Coding-C | Linkedlist-bubble_sort.cpp | #include<iostream>
using namespace std;
class node{
public:
int val;
node * next;
node(int value){
val=value;
next=NULL;
}
};
void printll(node * head){
if(head==NULL){
return;
}
cout<<head->val<<" ";
printll (head->next);
}
void leng... | ALGO | 0.999974 | 4.946762 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2021-07-02T07:42: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": "7025d248d... |
23ac462e-295e-459c-a0bd-311c83cc1cd1 | Jnnes/LeetCode | consoleTest/algorithm/Sort.h | #pragma once
#include "../BaseSolution.h"
#include "../Common.h"
class Sort :public BaseSolution
{
private :
int *testArr;
public:
static const string MAOPAO;
static const string INSERT;
static const string MERGE;
static const string QUICK;
void init(void);
void run(void);
void run(st... | ALGO | 0.999718 | 5.196437 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2019-10-16T02:15: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": "6de218e25... |
5c497ee2-6c63-4546-bd56-5f8e4153383e | mtereshkin/coursera-white-belt-cpp | week 5/project.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <map>
#include <vector>
#include<algorithm>
#include <stdexcept>
#include <iostream>
#include <exception>
#include <string>
#include <iomanip>
#include <iterator>
using namespace std;
class Date {
public:
Date(int year_input, int month_input, int... | TOOL | 0.952045 | 5.037401 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2020-11-30T16:52: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": "5a0e665912f... |
6494b633-26ca-492d-97d0-33c4a7dca54f | LEEYOONJONG/Algorithm_mac | pattern/devide&conquer/13246_행렬제곱의합.cpp | #include <iostream>
#include <cstring>
using namespace std;
int n;
long long b;
int **arr;
int **multiply(int **matrix1, int **matrix2){
int **res = nullptr;
res = new int*[n];
for (int i=0; i<n; i++) res[i] = new int[n];
// 초기화
for (int i=0; i<n; i++)
for (int j=0; j<n; j++)
... | ALGO | 0.999765 | 3.720971 | {
"github_metadata": {
"branch": "main",
"commit_count": 126,
"repo_created_at": "2021-03-04T14:51:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f866912f57... |
cf815f2f-c3dc-4f55-95c1-aba991237898 | itsourov/c-programming | contest/DIU Weekly Individual Practice Contest 4/j.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
void solve()
{
int n;
cin >> n;
vector<int> v(n);
int arr[n];
for (int i = 0; i < n; i++)
{
cin >> v[i];
arr[i] = v[i];
}
for (int i = 0; i < n; i++)
{
v.push_back(v[i]);
... | ALGO | 0.999961 | 4.659109 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2023-08-06T15:49:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d2ffde7d965... |
ca6f54e1-7cf0-483d-bfd7-cba3459c5978 | shikhorroy/UVa-OJ-Problem-Solutions | 624 - CD/624 - CD.cpp | #include<bits/stdc++.h>
using namespace std;
#define MAX 2000
#define PI acos(-1.0)
typedef long long ll;
typedef unsigned long long llu;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef map<string, int> msi;
#define REP(i, b, e)\
for(int i = int(b); i <= int(e); i++)
#define TR... | ALGO | 0.999964 | 3.319442 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-11-29T09:25: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": "ba7afd4181... |
4a6d0ed5-ea88-4e76-ad3b-8a08a6aca57c | all-in-one-of/studies | training/cpp/accelerated_cpp/6/6-5/main.cpp | #include <algorithm>
#include <iomanip>
#include <ios>
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include "grade.h"
#include "Student_info.h"
using std::cin; using std::setprecision;
using std::cout; using std::sort;
using std::streamsize; using std::endl; ... | TOOL | 0.997127 | 5.099323 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2019-07-01T15:33:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "34e5493820... |
4bdef5d5-5816-4aff-87ee-144e31a19572 | gaeun37/knu_cpp | prac8/8-5/8-5.cpp | //5
#include <iostream>
using namespace std;
class BaseArray {
private:
int capacity;
int* mem;
protected:
BaseArray(int capacity = 100) {
this->capacity = capacity; mem = new int[capacity];
}
~BaseArray() { delete[] mem; }
void put(int index, int val) { mem[index] = val; }
int get(int index) { return mem[in... | ALGO | 0.997231 | 4.08122 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2025-03-19T04:04: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": "fe234fbc7... |
b1757da5-694c-40fb-9140-8a4ce86dcb35 | ishandutta2007/codeforces-s | sw2000/normal/1439/A2.cpp | #include<bits/stdc++.h>
#define fi first
#define se second
#define mid (l+r>>1)
#define endl '\n'
using namespace std;
typedef long long ll;
typedef pair<int, int>pii;
typedef vector<int>vi;
struct tri {int a, b, c;};
const int N = 1e5 + 10;
const int inf = 0x3f3f3f3f;
const ll linf = 0x3f3f3f3f3f3f3f3f;
const ll mod =... | ALGO | 0.999979 | 3.487401 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2c320c133d9... |
013110d9-f9d0-4f88-9cd9-b9cc34c5ac76 | LuisCortezs/FP | calculadora de area.cpp |
#include <iostream>
#include <cmath>
using namespace std;
double calculaArea(double lado) {
return lado * lado;
}
double calculaArea(double base, double altura) {
return 0.5 * base * altura;
}
double calculaArea(float radio) {
return 3.1416 * radio * radio;
}
double calculaArea(int largo, int ancho... | TOOL | 0.931826 | 4.228014 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2024-09-27T01:42: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": "ac9f9dec007... |
07130010-4a07-43ba-b877-8a3265442aea | 3000ye/ACMCode | LeetCode/131.分割回文串.cpp | #include <bits/stdc++.h>
#include <vector>
using namespace std;
/*
* @lc app=leetcode.cn id=131 lang=cpp
*
* [131] 分割回文串
*/
// @castor solve=start
// 使用 深度搜索优先,规则是:
// 1. 从 0 开始搜索,只要遇到回文串就递归
// 2. 为了找到所有可能,遇到非回文串选择跳过而非终止
// @castor solve=end
// @lc code=start
class Solution {
public:
vector<vector<string>> r... | ALGO | 0.999993 | 6.59086 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2024-05-26T09:24: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": "a0e7104e9b4... |
3b999975-cddc-4c64-ae79-8687bafb04b1 | Study-CodingTest/Study | BOJ/수열과 쿼리 16/boj14428.cpp | #include <iostream>
#include<vector>
#include<algorithm>
#include<tuple>
#include<queue>
using namespace std;
int n,m;
int arr[100001];
int tree[400001];
int FindMin(int x, int y) {
if (x == -1)return y;
if (y == -1)return x;
if (arr[x] == arr[y])return min(x, y);
if (arr[x] < arr[y])return x;
return y;
}
int Make... | ALGO | 0.999997 | 5.3005 | {
"github_metadata": {
"branch": "main",
"commit_count": 184,
"repo_created_at": "2022-06-17T13:15:55.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 5,
"pull_requests": 2
},
"file_meta": {
"content_id": "8ae3db63de4... |
3d5d8a76-14ec-44fc-83ed-0388c5cde0ed | harsh0015/competitive_programming | news10/q7.cpp | #include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define ceel(x, y) ((x) / (y) + !((x) % (y) == 0))
#define ff first
#define ss second
#define endl '\n'
#define print(v) for(auto x : v) cout << x << ' '; cout << endl;
#define debug(v) cout << #v... | ALGO | 0.999957 | 4.023095 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-06-02T07:58: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": "26ff76edc5... |
afd170b7-c7c9-46ef-a734-d435b0d012d2 | Kimdaean/CPP-Programming | Object-oriented programming.cpp | #include <iostream>
using namespace std;
class FruitSeller
{
private:
int APPLE_PRICE; //FruitSeller클래스에서 사용할 사과 가격을 나타내기 위한 APPLE_PRICE 변수 생성
int numOfApples; //FruitSeller클래스에서 사용할 사과 개수를 나타내기 위한 numOfApples 변수 생성
int myMoney; //FruitSeller클래스에서 사용할 판매자의 돈을 나타내기 위한 myMoney 변수 생성
public:
int SaleApples... | ALGO | 0.973094 | 4.850337 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2022-01-09T10:47: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": "290db9c0b154... |
1b85c72f-b7e3-4468-a357-90767e39a148 | Shaman786/-100DaysOfCode | Day17(Sorting)/Tree.cpp | // Implementation of Tree Traversals [Inorder, Preorder, Postorder]
#include <bits/stdc++.h>
using namespace std;
// create a node
struct node
{
int item;
struct node *left;
struct node *right;
};
void inorder(struct node *root)
{
if (root == NULL)
return;
inorder(root->left);
cout <<... | ALGO | 0.999984 | 6.282215 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2022-09-28T16:29: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": "5e793b828b1... |
3fe0fa3d-a47a-49cb-8a90-9250add8fdb1 | pedrodelyra/competitive-programming | urionlinejudge/computational_geometry/1549.cpp | #include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0), eps = 1e-9;
bool equals(double x, double y) { return fabs(x - y) <= eps; }
int main(void) {
int tc;
scanf("%d", &tc);
while(tc--) {
double n, l, b, B, H;
scanf("%lf %lf %lf %lf %lf", &n, &l, &b, &B, &H);
double ans, theta = pi / 2 ... | ALGO | 0.999512 | 3.21821 | {
"github_metadata": {
"branch": "master",
"commit_count": 163,
"repo_created_at": "2016-07-13T00:23:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1f84ab7... |
2b10cd07-055d-4a7f-865f-f6e109a3af67 | ywx20020114/Parallel_class_homeworkk | 2013852-郁万祥-第03次作业/源码/barrier.cpp |
/*
使用barrier接口
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define NUM_THREADS 4
typedef struct
{
int threadId;
} threadParm_t;
pthread_barrier_t barrier;
void *threadFunc(void *parm)
{
threadParm_t *p = (threadParm_t *) parm;
fprintf(stdout, "Thread %d has entered step 1.\n", p->threadId)... | ALGO | 0.945165 | 4.184692 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-12-27T05:42: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": "212a1e803bb6... |
55d1f27e-e2a4-4d0d-a142-c61c92a563c4 | Gabgirl4229/SU_2022 | Gabriella_Rodriguez_Prob3_Assignment3.cpp | #include <iostream>
#include <cstring>
#include <vector>
//so we don't need to type std:: all the time
using namespace std;
//Attendance class
class Attendance {
private:
//the string that the user will enter (P's, L's, and A's)
string attendance;
//check if absent
bool isAbsent() {
//creates... | ALGO | 0.994566 | 5.404433 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-09-06T20:04: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": "964ddd6bbeed... |
07d49d44-358f-48f8-8b89-890e05282f58 | ssbadjate02/Competetive-Programming | C_Phase_Shift.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define FASTIO ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define all(x) (x).begin(),(x).end()
#define ss second
#define ff first
template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;}
template<typ... | ALGO | 0.999989 | 3.758155 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-03-20T05:19: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": "d908897185... |
b5901dd2-eb72-45a0-bd4d-c667dbbdaa42 | raincross7/code-similarity | codes/train_code/problem273/problem273_409.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define vl vector<ll>
#define vi vector<int>
#define ff first
#define ss second
#define pb push_back
#define MOD 1e9+7
const int nax = 1e6+5;
#define display(v) for(int i =0;i<v.size();++i)cout << v[i] << " "
inline ll add(ll a, ll b){ ll c = a... | ALGO | 0.99973 | 3.775205 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1354ea06cfb8... |
5b07f4eb-a726-4f00-a9ed-92a94fdf9dbc | Aalsaunet/STEPImporter | Opencascade-7.2.0/src/ChFi3d/ChFi3d_Builder_C1.cxx | // Created on: 1994-03-09
// Created by: <NAME>
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser ... | ALGO | 0.981403 | 5.427077 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2018-03-02T14:54: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": "a1983f28e... |
e8c16aa8-a3a7-4037-813d-78ddadf289de | aifedorov/AaDS | avlTree2/avlTree2/main.cpp | #include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <iostream>
using namespace std;
struct command
{
int type;
int value;
};
struct node
{
int key;
struct node *left;
struct node *right;
int height;
};
int height(struct node *N)
{
if (N == NULL)
return 0;
return... | ALGO | 0.999971 | 4.133791 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2016-01-13T11:05: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": "cc55c6f74... |
24633300-b527-4363-bea7-a725734c38f0 | mwiesenberger/advection | common.h | #pragma once
// common functions to continuity.cpp, navier_stokes.cpp and plasma.cpp
namespace equations
{
/**
* @brief
\f$ f(x_1, x_2, ...) = \begin{cases}
\min(x_1, x_2, ...) &\text{ for } x_1, x_2, ... >0 \\
\max(x_1, x_2, ...) &\text{ for } x_1, x_2, ... <0 \\
0 &\text{ else}
\end{cas... | ALGO | 0.999413 | 6.028962 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2021-01-22T16:16:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c5284c45... |
11c5b210-3e3d-4890-9b14-6d241003cb9b | SW-H/Algorithm | codetree/색깔폭탄.cpp | #include <deque>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
#define DIR_NUM 4
#define RED 0
#define BLK -1
#define MAX 444
int n, score, bombCnt; // bombCnt : 폭탄 종류 총 개수
int map[20][20];
// 상하좌우
int dr[] = {-1, 1, 0, 0};
int dc[] = {0, 0, -1, 1};
vector<pair<int, int> /**/> bfs(pa... | ALGO | 0.9999 | 4.606894 | {
"github_metadata": {
"branch": "main",
"commit_count": 140,
"repo_created_at": "2021-02-25T07:14: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": "776263655c... |
dc3944c1-9105-4ded-8054-1b9f7549549f | RichardAth/Projects | BigIntCalculator/modmult.cpp | /* calculators/modmult.c
c25525c on 10 Dec 2017
@alpertron alpertron Added general division modulo any composite
/*
This file is part of Alpertron Calculators.
Copyright 2015 <NAME>
Alpertron Calculators is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publ... | ALGO | 0.999885 | 4.468745 | {
"github_metadata": {
"branch": "master",
"commit_count": 398,
"repo_created_at": "2018-03-16T19:46:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f5c8d7b1... |
05afe9ea-2e28-41f4-9401-f641bccf958b | polossk/Code-Archive | CodeForces/codeforces761C.cpp | // <!--encoding UTF-8 UTF-8编码--!>
/*****************************************************************************
* ----Stay Hungry Stay Foolish---- *
* @author : Shen *
* @name : Codeforces Round #394 (Div. 2... | ALGO | 0.999942 | 3.420591 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2014-08-03T14:23:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0fa23bf96... |
4020f1c7-d6a5-4e99-a9e7-3d6d9be01aa2 | atiqrahid/Smart-Gardener-Application | ControllerCode/Code/Movement/Movement.ino | #define signalSecInForward A0
#define signalSecInBackward A1
#define R_PWM_R 10
#define L_PWM_R 11
#define R_PWM_L 5
#define L_PWM_L 6
#define trigR 13
#define echoR 12
#define trigL 4
#define echoL 3
int sigi, sigj;
long distanceR,durationR, distanceL, durationL;
void setup(){
Serial.begin(9600);
//Motor Contr... | TOOL | 0.99596 | 4.884692 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-04-27T06:08: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": "00f256ebf6... |
dda75ba8-5532-41ca-b0ef-6f74cab01e48 | 0001lizhubo/WOJ- | 1004.cpp | #include <bits/stdc++.h>
using namespace std;
#define yzzz 1e-9
double hss(double a, char *c)
{
double k = 1.0;
if (strcmp(c, "meters") == 0)
k = 100.0;
if (strcmp(c, "cubits") == 0)
k = 45.72;
if (strcmp(c, "feet") == 0)
k = 30.48;
if (strcmp(c, "inches") == 0)
k = 2... | ALGO | 0.993406 | 3.706307 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-04-10T13:22: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": "13717e9fa4... |
8f2d5c8c-a5f6-4a8e-9ede-9f603474845d | brianliebe/CS320 | project1/bliebe1/predictors.cpp | #include <iostream>
#include <fstream>
#include <time.h>
#include <utility>
#include <bitset>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
struct PredictorResult
{
int correct;
int total;
PredictorResult()
{
correct = 0;
total = 0;
}
};
unsigned g... | ALGO | 0.956953 | 3.898083 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-08-25T15:17:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed9ef4f1ad... |
606fb621-7eee-4447-bf05-652290b0d2b6 | ChromiumWebApps/chromium | net/tools/flip_server/mem_cache.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/tools/flip_server/mem_cache.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#incl... | TOOL | 0.912006 | 7.055302 | {
"github_metadata": {
"branch": "master",
"commit_count": 260366,
"repo_created_at": "2014-02-21T14:19:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 231,
"forks": 307,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "ce... |
b80f328c-e9e5-45bc-8463-bc9fe2aa630d | google/music-synthesizer-for-android | app/src/main/jni/fm_op_kernel.h | /*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | ALGO | 0.987649 | 6.3212 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2015-08-24T19:14:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 431,
"forks": 83,
"issues": 15,
"pull_requests": 1
},
"file_meta": {
"content_id": "767ae0... |
c266513d-2b8e-432d-871f-97af5b1225d1 | Bill-Board/Code_chef-problem-Solution | 100/Integral Array.cpp | //<NAME>
//ALLAH IS WATCHING ME
// <NAME>
// Dept of ICE, NSTU
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=200005;
mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count());
long long get_rand(long long l, long long r) { // random number from l to r
assert(l <= r);
r... | ALGO | 0.999971 | 3.693312 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-06-25T15:00: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": "6b9ad20b803a... |
5d2819dc-9230-41a7-a75e-c872ea49d01f | Durd3nT/aoc2019 | main06.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <utility>
#include <map>
int loadData(const std::string & data_path, std::vector<std::string> & data) {
// load all objects into std::vector data.
// original data is of form AAA)MMM, meaning object MMM orbi... | ALGO | 0.99983 | 5.461205 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2020-08-25T07:54:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "829d58f98f2... |
81a68adf-e767-477f-956a-d0912ffe63da | arjuunns/DSA-Cpp | 18.Backtracking/Recursion/Ques/VVIMP_Comb_Sum-II.cpp | #include <bits/stdc++.h>
using namespace std; // leetcode 40
void findComb(vector<int> &arr, vector<vector<int>> &ans, vector<int> &ds,
int idx, int target)
{
if (target == 0)
{
ans.push_back(ds);
return;
}
for (int i = idx; i < arr.size(); i++)
{
if (i > idx an... | ALGO | 0.999992 | 5.386867 | {
"github_metadata": {
"branch": "main",
"commit_count": 92,
"repo_created_at": "2024-01-08T07:44:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "67875b452b7... |
3ea1f5ac-99d1-44fb-914b-49b74595f4d6 | DevelTwist/Estructuras-de-Datos-UNET | I Parcial/Busqueda/Busqueda Interna.cpp | /*
*
* METODOS DE BUSQUEDA INTERNA 08/05/2018
* PROCESO DE RECORRIDO O POSICIONAMIENTO PARA COMPARAR LOS ELEMENTOS DEL ARRAY CON UNA CLAVE (ELEMENTO A BUSCAR).
* EL RESULTADO ES UNO DE DOS:
* -Encontrado (Localizado)
* -No Encontrado
*
* Existen Diversos métodos:
* -Lineal ó Secuencial simple
* -L... | ALGO | 0.999713 | 4.513854 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-06-19T00:09: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": "3056fbb4d2... |
6c7d2078-048b-445b-8f3b-42b753b4dac9 | transparent2/URI_OJ_LINUX | DS/DoublyLinkList.cpp | #include<bits/stdc++.h>
using namespace std;
class Node{
public:
int data;
Node *next;
Node *prev;
};
Node *head;
void insert_at_head(int data){
Node *newNode = new Node();
newNode->prev = NULL;
newNode->next = NULL;
newNode->data = data;
if(head == NULL){
head = newNode;
}... | ALGO | 0.999941 | 4.798768 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2016-12-01T19:01:52.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b32405f96f... |
1072942e-2ae8-48d7-a158-49d064dbcd10 | ishandutta2007/codeforces-k | kotamanegi/normal/1288/D.cpp | #pragma comment (linker, "/STACK:256000000")
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#... | ALGO | 0.999794 | 3.377755 | {
"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": "550947c1f320... |
5ef9faaf-3737-4c28-a648-9c71c678be91 | SkydevilK/SWEA | D2/1979.cpp | #include <iostream>
#include <string.h>
using namespace std;
int Check(int** map, int startX, int startY, int N, int K)
{
int wordNum = 0;
int count = 0;
if (startX + K <= N && (startX == 0 || (startX > 0 && map[startY][startX - 1] == 0)))
{
for (int x = startX; x < N; ++x)
{
if (map[startY][x] == 1)
{
... | ALGO | 0.999699 | 4.136125 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2019-03-18T06:07:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86e67a2e0... |
68574a46-0203-4d62-a628-b85988a75f34 | DataStates/vordered-kv | bench/mpi_opt_merge.cpp | #include <omp.h>
#include <mpi.h>
#include <vector>
#include <queue>
#include <random>
#include <thread>
#include "dstates/marker.hpp"
#include "dstates/vordered_kv.hpp"
#include "dstates/lockedmap.hpp"
#include "dstates/sqlite_wrapper.hpp"
#define __DEBUG
#include "dstates/debug.hpp"
typedef std::pair<int, int> in... | ALGO | 0.991676 | 4.44757 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2022-05-19T01:39:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "45159de9a0eb... |
e6a1796a-2a85-4c0d-a851-70679310f12f | LeoChenL/Miscellaneous | edu/Dynamic Programming/Longest Common Substring/Longest Alternating Subsequence/Bottom-up.cpp | /*
The time complexity of the above algorithm is O(n^2) and the space complexity
is O(n)
*/
using namespace std;
#include <iostream>
#include <vector>
class LAS {
public:
int findLASLength(const vector<int> &nums) {
if (nums.empty()) {
return 0;
}
// dp[i][0] = stores the LAS ending at 'i' such ... | ALGO | 0.999948 | 5.347507 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2019-07-09T14:26: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": "4c8dd9265... |
7492353e-c980-4488-84c5-b60192022361 | Feltlin/FEH_Proteus_Robot | main.cpp | #include <FEHLCD.h>
#include <FEHIO.h>
#include <FEHUtility.h>
#include <FEHMotor.h>
#include <FEHServo.h>
#include <FEHAccel.h>
#include <FEHBattery.h>
#include <FEHRCS.h>
#include <FEHSD.h>
#include <FEHBuzzerNoSleep.h>
#include <string>
#define _USE_MATH_DEFINES
#include <math.h>
#include <algorithm>
DigitalEncoder... | TOOL | 0.90058 | 4.237766 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2025-02-05T16:56: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": "039b03ceccb... |
ca62e982-eeeb-44d8-9c7f-ddf13c4fdb07 | amsaladrian/kutanari | kuliah/semester 3/Pemrograman Lanjutan H/Insertion and Selection.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct Student {
string npm;
string nama;
string prodi;
float gpa;
};
bool compareByNPM(const Student& a, const Student& b) {
return a.npm < b.npm;
}
bool compareByNama(const Student& a, const Student& b) {
retur... | TOOL | 0.995314 | 5.844497 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-12-16T03: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": "1c6daf28c2c... |
2ba10780-c2f8-454e-adb5-3b769cc42592 | lgope/Problem-Solving-OJ | URI-Onlie-Judge/uriTry.cpp | #include <iostream>
using namespace std;
typedef long long ll;
#define sc1(a) scanf("%lld",&a)
#define sc2(a,b) scanf("%lld %lld",&a,&b)
#define pf1(a) printf("%lld\n",a)
#define pf2(a,b) printf("%lld %lld\n",a,b)
#define mx 100005
#define mod 10000007
#define Accepted 0
int main()
{
int sh, eh, sm, em;
c... | ALGO | 0.999238 | 3.671875 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2019-12-17T16:45: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": "a9240c3c1... |
dd5e5140-1a2a-444b-b09a-b44319b1e36e | WishQi/CodeHome | cpp/206. Reverse Linked List.cpp | //
// main.cpp
// 206. Reverse Linked List
//
// Created by limaoqi on 18/10/2017.
// Copyright © 2017 limaoqi. All rights reserved.
//
#include <iostream>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
// 9ms,... | ALGO | 0.999725 | 5.491519 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2017-08-22T10:27: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": "1c7fad6d7... |
19c9f48c-edc3-4864-bb41-047e8b0a3d4a | e1ijah1/alg-playground | structure/seg_tree/P3373.cc | #include <iostream>
using namespace std;
#define FOR(i, l, r) for (int i = l; i <= r; i++)
#define RFOR(i, r, l) for (int i = r; i >= l; i--)
#define PLN(n) printf("%lld\n", n)
#define PLN2(a, b) printf("%lld %lld\n", a, b)
#define PLN3(a, b, c) printf("%lld %lld %lld\n", a, b, c)
#define PLN4(a, b, c, d) printf("%l... | ALGO | 0.999839 | 4.734564 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2022-01-19T18:26: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": "9935ce7d... |
a4eff4e1-3ee8-4f48-ad9f-d2da31a90ad8 | DQSSSSS/Algorithm-Competition-Code | 日常/5.26/data.cpp | #include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<map>
#include<queue>
#include<cmath>
#include<stack>
#include<vector>
#include<ctime>
#include<bitset>
#define x first
#define y second
using namespace std;
typedef unsigned long long ULL;
typedef long long LL;
typedef pair<int,int> pii... | ALGO | 0.994236 | 3.199598 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-11-02T16:48: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": "4c07b4b6b4... |
019fb455-0a45-4c28-b227-4fbe719fdc8b | sachuverma/DataStructures-Algorithms | Leetcode Top Interview Questions/solutions/Find First and Last Position of Element in Sorted Array.cpp | /*
#Hacktoberfest2021
Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.
If target is not found in the array, return [-1, -1].
You... | ALGO | 0.999995 | 6.451602 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2020-10-07T10:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2049,
"forks": 541,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "39... |
8cea2606-61d7-4db7-9a3b-f166a6d553f1 | burakbayramli/books | NumericalRecipes2/examples/xgammln.cpp | #include <string>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "nr.h"
using namespace std;
// Driver for routine gammln
int main(void)
{
string txt;
int i,nval;
DP actual,calc,x;
ifstream fp("fncval.dat");
if (fp.fail())
NR::nre... | TOOL | 0.963657 | 3.14579 | {
"github_metadata": {
"branch": "master",
"commit_count": 652,
"repo_created_at": "2016-10-31T17:24:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 325,
"forks": 201,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "542a... |
6c6247ef-6a82-4b41-9c10-172d989652ad | kth-competitive-programming/kactl | stress-tests/strings/SuffixArray.cpp | #include "../utilities/template.h"
#include "../../content/strings/SuffixArray.h"
struct VecSuffixArray {
vi sa, lcp;
VecSuffixArray(vi &s, int lim = 256) {
int n = sz(s), k = 0;
vi x(2 * n), y(2 * n), wv(n), ws(max(n, lim)), rank(n);
sa = lcp = rank;
rep(i,0,n) ws[x[i] = s[i]]++;
rep(i,1,lim) ws[i] += ws... | ALGO | 0.998803 | 4.493343 | {
"github_metadata": {
"branch": "main",
"commit_count": 984,
"repo_created_at": "2017-05-28T21:22:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2974,
"forks": 819,
"issues": 51,
"pull_requests": 17
},
"file_meta": {
"content_id": "a778... |
063175ee-c9f6-474f-af62-366944333840 | duccay1906/opencv | filter2D/filter2D/main.cpp | #include "Header.h"
int main()
{
cv::Mat src; cv::Mat src_gray, opcv_img_gray, opcv_img_color, custom_img_gray, custom_img_color, padding_img_color, padding_img_gray;
//Load input image
src = cv::imread("src.png", cv::IMREAD_COLOR);
cv::cvtColor(src, src_gray, cv::COLOR_BGR2GRAY);
cv::imwrite("sourc... | TOOL | 0.906842 | 4.17419 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2022-11-02T02:41: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": "3d2d1af3b219... |
ba218e93-756c-4e89-9cb8-fc403cc109a5 | EnnSou/ooss-paddle2.3 | paddle/fluid/operators/dirichlet_op.cc | // Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
//
// 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... | ALGO | 0.99022 | 6.934865 | {
"github_metadata": {
"branch": "air",
"commit_count": 35433,
"repo_created_at": "2022-07-29T08:29:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "979de73e7... |
b4d8154d-b44f-4359-bb3d-b1a317c9a820 | csquaredcoding/CST126 | Chapter 14 - Object Oriented Programming/Chapter 14 - OOP/LBD 14.4 - Strings/Source.cpp | /*************************************************************
* Author: <NAME>
* Filename: Source.cpp
* Date Created: 2.21.2017
* Modifications:
**************************************************************/
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
#include <fstream>
using std::ifstre... | TOOL | 0.953778 | 4.085164 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-10-09T18:15: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": "fadcb90630... |
61261d37-a71e-4508-ae9a-3039c0837e45 | Darpan-2002/Leetcode-Solutions | LC_864.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
class Solution {
public:
#define ll long long
#define nn "\n"
#define fr(x,y) for(ll x=0; x<y; x++)
#define fr1(x,t,y) for(ll x=t; x<y; x++)
#define fr3(x,t,y) for(ll x=t; x>y; x--)
#define ga(a,n) ll a[n]; fr(i,n) cin>>a[i];
#define gv(v,n) vll v(n); ... | ALGO | 0.999575 | 3.941823 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2024-05-20T06:48:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "248ac483754... |
1409c787-4440-4cfa-a9f8-dff0c2db1e56 | Stenardt-9002/CODECHEF-Datastructure-and-algo | List-question/Heap/1buildheapin_o(n).cpp |
#include<iostream>
#include<algorithm>
using namespace std ;
void heapify(int *arr,int n ,int i1)
{
int largest = i1;//max heap
int l = 2*i1+1;
int r = 2*i1+2;
if (l<n&&arr[largest]<arr[l])
largest = l ; //finding largest in 3
if(r<n&&arr[largest]<arr[r])
largest = r ;... | ALGO | 0.99995 | 4.156432 | {
"github_metadata": {
"branch": "master",
"commit_count": 307,
"repo_created_at": "2019-06-03T15:10: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": "5fe9dd37... |
ef794bf1-f665-4e62-ae05-7c031235dbee | firdauskedir/DSA-Lab-assignments | graph_practice/sumRootToLeafNumbers.cpp | #include <iostream>
using namespace std;
struct TreeNode {
int val;
TreeNode* left;
TreeNode* right;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
};
class Solution {
public:
int sumNumbers(TreeNode* root) {
return dfs(root, 0);
}
private:
int dfs(TreeNode* node, int... | ALGO | 0.999969 | 5.97964 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-03-28T04:17:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be65a7f01ce6... |
d4ea564d-5346-4875-99be-dfbeeca723e7 | Sibylau/HLS_designs | Cholesky/cholesky_v1.3/model4x4/chol.cpp | //This is a basic systolic array implementation of right-looking Cholesky algorithm
//along (0,1,0) and (0,1).
#include "chol.h"
#include <iostream>
using namespace std;
//Feeder: feed in the elements in the lower triangular matrix of A
// (Note that A is a symmetric matrix) in column major order.
void feeder(ma... | ALGO | 0.999899 | 3.31331 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2018-10-09T16:27:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 45,
"forks": 6,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "73703e70... |
f8039605-2110-4f08-a9ef-cf119ad18a24 | tomoakiii/atcoder2 | Archive/abc301/c.cpp | #include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
typedef long long ll;
const ll INF = 0x0F0F0F0F0F0F0F0F;
const int INFi = 0x0F0F0F0F;
int main(){
string S, T;
cin >> S >> T;
vector<int> nS('z' - 'a' + 1);
vect... | ALGO | 0.999992 | 4.275169 | {
"github_metadata": {
"branch": "main",
"commit_count": 252,
"repo_created_at": "2024-02-05T06:43: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": "07d23872d6... |
84af2c42-2636-4ec2-8097-409afa500c34 | SandipanHaldar/auv-tasks | ps2.cpp | #include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/video/video.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/video/tracking.hpp>
#include <iostream>
#include <vector>
using namespace std;
using namespace cv;
int predictsize = 6;
i... | ALGO | 0.998369 | 3.98724 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-03-10T14:32:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4f0b6acc4... |
85809cd4-2d14-4d1e-8400-ceb0c1541b8c | gjfresno/Info2-Cpp-Basic | 1_IOStream/Ej01_STDIN_STDOUT.cpp | // Programa que suma dos enteros
#include <iostream>
int main(void)
{
// Declaración de variables
int entero1;
// Nuevas formas de enviar al stout y recibir del stdin
std::cout << "Introduzca el primer numero\n";
std::cin >> entero1;
// Declaración de variables en cualquier... | TOOL | 0.982317 | 4.269662 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-04-03T13:33: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": "35a80886680a... |
24495bea-a2b8-4b97-8e48-e79fadba4ede | jv640/LeetCode | August_2020_challange/Day 8.cpp | /*
Problem name: Path Sum III
Description : You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.
The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child n... | ALGO | 0.999993 | 5.53841 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2020-08-01T09:35:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3e94917b... |
b82576ee-b538-432b-b863-2ede3dfc6122 | ngonh/LapTrinhThiDau | TrainingOI_ICPC_2022_ThayTung_Ams/ContestT10/Code/subseq.cpp | /*
Author: <NAME>
School: Ha Noi University of industry
*/
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
... | ALGO | 0.999938 | 4.00255 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2022-05-30T08:12: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": "dec142265f0... |
c12f507b-1b38-4408-9610-06c62636037a | dishankgoel/Codeforces-Solutions | 545C.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
int n;cin>>n;
vector<pair<ll, ll>> xh;
for(int i=0; i < n;i++){
ll x,h;cin>>x>>h;
xh.push_back(pair<int, int>(x,h));
}
// int dp[n][3];
// ll curr_left = xh[0].first;
// dp[0][0] = 1;
// dp[0]... | ALGO | 0.999932 | 3.341676 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2021-04-11T11:49: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": "004f089d1... |
b8efd566-9fef-440b-8473-5284d8a2f34c | Schuxiong/Term-Course-Ecust | 华东理工大学 算法设计与分析/test2/test2/Attcak on Titans.cpp | //#include <iostream>
//using namespace std;
//
//const int MOD = 1000000007;
//
//long long power(long long base, long long exponent) {
// long long result = 1;
// while (exponent > 0) {
// if (exponent % 2 == 1) {
// result = (result * base) % MOD;
// }
// base = (base * base) % ... | ALGO | 0.999974 | 5.008236 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2024-06-24T07:23:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6821fc24a... |
9a2fb840-e371-4216-9b1d-f04d528e66ed | lixuf/pat-class-a | 1025 PAT Ranking (25分).cpp | #include<cstdio>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
using namespace std;
struct node
{
string reg;
int chang;
int fen;
int pai;
node(int _chang, int _fen, string _reg) :chang(_chang), fen(_fen), reg(_reg) {};
};
bool cmp(node x, node y)
{
if (x.fen != y.fen)
{
return x.fen... | ALGO | 0.999381 | 3.364948 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2020-02-10T07:48: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": "ab9e34c4a... |
cc96f2c6-56ee-413d-a043-71a8bd5a038e | ThepokeSUST/DS_EXAM | binaryTree/heightestELeInLevel.cpp | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int data)
{
this->data = data;
left = right = NULL;
}
};
node *build()
{
int ele;
cin >> ele;
if (ele == -1)
return NULL;... | ALGO | 0.99999 | 4.23247 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2024-11-06T14:45: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": "ed45a5682... |
8d2186f2-3dcd-4881-a5bd-a1a6b0a78512 | Samsung/ONE | onert-micro/onert-micro/src/execute/kernels/ArgMin.cpp | /*
* Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
*
* 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... | ALGO | 0.99871 | 4.573018 | {
"github_metadata": {
"branch": "master",
"commit_count": 11402,
"repo_created_at": "2020-04-16T09:33:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 497,
"forks": 164,
"issues": 354,
"pull_requests": 72
},
"file_meta": {
"content_id": "... |
4c193e40-fc1c-482d-a36f-5848e5f17637 | itohdak/Competitive_Programming | Codeforces/Div2/517/C.cpp | #include <bits/stdc++.h>
#include <print.hpp>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(... | ALGO | 0.999903 | 3.336599 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2020-10-16T18:27: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": "66cd80778... |
6e6ae8c0-4753-4bb7-8046-e523722052f6 | sastaachar/Competitive-Programming-Utilities | Solutions/fctre1.cpp | #include<bits/stdc++.h>
#define fr(siz,i) for(int i=0;i<siz;i++)
#define frr(siz,i,a) for(int i=a;i<siz;i++)
#define ff(siz) for(int i=0;i<siz;i++)
#define ll long long
#define pb push_back
#define pii pair<int,int>
#define pll pair< ll , ll >
#define vi vector<int>
#define vvi vector< vi >
#define vl vector<ll>
#defin... | ALGO | 0.999968 | 4.573555 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2020-03-27T07:02:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 2,
"pull_requests": 2
},
"file_meta": {
"content_id": "cce22d7aa... |
a84e4a29-a0dc-4a06-8064-c15d3406429c | jodhangill/SFML-Evolution-Simulator | SFML_visual/Main.cpp | #include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <iostream>
#include <vector>
#include <random>
#include "Food.h"
#include "Food_List.h"
#include "Creature_List.h"
using namespace std;
//TODO GRAPH OF GENERATIONS IN NEW WINDOW
void evolve(sf::RenderWindow *w, FoodL *fl, Cr... | TOOL | 0.940262 | 4.194759 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2022-08-05T04:21: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": "ff354151427... |
56a8139b-16bf-459a-86a7-90079bed1470 | rainwl/GeometryKit | include/igl/predicates/find_self_intersections.h | // This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2024 <NAME> <EMAIL>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/... | ALGO | 0.997696 | 5.039874 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2024-05-12T10:02:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "45f4757b7... |
15a595dd-908a-4f30-b135-f9e737ec1bce | krishshanmukh/NITW-Assignments | DS/Tree/Untitled1.cpp | #include<iostream>
using namespace std;
struct bstnode
{
bstnode *lchild;
int data;
bstnode *rchild;
};
void insert(bstnode* T,int x)
{
if(T!=NULL)
{
if(x<T->data)
{
if(T->lchild!=NULL)
insert(T->lchild,x);
else
{
T->lchild=new(bstnode);
T=T->lchild;
T->data=x;
T->lchild... | ALGO | 0.999904 | 3.55935 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-09-19T06:14: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": "1949adf777... |
69c7c6a0-f504-4f0a-bf67-f99c3b00bf42 | oxSTERBENxo/FINKI | Structured Programming EXAMS/2.20.cpp | /*Од стандарден влез се чита цел број N (N<=100) и потоа N низи од знаци. Низите знаци содржат букви, цифри и специјални знаци (без знаци за празно место), а секоја
од нив не е подолга од 80 знаци. Да се напише програма со која што на стандарден излез ќе се отпечати најдолгата низа, којашто е палиндром
(се чита исто ... | ALGO | 0.999839 | 3.908998 | {
"github_metadata": {
"branch": "master",
"commit_count": 520,
"repo_created_at": "2024-07-15T10:06:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "49deff26... |
95ea79ec-54d9-4f01-adfb-994c8db53283 | sayanx64/CPP-assignments | arrays/binary_search.cpp | #include<iostream>
using namespace std;
void sort(int A[], int n){
int flag;
for(int i = 0; i<n-1; i++){
flag = 0;
for(int j = 0; j< n-i-1; j++){
if(A[j] > A[j+1]){
// swap
int t = A[j];
A[j] = A[j+1];
A[j+1] = t;
... | ALGO | 0.999981 | 4.885262 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-06-29T14:14:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb7fb14f4926... |
688972c6-e1b4-4e31-a301-f8741cbed0d3 | MaximilianYan/SystemProgramming | Winter23/005.AlphaBlending/sources/blendAVX.cpp | #include "include.h"
#include "getPrName.cpp"
#include "coord2index.cpp"
const char WINNAME[] = "alphaBlendingAVX";
const int32_t BOOST_F = 8;
static const size_t HALF256_OFFSET = 16; // (sizeof(__m256i) >> 1)
#define LINESEQ(n) n, n, n, -0x80
alignas(32) const __m256i ALPHASEQ = _mm256_setr_epi8(
LINESEQ(0x03)... | ALGO | 0.998344 | 5.592161 | {
"github_metadata": {
"branch": "main",
"commit_count": 433,
"repo_created_at": "2022-07-21T22:30:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e13e4ec21c... |
87bb0cb4-0ccb-47a8-91b4-d96f7fb226d0 | Eisenwave/voxel-io | include/voxelio/stringmanip.hpp | #ifndef VXIO_STRINGMANIP_HPP
#define VXIO_STRINGMANIP_HPP
/*
* stringmanip.hpp
* -----------
* Provides lightweight string manipulation functions.
*/
#include "primitives.hpp"
#include <string>
#include <vector>
namespace voxelio {
// IN-PLACE CONVERSIONS ========================================================... | TOOL | 0.950702 | 7.3964 | {
"github_metadata": {
"branch": "master",
"commit_count": 272,
"repo_created_at": "2020-06-25T12:11:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 27,
"forks": 4,
"issues": 2,
"pull_requests": 2
},
"file_meta": {
"content_id": "d42212c... |
e60e250a-cc58-43b6-bfa4-dccb5db69985 | ishandutta2007/codeforces-k | kostya_by/normal/639/D.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200200;
const int INF = (int) 1e9;
const long long LINF = (long long) 1e18;
int a[MAX_N];
pair<int, long long> buffer[MAX_N];
priority_queue<long long> pq;
void solve() {
int n, k, b, c; scanf("%d%d%d%d", &n, &k, &b, &c);
for (int i = 0; i < n; i+... | ALGO | 0.999821 | 3.360361 | {
"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": "515ee9bd4963... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.