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 |
|---|---|---|---|---|---|---|---|
8eb8262e-fe62-4b11-b3c6-ae74ebecc70f | mtuann/advprogram-2021 | hw06/LambdaFunction_N2.cpp | #include <iostream>
#include <vector>
using namespace std;
// predicate function: nhan vao mot so tham so tra ve (0/ 1)
bool is_even(int i) {
return (i % 2) == 0;
}
template <typename InputIt, typename funPredicate>
int count_occurrences(InputIt begin, InputIt end, funPredicate pred) {
int count = 0;
fo... | ALGO | 0.99764 | 4.863986 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2021-02-25T01:07:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0eb901550... |
49294b1c-493f-441b-91ad-a10dc2b948a4 | ishandutta2007/codeforces-n | nutella3000/normal/1388/C.cpp | #include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#define int long long
#define pii pair<int, int>
#define sz(a) ((int)a.size())
typedef long double ld;
const int inf = 1e9 + 7;
const int max_n = 1e6 + 4;
int n;
vector<int> gr[max_n];
int p... | ALGO | 0.999976 | 4.574131 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e43600a9b2c... |
f75af22e-280f-43e6-b237-66220eed51ee | tylertian123/CompSciSolutions | other/cpp/bf4.cpp | #include <string>
#include <iostream>
#include <stddef.h>
#include <string.h>
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
std::string s;
std::string t;
std::getline(std::cin, s);
std::getline(std::cin, t);
if (t.length() >= s.length()) {
std::cout << (t ... | ALGO | 0.999961 | 4.741354 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2019-04-05T17:01: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": "bb1ca3819... |
bf02e345-fcad-4a71-bd5c-19448879c462 | EmeridEngineering/cpp-proj-S11-Challenge-Functions | main.cpp | // Section 11
// Challenge
/*
Recall the challenge from Section 9 below.
Your challenge for section 11 is to modularize your solution to the Section 9
challenge by refactoring your solution so that it uses uses functions.
You decide how to modularize the program.
you can use my solution which... | TOOL | 0.999017 | 6.200526 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2024-07-31T13:33:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "823ffba2b... |
fc08e711-19d1-430d-a010-f8ae922c3027 | Rahexa/codeforces | 1862A - Gift Carpet.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n, m;
cin >> n >> m;
// Use a 2D array of characters to store the matrix
char s[n][m]; // This will store each character of the carpet
string temp = "vika"; // T... | ALGO | 0.999985 | 5.508332 | {
"github_metadata": {
"branch": "main",
"commit_count": 345,
"repo_created_at": "2024-11-27T08:53:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "343ef5bb67... |
ce9a9b45-4429-42a2-bcc2-a3eba3662e39 | yu-rovikov/kaggle | contest_topic/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <map>
#include <cassert>
struct pair {
size_t object_id;
long double value;
pair(size_t object_id_, long double value_)
: object_id(object_id_),
value(value_) {}
};
typedef std::vector<pair> array;
array square(const arra... | DATA | 0.992168 | 5.325526 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2017-03-05T11:00: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": "e04330467... |
49040565-ac50-4cb4-b26e-40a2a764c997 | husterxsp/leetcode | 678-valid-parenthesis-string/checkValidString.cpp | class Solution {
public:
bool checkValidString(string s) {
int n = s.size();
if (!n) return true;
string ret = "";
for (int i = 0; i < n; i++) {
char c = s[i];
if (s[i] == '(' || s[i] == '*') ret += c;
else {
int starPos = -1, find... | ALGO | 0.999688 | 5.14432 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2016-06-27T12:12: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": "5452f08d4... |
f0b5ed34-8686-4c3d-be59-a74d15939af8 | AnupTiwari-design/cpp | stack/usingarray.cpp | #include <iostream>
using namespace std;
#define MAX 100
class Stack {
private:
int arr[MAX];
int top;
public:
Stack() {
top = -1;
}
void push(int value) {
if (top == MAX - 1) {
cout << "Stack Overflow\n";
return;
}
arr[++top] = value;
... | ALGO | 0.97711 | 4.951152 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-03-16T12:26: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": "7e83a4ad9872... |
faf9113a-24cd-4ac1-b3ea-c0f34949d91c | nazwatrimiftah03/UAS_DP2_KELOMPOK_SPARKLING-FAIRIES | Pertemuan 3/latihan.cpp | #include <iostream>
using namespace std;
int main() {
int bilangan;
system("cls");
cout << "Masukkan sebuah bilangan bulat: ";
cin >> bilangan;
if (bilangan % 5 == 0 && bilangan % 10 == 0) {
cout << bilangan << " adalah kelipatan dari 5 dan 10." << endl;
} else if (bilangan % ... | ALGO | 0.993779 | 4.57414 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-12-16T16:22: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": "9d2c0255e9a1... |
a7a90349-b65e-4ec6-a37c-de6819e12df3 | MichaelBombile/icub_whole_body_task_controller | include/IK_legs_Solver.hpp |
/** Class Reference
*/
#pragma once
#ifndef IK_legs_Solver_H
#define IK_legs_Solver_H
#include <iostream>
#include <cmath>
#include <stdexcept>
#include <Eigen/Dense>
#include <Eigen/Core>
#include <Eigen/SVD>
// #include <wbi/wholeBodyInterface.h>
#include "WbRobotModel.h"
#include "wbhpidcUtilityFunctions.h... | ALGO | 0.999011 | 4.630045 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-09-09T13:15: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": "d85875e556... |
e1060f0f-5f6f-447f-ba01-3c02c9e2efe8 | sangepu-pradeep/Leetcode | 208-implement-trie-prefix-tree/208-implement-trie-prefix-tree.cpp | struct trieNode{
trieNode*children[26];
bool end_word;
trieNode(){
for(int i=0;i<26;i++) children[i]=NULL;
end_word=0;
}
};
class Trie {
public:
/** Initialize your data structure here. */
trieNode*root;
Trie() {
root=new trieNode();
}
/** Inserts ... | ALGO | 0.999833 | 5.498487 | {
"github_metadata": {
"branch": "main",
"commit_count": 750,
"repo_created_at": "2022-05-23T21:05: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": "88e693a6f2... |
6d8a66d5-e902-4d8c-9f1c-2eb3f58def27 | Mizhik/CplusplusPract | pz12.№15.cpp | #include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
int a[3][3];
int sum1 = 0;
int sum2 = 0;
int min = 1;
int max = 10;
srand(time(NULL));
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
a[i][j] = min + rand() % (max - min + 1);
}
}
for (int i = 0; i <... | ALGO | 0.99957 | 3.808032 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2022-11-14T15:54:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7305247c27e... |
9b3e8181-2a17-4ed7-9ee8-65b226502000 | Adamska-01/DeadFrame2D | 2DGameEngine/include/Tools/UsefullFunctions.h | #pragma once
#include <fstream>
#include <sstream>
#include <vector>
#include <iostream>
#include <time.h>
#include <stdlib.h>
namespace UsefullFunctions
{
static bool init;
inline float Clamp(float value, float min, float max)
{
if (value > max)
return max;
if (value < min)
return min;
return val... | TOOL | 0.901717 | 4.248624 | {
"github_metadata": {
"branch": "master",
"commit_count": 691,
"repo_created_at": "2024-12-27T19:39: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": "b5438d13... |
885f4e8f-dab3-4f6e-a4ec-2fd01e0b0239 | haswelliris/CPC2018-GROMACS | src/gromacs/domdec/domdec_vsite.cpp | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2006,2007,2008,2009,2010,2012,2013,2014, by the GROMACS development team, led by
* <NAME>, <NAME>, <NAME>, and <NAME>,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://... | ALGO | 0.988328 | 6.23841 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2018-09-06T11:15:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32840c11... |
4149177c-ad8e-40d9-94c5-f2a682293183 | ishandutta2007/codeforces-c | cdkrot/normal/1361/A.cpp | // <NAME> (2020)
#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::cerr;
using std::vector;
using std::map;
using std::array;
using std::set;
using std::string;
using std::queue;
using std::pair;
using std::make_pair;
using std::tuple;
using std::make_tuple;
using std::get;
using std::min;
usin... | ALGO | 0.999971 | 3.784249 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:17: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": "63a0df862bd8... |
7ed7deb1-2c43-4baf-9eac-a427adf05782 | ishassan/ProblemSolving | Timus/1929. Teddybears are not for Everyone.cpp | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,a,b,d) for(int i=a; i<=b; i+=d)
#define repd(i,a,b,d) for(int i=a; i>=b; i-=d)
#define repi(it,stl) for(auto it = (stl).begin(); (it)!=stl.end(); ++(it))
#define sz(a) ((int)(a).size())
#define mem(a,n) memset((a), (n), sizeof(a))
#define ... | ALGO | 0.999985 | 3.4507 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-03-11T10:04:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "844dd3763b... |
08eb15bc-7287-40d7-8823-04e72e3b02ce | coolsnowy/leetcode | 009.Palindrome_Number.cpp | /*
Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1) couldn't
If you are thinking of converting the integer to string, note the restriction of using extra space.
You could also try reversing an integer. How... | ALGO | 0.999971 | 4.897813 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2017-09-04T11:26:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec7664e35... |
90de1c05-5303-4904-9989-3db9ad3c1e54 | xyzyzl/compprog | probs/cf/round643/e.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, n) for(int i = 0; i < n; i++)
#define F1R(i, n) for(int i = 1; i <= n; i++)
ll n, a, r, m;
vector<ll> arr, psum;
ll find_for_spec(ll h)
{
int x = lower_bound(arr.begin(), arr.end(), h) - arr.begin();
ll ret = 0;
ll p = h*x - psum[... | ALGO | 0.999757 | 3.588483 | {
"github_metadata": {
"branch": "master",
"commit_count": 364,
"repo_created_at": "2019-06-11T03:19:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "1499616b... |
870c75b5-7a6c-4836-9db5-9018fb485cec | halide/Halide | apps/bilateral_grid/bilateral_grid_generator.cpp | #include "Halide.h"
#include "halide_trace_config.h"
namespace {
class BilateralGrid : public Halide::Generator<BilateralGrid> {
public:
GeneratorParam<int> s_sigma{"s_sigma", 8};
Input<Buffer<float, 2>> input{"input"};
Input<float> r_sigma{"r_sigma"};
Output<Buffer<float, 2>> bilateral_grid{"bilater... | ALGO | 0.999321 | 7.242748 | {
"github_metadata": {
"branch": "main",
"commit_count": 23344,
"repo_created_at": "2012-07-31T04:05:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6126,
"forks": 1080,
"issues": 993,
"pull_requests": 78
},
"file_meta": {
"content_id": "... |
c536630f-8124-471e-b6fa-3912ed39878a | AbdulRehmani2/Week-5 | PF week 5/task6.cpp | #include <iostream>
using namespace std;
int main()
{
int poolSize;
int P1 = 0;
int P2 = 0;
int water1;
int water2;
int percentage;
int total;
float hours = 0;
cout << "Enter the pool size : ";
cin >> poolSize;
cout << "Enter the flow rate of pipe 1 : ";
cin >> P1;
... | ALGO | 0.998223 | 3.856937 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-01-05T16:08: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": "f787fbc8b29d... |
d0d0db1b-fb7a-4c72-aa1b-8f265a9fb3e0 | SPARSH7283/Sparsh_OOPS | Week_5/778-reorganize-string/reorganize-string.cpp | class Solution {
public:
string reorganizeString(string s) {
// phele hashing krenge usse count nikal lenge per character ka
// fir check krenge max char kya h
// uske max char ko place krenge 1 ke gap pe agar hojata to solution "" return nhi krega varna karega
// ab jab sab plac... | ALGO | 0.999994 | 5.976147 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-03-10T08:05: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": "de9715d1e81... |
a8c6be5b-0a6d-4b46-9715-19bf7227d2d4 | gs22006/Baekjoon | 백준/Diamond/28000. Tourism/Tourism.cc | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef __int128 lll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pld;
#define MAX 9223372036854775807LL
#define MIN -9223372036854775807LL
#define INF 0x3f3f3f3f3f3f3f3f
#define fi first
#define se second
#define fastio ios... | ALGO | 0.999973 | 3.887431 | {
"github_metadata": {
"branch": "main",
"commit_count": 810,
"repo_created_at": "2022-09-22T00:45:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30bdfa7bcf... |
fd62263c-5eb6-460f-86fb-a99c41c8171e | ngthanhtrung23/CompetitiveProgramming | codeforces/22/C.cpp | #include <set>
#include <map>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <complex>
#include <iostream>
#include <algorithm>
#include <ctime>
#include <deque... | ALGO | 0.999866 | 3.554869 | {
"github_metadata": {
"branch": "master",
"commit_count": 4554,
"repo_created_at": "2019-04-04T14:21:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 90,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5893... |
214c6dbd-d782-4d0e-931e-290df75e170d | Akshat-Ajmera/LeetCode_Solutions | 307-range-sum-query-mutable/range-sum-query-mutable.cpp | class NumArray {
private:
void buildSegTree(vector<int> &v, vector<int> &seg, int lo, int hi, int ind) {
if(lo == hi) {
seg[ind] = v[lo];
return;
}
int mid = (lo + ((hi - lo) / 2));
buildSegTree(v, seg, lo, mid, (2*ind)+1);
buildSegTree(v, seg, mid+1, ... | ALGO | 0.999981 | 6.669101 | {
"github_metadata": {
"branch": "main",
"commit_count": 1069,
"repo_created_at": "2023-05-02T21:52: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": "af94ff3e6... |
ff81298c-7f35-42bb-acdc-823441c284ff | darshan-trivedi-10/DSA-LeetCode-Question | maximum-value-at-a-given-index-in-a-bounded-array/maximum-value-at-a-given-index-in-a-bounded-array.cpp | class Solution {
long calc(long n){
return ((n * (n + 1)) / 2);;
}
long getSum(int totalLen, int val){
long totalSum = 0;
int decreasingLen = val;
if(totalLen >= decreasingLen){
long currSum = calc(val);
int remainingSum = totalLen - decreasingLen;... | ALGO | 0.999979 | 5.29922 | {
"github_metadata": {
"branch": "main",
"commit_count": 1053,
"repo_created_at": "2022-05-26T10:54:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7a2f444f8... |
fd35f1ab-488c-41f6-9618-85e490fce3de | teodorciripescu/FII | AN 1 SEM 1/IP/SEMINAR/SEMINAR 7/pb1.cpp | //PROBLEMA 1 SUBPUNCTUL A
#include<iostream>
#include<fstream>
using namespace std;
ifstream f("listasimpla.in");
struct node{
int info;
node *urm;
};
typedef node *lista;
int n;
void initList(lista &L){
L=NULL;L=new node;f>>L->info;
node *p,*q;p=new node;f>>p->info;L->urm=p;
for(int i=2;i<n;i++){
... | ALGO | 0.999844 | 3.709788 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2018-12-09T23:50: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": "ef890c404... |
00769131-6d65-45e1-9c2b-a353e2b7e68c | Jinedl/C_Cpp_tasks | С++/c9t2.cpp | #include <iostream>
class Result
{
public:
long long val;
Result(long long h = 0) : val(h) {}
};
void
f(long long a, long long b, long long k)
{ //Ackermann function of 3 arguments
if (!k && a > 0 && b >= 1) {
throw Result(a + b);
} else if (b == 1 && k > 0 && a > 0) {
throw Result(a);... | ALGO | 0.999713 | 4.542736 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-09-14T21:36: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": "f138ee68c535... |
8325925d-4b74-44fd-a3e7-8acfe3dfbfd2 | Thomas1205/RegionCurv | msg_passing/separatorChainDualDecomp.hh | /******* written by <NAME> as an employee of the University of Düsseldorf, Germany, 2012 *****/
/***** implements the solving of dual relaxations with pairwise separators *****/
/**** via the subgradient method for dual decomposition with factor (junction) chains *****/
#ifndef SEPARATOR_CHAIN_SUBGRADIENT_HH
#define... | ALGO | 0.99894 | 4.142147 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2011-07-13T18:44:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d8f711f... |
f884a3e1-daa3-4055-8aa1-6c750d6b0c04 | AMReX-Codes/amrex | Src/LinearSolvers/MLMG/AMReX_MLNodeTensorLap_2D_K.H | #ifndef AMREX_MLNODETENSORLAP_2D_K_H_
#define AMREX_MLNODETENSORLAP_2D_K_H_
#include <AMReX_Config.H>
namespace amrex {
namespace mlndts_detail {
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
Real ts_interp_line_x (Array4<Real const> const& crse, int ic, int jc) noexcept
{
return (crse(ic,jc,0)+crse(i... | ALGO | 0.997151 | 5.969036 | {
"github_metadata": {
"branch": "development",
"commit_count": 27456,
"repo_created_at": "2017-04-28T19:37:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 637,
"forks": 407,
"issues": 21,
"pull_requests": 19
},
"file_meta": {
"content_id... |
d8133df0-7d62-410f-849b-1f6c65f405b8 | AlfonsoLRz/AlgoritmosGeometricosUJA | clion_linux/Geometry/BasicGeometry.h | #include "stdafx.h"
namespace BasicGeometry
{
bool equal(double a, double b);
double determinant2x2(double a, double b, double c, double d);
double determinant3x3(double a, double b, double c, double d, double e, double f, double g, double h, double i);
double min3(double a, double b, double c);
double max3(doubl... | TOOL | 0.998009 | 6.240365 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-01-15T16:30:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "53013f709e4... |
097c6b58-8a32-4179-9a26-eb03ec8873db | F4mpS/OTUScpp | 08-homework/src/main.cpp | #include <iostream>
#include <filesystem>
#include <regex>
#include <boost/program_options.hpp>
#include "../lib/MaskFileParser.h"
#include "../lib/BayanFileParser.h"
#include "../lib/hashes/CRC32.h"
namespace po = boost::program_options;
template <typename Hash>
void Start(std::size_t blockSize, IFileParser* filePa... | TOOL | 0.965492 | 5.820957 | {
"github_metadata": {
"branch": "main",
"commit_count": 192,
"repo_created_at": "2023-07-02T09:59:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e211f37956... |
ffc109a4-9431-41b2-90e7-3197f1ce6e51 | ksaveljev/UVa-online-judge | 10281.cpp | #include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main(void) {
char c;
int prev_h = 0, prev_m = 0, prev_s = 0, prev_speed = 0;
int h, m, s, speed;
double result = 0;
while (cin >> h >> c >> m >> c >> s) {
if (cin.peek() == ' ') {
cin >> speed;
result += ((h * 3600 + m * 60 ... | ALGO | 0.992008 | 3.418491 | {
"github_metadata": {
"branch": "master",
"commit_count": 788,
"repo_created_at": "2011-04-04T11:43:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 106,
"forks": 69,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "afa27... |
2b0d142a-4c6a-4713-ae32-80ac23a17dc9 | KKshitiz/tic-tac-toe-cpp | main.cpp | #include<iostream>
#include<math.h>
#include<ctype.h>
#include<cstring>
#include<windows.h>
#include<stdio.h>
#include<stdlib.h>
using namespace std;
void intro();
void initialize();
void menu();
void menu_2();
void game();
void exit_game();
void print_board();
void p1_input();
void p2_input();
void winner_check(int);... | TOOL | 0.987138 | 3.745197 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-03-22T13:47:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d2c076070... |
65513819-6df7-41b1-99f4-ab41b82f22f8 | guilherme8426/Maratona | CSES/counting_numbers.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll dp[19];
ll solve(ll num){
if(num == -1) return 0;
string numero = to_string(num);
ll ans=1, sz = numero.size();
dp[0] = 1;
for(int i=1; i<sz;i++){
dp[i] = dp[i-1]*9;
ans += dp[i];
}
// cout << "n... | ALGO | 0.999527 | 4.384747 | {
"github_metadata": {
"branch": "main",
"commit_count": 180,
"repo_created_at": "2023-01-01T18:44:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9231d14727... |
0fdd7316-03af-4a01-94b4-006319062182 | LJFYC007/code | test/2020-11/2020-11-17/source/X503-D07/flower/bf.cpp | /***************************************************************
File name: flower.cpp
Author: ljfcnyali
Create time: 2020年11月17日 星期二 09时21分09秒
***************************************************************/
#include<bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for ( int i = (a), _end_ = (b); i <= _en... | ALGO | 0.999972 | 3.785428 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2018-08-02T05:42:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3390a0d47... |
15400995-047d-46d6-94dc-43bc91fcdfb8 | xiami2019/LeetCode | 剑指Offer/67.把字符串转换成整数.cpp | class Solution {
public:
int strToInt(string str) {
if (str == "") return 0; // 可以设置一个全局变量来检测输入是否非法
int index = 0;
long long ans = 0;
// 消除空字符
while (str[index] == ' ') index++;
int negative = 1;
if (str[index] == '-') {
negative = -1;
... | ALGO | 0.999393 | 4.522004 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-02-11T04:29: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": "c348b319f... |
90e458ee-8363-45c7-ab9d-58796c296380 | DmitryVasilkovW/ITMO-alg-labs-1-sem | Lab6/Task_4.cpp | #include <iostream>
#include <vector>
std::vector<std::vector<std::string>> array(3, std::vector <std::string> (200900));
struct Node
{
std::string key;
Node *left;
Node *right;
int height;
};
int height(Node *h)
{
if (h == NULL)
{
return 0;
}
return h -> height;
}
void fixheight(Node* root)
{
int hl = ... | ALGO | 0.999148 | 3.901829 | {
"github_metadata": {
"branch": "main",
"commit_count": 113,
"repo_created_at": "2023-04-25T09:15: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": "d1c65e5f1a... |
3be39343-c8ea-4836-a39c-03be5a90b0c3 | ashishpandey2600/Lab8 | Lab2/sq2.cpp | // 2. Write a function that finds the minimum and the maximum value in
// an array of N integers. Inputs to the function are the array of integers,
// an integer variable containing the length of the array and pointers to integer
// variables that will contain the minimum and the maximum values. The function
// protot... | ALGO | 0.999604 | 4.46115 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-03-02T01:53: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": "75caab46a599... |
7684bb31-3920-4bd4-a518-f6e96ab8aede | absoluteqq/HSEworksPPA | HSEalgs/unordered_tasks/postFixNote.cpp | #include <iostream>
#include <stack>
#include <string>
using namespace std;
int main() {
stack <int> a;
string s;
string revS;
int sum = 0;
getline(cin, s);
for(int i = 0; i < s.length(); i++)
{
if (s[i] == ' ')
{
continue;
}
if (s[i] != '+' && s[i] != '-' && s[i] != '*')
{... | ALGO | 0.999978 | 4.482504 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-03-20T14:16: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": "c9864359ec... |
8758d94e-75d8-4a3e-b420-9756d7143cc3 | FluffyDou/HangDou | Gorgon_Hang/Gorgon/GraphMatch/WongMatch.h | /*
Graph Matching algorithm based on the following paper:
Wong et al., An algorithm for graph optimal monomorphism,
IEEE Transactions on Systems, Man, and Cybernetics, Vol 20, No 3, May/June 1990, pp628-636
Author: <NAME>
Date : 01/23/2006
*/
#ifndef WONGMATCH_H
#define WONGMATCH_H
#include "StandardGraph.h"
#... | ALGO | 0.99779 | 3.532014 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2016-10-26T15:50:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f0ee69ed9... |
9d6d9cb1-e221-415f-ad74-d17e07c24978 | khadijasarfraz97r/51-to-100-code | code 100.cpp | // This program searches for a given element in a 2D array and displays its position.
#include <iostream>
using namespace std;
int main() {
int rows = 3;
int cols = 3;
int arr[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
int element = 5;
bool found = false;
for (int i = 0; i < rows; i++) {
... | ALGO | 0.999266 | 5.810802 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-02-05T07:23: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": "08134b0f26ad... |
5c6aaa72-44a7-4f71-9618-a7c3f58d55ea | xavier-kong/aoc2023 | 02/part2.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
std::vector<std::string> splitString(std::string str, char splitter){
std::vector<std::string> result;
std::string current = "";
for(int i = 0; i < str.size(); i++){
if(str[i] == splitter){
... | ALGO | 0.983714 | 5.566664 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2023-11-30T14:43: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": "796c1ec42... |
8ffa561c-782f-45cd-b060-350f8a05c20a | azer89/BBW | BBW_LIBIGL/igl/svd3x3/arap.h | // This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2013 <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.... | ALGO | 0.998106 | 6.250749 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2016-03-28T16:38:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa6c1255a9... |
2c8e4fe9-91e5-4a7d-bae3-e8c5af0b6601 | AfzalHossan-2005021/TLE-s-CP-31-Sheet | 1500/C_Tea_Tasting.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define endl "\n"
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t--){
int n;
cin >> n;
vi a(n), b(n);
vector<ll> cnt(n, 0), add(n, 0), pref(... | ALGO | 0.999988 | 3.184299 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-08-08T05:08: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": "cbb051b31320... |
fbcc6ea7-02ff-436f-b996-ec69ddffb4aa | murtaza008/2-3-4-Trees | main.cpp | #include <iostream>
using namespace std;
// Max keys in a node (3 keys = 4 children)
const int MAX_KEYS = 3;
struct Node {
int keys[3]; // Holds 1–3 keys
Node* children[4]; // Max 4 children
int numKeys;
bool isLeaf;
Node() {
numKeys = 0;
isLeaf = true;
for (in... | ALGO | 0.999949 | 5.826909 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-02-21T00:09: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": "6eb047933ddc... |
a618f831-6f20-4966-81c9-fd61d3684823 | ndsoccerstar8598/AppliedDataStructures | lecture3/knuthoptimizedQuicksort.cpp | //200 points and optional
#include <iostream>
#include <cstdlib>
#include <time.h>
#include <fstream>
#include <chrono>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <direct.h>
#include <windows.h>
using namespace std;
using namespace std::chrono;
void partialQu... | ALGO | 0.999529 | 4.61637 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2019-01-25T20: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": "480f93f1b... |
e2da28cc-881b-4db2-9960-3bd6a33a2025 | kermiter/algorithm | leetcode/134.GasStation/solution.cpp | #include<iostream>
#include<vector>
#include<string>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
struct TreeNode {
int val;
TreeNode *left;
TreeNod... | ALGO | 0.999997 | 4.674466 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2018-10-25T15:24: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": "9cfe70398... |
558c9140-037e-4ad7-8ae7-8fe552f48ecf | alexandraback/datacollection | solutions_2755486_0/C++/lisang/C.cpp | #include <algorithm>
#include <numeric>
#include <string>
#include <cstring>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <iostream>
#include <iterator>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <utility>
#include <functional>
#include <bitset>
using... | ALGO | 0.998848 | 3.940187 | {
"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": "763ea6ca7... |
881a3a14-c800-4ccd-8d4a-416867400b2f | ivanramirez-git/Talleres_Para_Mis_Fans | Practicas Sin Pago/lavecindad.cpp | /*
Lavecindad
Al quitarle cuatro kilos al peso de Quico se obtiene dos veces el peso del chavo y
si sumamos los pesos de Quico y el chavo se obtiene cinco veces el peso de
Noño (todos en pesos enteros). En la vecindad se dice que una persona está en
etapa 'uno' si está entre 0 y 20 kilos, en etapa 'dos' si está entre ... | ALGO | 0.996895 | 3.345708 | {
"github_metadata": {
"branch": "main",
"commit_count": 168,
"repo_created_at": "2021-07-03T08:07:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc20fd1c56... |
5c33cb48-7283-4d16-8ee4-6f4f76710fef | harshaithireddy/LeetCode-Codes | 140-word-break-ii/word-break-ii.cpp | class Solution {
public:
vector<string> res;
void solve(int i, string &sentence, string &s, unordered_map<string, bool> &doesExist) {
if(i >= s.size()) {
res.push_back(sentence);
return;
}
for (int j = i + 1; j <= i + 10 && j <= s.size(); j++) {
str... | ALGO | 0.99981 | 5.19911 | {
"github_metadata": {
"branch": "main",
"commit_count": 2298,
"repo_created_at": "2024-01-20T18:20: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": "bd0501331... |
728d5501-8671-443b-abd5-85ed0e9321cb | ITech7750/AdvancedContainers | collection/segmentedlist/SegmentedList.h | #ifndef LAB2_SEGMENTEDLIST_H
#define LAB2_SEGMENTEDLIST_H
#include "../linkedlist/LinkedList.h"
template<typename T>
class SegmentedList {
private:
Element<LinkedList<T> *> *head;
public:
explicit SegmentedList() : head(nullptr) {}
SegmentedList(int count, T *items) : SegmentedList() {
for (int ... | TOOL | 0.977188 | 4.230109 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2024-10-20T14:24:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee4fd3a33... |
c14f1d37-b96a-4d2f-8669-a88e455bf30d | qpwoeirut/competitive-programming | CSES/Problemset/Additional/cyclic_array.cpp | //cyclic_array.cpp created at 09/17/20 11:23:58
#include <bits/stdc++.h>
using namespace std;
#define FI first
#define SE second
typedef long long ll;
typedef pair<ll,ll> pll;
const ll MN = 200001;
ll N, K;
ll A[MN];
pll dp[MN];
int main() {
cin >> N >> K;
ll sum = 0;
for (int i=0; i<N; ++i) {
... | ALGO | 0.999939 | 3.896422 | {
"github_metadata": {
"branch": "master",
"commit_count": 348,
"repo_created_at": "2020-09-17T05:10:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce38546... |
af789cd1-61f0-4bf7-a27e-970da5b17f6b | prakhya/Unified-Inclusive-L2-Cache-Controller-Simulation | Source Code/Set.h | /*********************************************************************************
* File: Set.h
* Project: ECE 585 L2 Cache Model
* Version: 0.1
* Date: 11/20/2014
* Author: Prakhya, Doguparthi, Mutyala, Kothakapu
*********************************************************************************/
#ifndef S... | ALGO | 0.992122 | 4.770213 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-02-28T11:48: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": "3c29a70266... |
aa0ef119-1f6b-4bb0-91bd-a529e7fc9d64 | panluDreamer/PAT-A | A1098.cpp | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<functional>
using namespace std;
const int maxn = 110;
int insertSort[maxn][maxn];
int heapSort[maxn][maxn];
int heap[maxn] = { 0 };
priority_queue<int, vector<int>, greater<int>> q;//小顶堆
int n;
int buf[maxn] = { 0 };
int ... | ALGO | 0.99999 | 3.287333 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-09-25T09:14: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": "bcb88fda54... |
4ccd961a-5f7c-407b-8ca4-c01c2c938bfd | AI-Planning/autoscale | planners/ipc2018-agl-cerberus/src/search/graph_algorithms/topological_sort.h | #ifndef GRAPH_ALGORITHMS_TOPOLOGICAL_SORT_H
#define GRAPH_ALGORITHMS_TOPOLOGICAL_SORT_H
#include <vector>
using namespace std;
// Algorithm by Kahn (1962)
/*
L = Empty list that will contain the sorted elements
S = Set of all nodes with no incoming edges
while S is non-empty do
remove a node n from S
insert... | ALGO | 0.999939 | 6.541975 | {
"github_metadata": {
"branch": "main",
"commit_count": 1270,
"repo_created_at": "2021-07-13T08:45:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1677830270... |
a8ea8297-d5ae-4df7-93be-ea0e88521e50 | julcst/gltemplate | src/framework/objparser.cpp | #include "objparser.hpp"
#include <glm/glm.hpp>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/hash.hpp>
#include <tiny_obj_loader.h>
using namespace glm;
#include <string>
#include <filesystem>
#include <vector>
#include <unordered_map>
#include <iostream>
#include <stdexcept>
#include "mesh.hpp"
#include "comm... | TOOL | 0.954042 | 6.484657 | {
"github_metadata": {
"branch": "master",
"commit_count": 189,
"repo_created_at": "2023-09-20T11:18:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "4bc87088... |
871b1655-7907-450d-bfbd-439c4fbfec4c | sergii-yatsuk/leetcode | cpp/valid-parentheses.cpp | //https://leetcode.com/problems/valid-parentheses/
class Solution {
public:
bool isValid(string s) {
int p1; // ()
int p2; // []
int p3; // {}
stack<char> st;
for (size_t i = 0; i < s.length(); ++i)
{
switch (s[i])
{
case '(':
++p1;
... | ALGO | 0.998056 | 6.245986 | {
"github_metadata": {
"branch": "master",
"commit_count": 155,
"repo_created_at": "2016-10-08T12:54: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": "d4e74211... |
3cf7ca36-4c0c-409a-b367-a88174f74316 | Aria3108/EDA | test.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <limits>
using namespace std;
struct Punto {
double x, y;
};
struct Arista {
int id;
Punto inicio, fin;
};
struct NodoKD {
Arista arista;
NodoKD* izquierda;
NodoKD* derecha;
NodoKD(Arista _arista) : arista(_arista), izq... | ALGO | 0.999902 | 5.518756 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-06-29T21:58: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": "35b1d232ec45... |
b0d19b80-18a1-4d18-97a3-c3fff9fc2e5c | System19MCA/ds_in_cpp_mca | w11-p4.cpp | #include <iostream>
#include <vector>
using namespace std;
class Graph {
private:
int V;
vector<vector<int>> adjMatrix;
public:
Graph(int vertices) {
V = vertices;
adjMatrix.resize(V, vector<int>(V, 0));
}
void addEdge(int u, int v) {
adjMatrix[u][v] = 1; // Directed edge
... | ALGO | 0.999995 | 6.604641 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2025-04-10T06:00:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64a5627ebf0... |
2d8026e0-06b8-4ae4-87f6-1391ff91b8fe | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/01/0121/personal_submission/cf553b_tsreaper.cpp | #include <bits/stdc++.h>
#define MAXN 50
using namespace std;
int n, ans[MAXN + 5];
long long K;
long long f[MAXN + 5];
int main() {
scanf("%d%lld", &n, &K);
f[0] = 1; f[1] = 1;
for (int i = 2; i <= n; i++) f[i] = f[i - 1] + f[i - 2];
for (int i = 1; i <= n; ) {
if (f[n - i] >= K) {
... | ALGO | 0.999942 | 3.51735 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "aa7a... |
9ea9ad6a-29a0-4f72-bc97-5cd75f5a858b | faiyazchowdhury/Pac-Man-Video-Game | doubly_linked_list.cpp | #include <stdlib.h>
#include <stdio.h>
#include "doubly_linked_list.h"
DLinkedList* create_dlinkedlist(void) {
DLinkedList* newList = (DLinkedList*)malloc(sizeof(DLinkedList));
newList->head = NULL;
newList->tail = NULL;
newList->current = NULL;
newList->size = 0;
return newList;
}
LLNode* cre... | TOOL | 0.998009 | 3.521728 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-10-08T19: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": "7d2b42dada... |
2ab45f4e-0785-413c-83ea-c92b29815bfa | vidalmatheus/codes | LeetCode/Top/Hard/wordSearchII-v2.cpp | #include <bits/stdc++.h>
using namespace std;
static int speedUp=[](){
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
return 0;
}();
struct TrieNode {
bool isWord;
vector<struct TrieNode*> children;
TrieNode() : isWord(false) {
children.resize(26,nullptr);
... | ALGO | 0.999988 | 6.152225 | {
"github_metadata": {
"branch": "master",
"commit_count": 527,
"repo_created_at": "2019-11-05T03:55: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": "eca60a56... |
bfcd61b6-a8e9-4eaa-a95d-4af80dc42e61 | kjbartel/magma | src/zhegst.cpp | /*
-- MAGMA (version 1.6.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2015
@author <NAME>
@author <NAME>
@precisions normal z -> s d c
*/
#include "common_magma.h"
/**
Purpose
-------
ZHEGST... | ALGO | 0.995354 | 5.068378 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2015-06-04T17:28:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "13b7987d... |
d648e3ca-9689-40d2-96a9-afd35edb241d | DongTan1102/Baitap | Baitap/Question9/q9.3.cpp | //#include<stdio.h>
//#include<conio.h>
//#include<windows.h>
//#include <string>
//#include<iomanip>
//#include <iostream>
//#include<fstream>
//
//using namespace std;
//
////void bubbleSort(int *arr, int count, int(*order) (int, int));
////int CheckBigger(int a, int b) { return a>b; }
////int CheckSmaller(int a, in... | ALGO | 0.997854 | 3.670947 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2018-06-07T09:11: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": "0064b95fd... |
d617074a-9665-4e70-a552-f18606f0fa3f | ramoraga/NIU_Coursework | Programming in C++/CSCI 241/Assign11/bstree.h | //*******************************************************************
//
// bstree.h
// CSCI 241 Assignment 11
//
// Created by <NAME> and z1864815
//
//*******************************************************************
#ifndef BSTREE_H
#define BSTREE_H
#include <iostream>
#include <stdexcept>
#include <queue>
... | ALGO | 0.998075 | 3.882416 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-11-30T03:46: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": "1e21391b684... |
4b534ff2-4ae7-4a9a-81ea-9ee2ac5f64f5 | markuspf/maf | ltfsa.cpp | /*
Copyright 2008,2009,2010 <NAME>
This file is part of MAF.
MAF is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MAF is distri... | TOOL | 0.985943 | 6.709599 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-08-23T13:52:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7e032bb5c... |
aec4d30d-042c-46c9-ab76-397f5eaa6d2f | kyle1548/corgi_stair | include/plane_tracker.hpp | #include <deque>
#include <vector>
#include <algorithm>
#include <cmath>
#include <Eigen/Dense>
#include "plane_segmentation.hpp"
struct TrackedPlane {
std::deque<double> recent_distances;
int no_update_count = 0;
void add_distance(double d, size_t max_size = 5) {
recent_distances.push_back(d);
... | ALGO | 0.999751 | 6.227975 | {
"github_metadata": {
"branch": "main",
"commit_count": 338,
"repo_created_at": "2025-03-03T07:03: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": "b157b6d6c7... |
f813c9b9-3140-4b1d-ac9b-ae38e216f660 | lemonadesaltbagel/algorithms | leetcode/353.design-snake-game.cpp | #include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
/*
* [353] Design Snake Game
*
* https://leetcode.com/problems/design-snake-game/description/
*
* algorithms
* Medium (27.52%)
* Total Accepted: 12.8K
* Total Submissions: 46.3K
* Testcase Example:
*... | ALGO | 0.999833 | 5.810482 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2014-05-01T08:54: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": "4bd00292... |
3d5a330f-916b-40f6-99f2-d04034a2a542 | nowgnoesiohc/problem-solving | 백준/Silver/5545. 최고의 피자/최고의 피자.cc | #include <stdio.h>
int main()
{
int n, a, b, c, d[101], dmax=0, tmp, ttmp, maxx=0;
// 토핑 종류 수
scanf("%d", &n);
// A는 도우의 가격, B는 토핑의 가격을 나타낸다.
scanf("%d %d", &a, &b);
// 도우 칼로리
scanf("%d", &c);
// 토핑 칼로리
for(int i=1;i<=n;i++){
scanf("%d", &d[i]);
}
for(in... | ALGO | 0.999893 | 3.249721 | {
"github_metadata": {
"branch": "main",
"commit_count": 109,
"repo_created_at": "2024-12-04T13: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": "6d60927d32... |
39ef071d-13de-4475-8a2b-1facc3a00d59 | ChenMinnie/MMS2017FALL | Assignment_3/Homework1/main.cpp | #include <iostream>
#include <cv.h>
#include <highgui.h>
#include <cstdio>
#include <opencv2/opencv.hpp>
#define N 16.0
#define S 31.0
using namespace cv;
using namespace std;
double MAD(IplImage * C, IplImage *R, int i, int j, int X0, int Y0, int X, int Y);
void Sequential(IplImage * C, IplImage *R,Mat ip2, int x, ... | ALGO | 0.998367 | 4.299129 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2017-10-20T12:37: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": "8f956a5d9... |
ac49fdc2-5a50-48a6-8a04-eef8ec66d858 | pinjutien/LeetCode-study | aux_16_track_median.cpp | // http://www.geeksforgeeks.org/median-of-stream-of-integers-running-integers/
#include <iostream>
using namespace std;
// use two heaps to find the median
// left side: max heap; right side: min heap
// If x is smaller than effective_median (ie on the left side), x is populated into max heap. If greater, populated in... | ALGO | 0.999994 | 5.406438 | {
"github_metadata": {
"branch": "master",
"commit_count": 109,
"repo_created_at": "2016-04-23T21:53: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": "c6f1dba5... |
c26032f0-ab7c-47b6-9a17-488d02baae04 | inchency/AlgorithmStudy | sourceCode/kakao/2021 KAKAO BLIND RECRUITMET 신규아이디 추천.cpp | // https://programmers.co.kr/learn/courses/30/lessons/72410
#include <string>
#include <vector>
#include <iostream>
using namespace std;
string solution(string new_id) {
string answer = "";
int size = new_id.size();
// 1단계 && 2단계
for(int i=0; i<size; i++){
char cur_char = new_id[i];
i... | ALGO | 0.999759 | 5.26536 | {
"github_metadata": {
"branch": "main",
"commit_count": 180,
"repo_created_at": "2021-11-17T10:23: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": "a2ed38a159... |
c4bf2cb6-b65f-4299-a6a7-59fc1839df1f | pod25/ball_blaster | Headers/physics.h | /*
* File: physics.h
*/
#ifndef PHYSICS_H
#define PHYSICS_H
enum HIT_TYPES {
HIT_BOUNCE,
HIT_GOAL,
HIT_CHANGE_SQUARE
};
/*
* bounce_event class
*/
class hit_event {
public:
double _t; // The time the bounce occured in the sub frame in the interval [0, 1]
vec _h_normal; // The normal for the bouncing surfac... | ALGO | 0.954674 | 6.630886 | {
"github_metadata": {
"branch": "master",
"commit_count": 223,
"repo_created_at": "2009-11-05T11:36:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "78d8cdd9... |
b7ea0156-337f-4fb7-b7b0-a1d67ab3de64 | 0bRobot/Learn-Code | C/OldOcde/snake.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <graphics.h>
#include <mmsystem.h> //多媒体接口的头文件
#pragma comment(lib,"winmm.lib")//多媒体接口的头文件
#define SNAKE_MUN 1000 //蛇的最大长度
#define W_HIGHT 480 //窗口高
#define W_WIDE 880 //窗口宽
/*
项目 贪吃蛇
知识点:结构体,循环,函数 ,EasyX [图形界面库]... | TOOL | 0.99093 | 4.398265 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-02-18T17:10:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1747baec3... |
02862f38-c1a3-4321-a6fe-259011bef4fb | Severin48/CPPLeetCode | LeetCode/RemoveDuplicatesFromSortedArray.cpp | #include <vector>
#include <iostream>
#include "RemoveDuplicatesFromSortedArray.h"
using namespace std;
int binarySearchRight(vector<int>& vec, int key) {
int l = 0;
int r = vec.size();
int m;
while (l < r) {
m = floor((l + r) / 2.);
if (vec[m] > key) r = m;
else l = m + 1;
... | ALGO | 0.99994 | 6.077022 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2023-11-18T11:21: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": "cf750a7bf67... |
91dfa5a9-9d96-4515-8ece-83217b92826a | yujiex/computerGraphics | ass1/src/texture.cpp | #include "texture.h"
#include <assert.h>
#include <iostream>
#include <algorithm>
using namespace std;
namespace CMU462 {
inline void uint8_to_float( float dst[4], unsigned char* src ) {
uint8_t* src_uint8 = (uint8_t *)src;
dst[0] = src_uint8[0] / 255.f;
dst[1] = src_uint8[1] / 255.f;
dst[2] = src_uint8[2] ... | ALGO | 0.951962 | 5.700814 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-09-04T18: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": "0dd24868f0... |
b9c4b40e-3591-4e10-b927-4edaf8ca6ae5 | tmoraut07/Algo1-UBA | auxiliares.cpp | #include <algorithm>
#include "auxiliares.h"
#include <iostream>
#include <algorithm>
#include <fstream>
#include <iomanip>
using namespace std;
const double pi = 3.14;
double radioTierra = 6378;
double obtenerLatitud(gps posicion) {
return get<0>(posicion);
}
double obtenerLongitud(gps posicion) {
return g... | DATA | 0.9478 | 4.079669 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-07-11T15:54: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": "ddb49caa489... |
69b44364-bc8a-4281-921a-8db567ac481b | aggVishal/Samsung-R-D-Coding-Test-Questions | doctorProbability.cpp | /*
https://www.geeksforgeeks.org/samsung-interview-experience-set-39-campus-r-d-noida/
https://www.careercup.com/page?pid=samsung-interview-questions
A Doctor travels from a division to other division where divisions are connected like a graph(directed graph) and
the edge weights are the probabilities of the doctor go... | ALGO | 0.999943 | 4.840815 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-08-17T18:14: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": "dc7df73fa105... |
5394532a-3908-4f72-84b3-f56a64eac2bc | xoyowade/solutions | leetcode/122_best_time_to_buy_and_sell_stock2.cpp | class Solution {
public:
int maxProfit(vector<int> &prices) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int profit = 0;
if (prices.size() < 2) {
return 0;
}
int in = prices[0];
int out;
bool find_in = tru... | ALGO | 0.999867 | 5.518747 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2013-06-03T15:09:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6c631ac... |
17c00261-d2f8-4ea6-b6db-44b024de2b04 | hmnt007/CPP-Pogramming | BinarySearch/Medium/Linked List/KthLastNode.cpp | // https://binarysearch.com/problems/Kth-Last-Node-of-a-Linked-List
/**
Kth Last Node of a Linked List
Medium
Given a singly linked list node, return the value of the kth last node (0-indexed). k is guaranteed not to be larger than the size of the linked list.
This should be done in \mathcal{O}(1)O(1) space.
Const... | ALGO | 0.999989 | 5.868166 | {
"github_metadata": {
"branch": "master",
"commit_count": 459,
"repo_created_at": "2019-09-19T10:50: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": "c7d12c3c... |
dfdf6dd5-99ed-4269-855f-1e195a25be61 | ElenMuradyan/cpp-practice | functions/recursion/intermediate_recursion/string_intermediate_recursion/BoggleSolver.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
bool isValidCell(const vector<string> &dictionary, vector<vector<string>> &board, string current, int n, int x, int y) {
int size = current.length();
... | ALGO | 0.998185 | 5.233295 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2025-06-07T15:23: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": "33a2e58c0a9... |
463825ba-28a1-4085-8733-c365ee5346d0 | lyp-liu/c | DSks1/DSks1/LinkList.h | #pragma once
#include<iostream>
#include<stdlib.h>
#include<Windows.h>
template<class T>
class LinkNode { //链表结点类的定义
public:
T data; //数据域
LinkNode <T>*link; //链指针域
LinkNode(LinkNode<T>*ptr = NULL) {
link = ptr;
} //仅初始化指针成员的构造函数
LinkNode(const T&item, LinkNode<T> *ptr = NULL) {
... | ALGO | 0.996938 | 3.262477 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2020-09-14T04:24:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c542bce0... |
9c8a5da0-bd81-4a1f-aff3-672db6b9fd14 | sh-arka22/LEETCODE-Problems | 85-maximal-rectangle/85-maximal-rectangle.cpp | class Solution {
private:
int largestRectangleArea(vector < int > & heights) {
int n = heights.size();
stack < int > st;
int leftsmall[n], rightsmall[n];
for (int i = 0; i < n; i++) {
while (!st.empty() && heights[st.top()] >= heights[i]) {
st.pop();
}
if (st.empty())
... | ALGO | 0.999922 | 5.988064 | {
"github_metadata": {
"branch": "main",
"commit_count": 2955,
"repo_created_at": "2022-07-28T11:22:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1049aec7a... |
ed9acab3-6f42-425d-8a29-3b73d8e25497 | albachteng/engine | include/BoundarySystem.hpp | #pragma once
#include "Component.h"
#include "EntityManager.h"
#include <glm/glm.hpp>
#include <memory>
enum class BoundaryAction {
BOUNCE, // Reflect velocity and clamp position
WRAP, // Teleport to opposite side
CLAMP, // Stop at boundary
DESTROY // Remove entity when it hits boun... | ALGO | 0.951322 | 7.787048 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2025-02-11T21:43:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2218bcb4ed0... |
f56fd1a9-1faa-49dc-9655-140053fec34f | LeeJeongWook/Programming | Online_Judge/Programmers/[Lv.1]/[Lv.1]신규 아이디 추천.cpp | #include <string>
#include <vector>
using namespace std;
string solution(string new_id) {
//1단계
for (int i = 0; i < new_id.size(); i++)
new_id[i] = tolower(new_id[i]);
//2단계
for (int i = 0; i < new_id.size(); i++) {
if (!((97 <= (int)new_id[i]) && ((int)new_id[i] <= 122)) &&
... | ALGO | 0.999797 | 5.181933 | {
"github_metadata": {
"branch": "main",
"commit_count": 350,
"repo_created_at": "2021-04-12T13:48: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": "c308d69566... |
abac1274-25d8-47d7-ab8c-745a13d53c1d | samarthchougule/programming-practice | 41/Q3.cpp | #include<iostream>
using namespace std;
template <class T>
T AddN(T *Arr,int iSize)
{
T Sum = 0;
for(int i = 0;i < iSize;i++)
{
Sum = Sum + Arr[i];
}
return Sum;
}
int main()
{
int iValue = 0;
int *p = NULL;
cout<<"Enter number of int elements you want to enter\n";
cin>>iValue;
p = new int[iValue];
... | ALGO | 0.986061 | 4.459233 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-05-17T12: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": "0e6aaeef1e8c... |
7eb62e54-fa46-4f3a-bf01-e2e033d86399 | Zmhovo/DataStructure | DataStructure/test.cpp | #include <malloc.h>
#define MaxSize 10
#define ElemType int
typedef struct
{
ElemType data[MaxSize];
int length;
}SqList;
typedef struct LNode
{
ElemType data; //数据域
struct LNode* next; //指针域
}LNode, * LinkList;
typedef struct DNode
{
ElemType data; //数据域
struct DNode* prior, * next; ... | ALGO | 0.99855 | 3.652109 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2023-12-03T10:42: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": "381f8e55f... |
bd7e93a1-afc0-4f4a-b454-a492fa59f389 | mlpack/ensmallen | include/ensmallen_bits/fw/constr_lpball.hpp | /**
* @file constr_lpball.hpp
* @author <NAME>
*
* Lp ball constrained for FrankWolfe algorithm. Used as LinearConstrSolverType.
*
* ensmallen is free software; you may redistribute it and/or modify it under
* the terms of the 3-clause BSD license. You should have received a copy of
* the 3-clause BSD license ... | ALGO | 0.998626 | 6.572331 | {
"github_metadata": {
"branch": "master",
"commit_count": 3534,
"repo_created_at": "2018-10-03T01:53:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 790,
"forks": 128,
"issues": 7,
"pull_requests": 5
},
"file_meta": {
"content_id": "d870... |
dd33f3ce-969a-450f-ae91-586ad92469d8 | lsyhahaha/HNuniversity | AlgorithmAnalysis/38_基数排序.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// 获取数字的指定位数上的数字
int getDigit(int num, int place) {
for (int i = 0; i < place - 1; ++i) {
num /= 10;
}
return num % 10;
}
// 获取数字的位数
int getNumDigits(int num) {
int digits = 0;
while (num > 0) {
num /=... | ALGO | 0.999991 | 5.766839 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2023-10-19T03:14: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": "5b4b9b3bc8f... |
11ddf7f6-a4f6-48a3-80e7-48fa3e10a610 | likun123687/ant2d | third_party/alfons/src/alfons/path/splinePath.h | /*
* Based on The New Chronotext Toolkit
* Copyright (C) 2014, <NAME> - All rights reserved.
*
* Adapted to Alfons
* Copyright (C) 2015, <NAME>
*
* The following source-code is distributed under the Simplified BSD License.
*/
/*
* References:
*
* "Spline Curves" BY <NAME>
* http://www.cse.unsw.edu.au/~lamb... | ALGO | 0.981902 | 7.129673 | {
"github_metadata": {
"branch": "master",
"commit_count": 97,
"repo_created_at": "2023-03-07T15:54:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "661bb44a4... |
fe5a6322-14e6-45c0-b6bb-d63570fc9af4 | ishandutta2007/codeforces-i | i_love_tanya_romanova/normal/518/B.cpp | /*
I'm not anti-society, society's anti-me
And I'm not anti-religion, religion is anti-me
And I'm not anti-tradition, tradition is anti-me
And I'm not anti-anything, I just wanna be free
Fascist state, no freedom
Unless you control yourself
Use self expression, lose your freedom
You're undesirable, you go straight to ... | ALGO | 0.999975 | 3.700763 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:39: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": "2651d306f3f7... |
68333eee-17c0-4a3e-93d5-fc6022f40f80 | daroxs95/fritters-Frontend | 3rdParty/imgui/addons/imguinodegrapheditor/imguinodegrapheditor.cpp | //- Common Code For All Addons needed just to ease inclusion as separate files in user code ----------------------
#ifdef _WIN32
#include <windows.h>
#endif
#include <imgui.h>
#undef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#include <imgui_internal.h>
//-------------------------------------------... | TOOL | 0.963218 | 4.069635 | {
"github_metadata": {
"branch": "main",
"commit_count": 65,
"repo_created_at": "2021-04-02T03: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": "19c43bbcb69... |
9ed2c103-9cfd-420e-8818-1ffff44547dc | Ilic02/AISP | Rokovi/feb_2022a/lagana_setnja_do_vrha_planine.cpp | #include <iostream>
#include <vector>
using namespace std;
const int MOD = 1e9 + 7;
int main(int argc, char const *argv[])
{
int m, n, d;
cin >> m >> n >> d;
vector<vector<int>> planina(m, vector<int>(n,0));
for(int i = 0; i<m; i++)
for(int j = 0; j<n; j++)
cin >> planina[i][j];
... | ALGO | 0.999964 | 4.768302 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2023-11-06T19:33: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": "d1da7408e... |
51a169a6-710e-4b7c-bde5-079399adc229 | lunathanael/aoc-2023 | past/aoc21.cpp | #pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <iostream>
#include <string>
#include <algorithm>
#include <cctype>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <numeric>
#include <queue>
#include <sstream>
... | ALGO | 0.999892 | 3.706539 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-25T18:32:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "343fe1563577... |
a37f95be-b066-4d47-a818-bd7cc39896a3 | frooms/stira | stira/steerable/orientationestimation/ComputeOrientation.h |
/***********************************************************************************
* Copyright (C) 2008 by <NAME> *
* *
* Terms and conditions for using this software in any form are prov... | ALGO | 0.999645 | 6.894671 | {
"github_metadata": {
"branch": "master",
"commit_count": 292,
"repo_created_at": "2015-04-27T19:28:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b17e026... |
54010ca6-6689-4667-87ce-503788fdcf71 | ZH1995/Algorithm | problems/leetcode/cn/27.移除元素.cpp | #include <iostream>
#include <vector>
using namespace std;
/*
功能:原地删除数组中的指定元素,返回数组中非指定元素的个数
难点:
1.若数组本身就是空的话,k应该返回0;
2.右指针往左遍历的时候,注意不要越界(例如: nums = {3,3}, val=3)
思路:利用双指针的思想,从两边向中间遍历。
若当前元素非指定元素,则计数器自增、左指针向右遍历;
若当前元素是指定元素,则右指针向左遍历到第一个非指定元素的位置(注意下表不能越界),然后交换两个元素。
最后需要特判left=right情况下,是否和指定元素相等。
... | ALGO | 0.999856 | 5.365263 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2023-12-30T01:10: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": "ec49df57c9e... |
20e4f844-1aa5-4fd5-a554-11e92bb78a94 | DevSaurabhGirme/DS_Algo | 876_MiddleOf_LinkedList.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
// again works perfectly
class Solution {
public:... | ALGO | 0.9994 | 5.937582 | {
"github_metadata": {
"branch": "master",
"commit_count": 599,
"repo_created_at": "2024-03-09T10:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae8fe732... |
34f857fd-82bc-47d8-96fa-d5c6e4653242 | plumdog/project_euler | problem023/cpp/problem23.cpp | #include <iostream>
#include <unordered_set>
typedef std::unordered_set<int> IntSet;
bool isSumOfTwoAbundants(int n, IntSet &abundants) {
for (int f : abundants) {
if(abundants.count(n - f)) {
return true;
}
}
return false;
}
bool isAbundant(int n) {
int sum = 0;
fo... | ALGO | 0.999823 | 5.199644 | {
"github_metadata": {
"branch": "master",
"commit_count": 205,
"repo_created_at": "2014-06-04T19:08:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c842df0... |
23f69fcc-ec82-4f32-b3a6-734f697f83ae | elemental/Elemental | src/blas_like/level3/TwoSidedTrsm/UVar4.hpp | /*
Copyright (c) 2009-2016, <NAME>
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
*/
#ifndef EL_TWOSIDEDTRSM_UVAR4_HPP
#define EL_TWOSIDEDTRSM_UVA... | ALGO | 0.998528 | 5.791108 | {
"github_metadata": {
"branch": "master",
"commit_count": 3773,
"repo_created_at": "2012-05-06T08:37:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 513,
"forks": 110,
"issues": 38,
"pull_requests": 7
},
"file_meta": {
"content_id": "4e1... |
73fd5b40-857d-4fee-adfd-4de23a9d53f1 | autocore-ai/AutowareAuto | src/common/optimization/test/test_more_thuente_line_search.cpp | // Copyright 2019-2020 the Autoware Foundation
//
// 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... | TEST | 0.911958 | 7.083001 | {
"github_metadata": {
"branch": "master",
"commit_count": 1458,
"repo_created_at": "2021-05-27T23:50:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 45,
"forks": 26,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cb1d2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.