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 |
|---|---|---|---|---|---|---|---|
36d346f9-4179-42fb-bdc3-3acf77249ba3 | devineverage/Linux-Utilities | cal.cpp | #include<iostream>
#include<string.h>
#include<iomanip>
using namespace std;
int month;
int year;
int firstday;
int firstDayOfMonth;
int count = 1;
void firstDay(){
//This part determines which day will be the first day of that year (0 for Sunday, 1 for Monday, etc.)
int day=1;
int y = year - (14-month)/12;
int m ... | TOOL | 0.946038 | 3.582396 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-07-06T14:46: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": "055c3b6c3e... |
18e83e58-61e6-42cb-95d1-bd0da5c74694 | Arzana/Plutonium | code/include/Core/Math/Spline.h | #pragma once
#include <Core/Math/Quaternion.h>
#include <Core/Math/Interpolation.h>
namespace Pu
{
/* Defines a location/orientation pair used by the spline. */
struct SplineTransform
{
/* The interpolated location on the spline. */
Vector3 Location;
/* The interpolated orientation on the spline. */
Quatern... | ALGO | 0.996396 | 7.630127 | {
"github_metadata": {
"branch": "master",
"commit_count": 632,
"repo_created_at": "2018-01-27T20:46:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "f0dfc67f... |
6ce0037c-978d-4b35-962a-8c6c8362a5a8 | huihut/CloudCompare-Qt | CloudCompare/plugins/ccPluginInfo.h | //##########################################################################
//# #
//# CLOUDCOMPARE #
//# #
//# This pr... | TOOL | 0.930368 | 6.100358 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-08-08T16:41:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 40,
"forks": 28,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5569f54e... |
7c4b6adb-6c02-4bd8-b443-cbc17bfa3c8c | ishandutta2007/codeforces-v | vercingetorix/normal/1267/H.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <queue>
#include <cstring>
#include <set>
#include <bitset>
#include <map>
#include <chrono>
#include <random>
#include <unordered_map>
#include <stdio.h>
using namespace std;
typedef long long ll;
typedef long do... | ALGO | 0.999945 | 3.569463 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:31: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": "2469b6359dd9... |
60dbf5f7-de5b-4b39-9490-b17d9acfbdd8 | nik1996/Online-judge-codes | spoj/bitmap.cpp | //Problem Link : http://www.spoj.com/problems/BITMAP/
*************************************************************************************************************************************
#include <iostream>
#include <cstdio>
#include <queue>
#include <vector>
#include <climits>
#include <utility>
using namespace st... | ALGO | 0.999919 | 3.253767 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2016-10-14T17:34: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": "c70a65ba... |
09cc7907-9ec7-4a4f-9ae9-07b146c70cda | ishandutta2007/codeforces-j | joeywheeler/normal/657/E.cpp | #include <bits/stdc++.h>
#define FO(i,a,b) for (int i = (a); i < (b); i++)
#define sz(v) int(v.size())
using namespace std;
struct bcc {
vector<vector<int>> u;
vector<int> bc, lo, ind;
int T, m, n;
void init(int n_) {
n = n_; m = 0; T = 0;
u.clear(); u.resize(n);
bc.assign(n,... | ALGO | 0.999769 | 3.924134 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:42: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": "7429f87f9ba3... |
d83fbee8-db9a-45b9-be32-8cd83efc2b4d | zhouchangsi/leetcode_cpp | solutions/leetcode/leetcode1091.cpp | #include "common_headers.h"
using namespace std;
class Solution {
public:
int shortestPathBinaryMatrix(vector<vector<int>>& grid) {
int n = grid.size();
if (n == 0)
return -1;
if (grid[0][0] == 1)
return -1;
if (n == 1)
return 1;
vector<vector<int>> visited(n, vector<int>(n, 0... | ALGO | 0.999974 | 5.842196 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2023-09-01T06: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": "db9785554b0... |
f3648b33-1164-43a3-b725-d1c7e9e779bf | hoaghiepp/SPOJ_PTIT | P191PROC.cpp | #include <bits/stdc++.h>
using namespace std;
void chuan_hoa(string &a) {
if (a[0] <= 'z' && a[0] >= 'a') {
a[0] -= 32;
}
for (int i = 1; i < a.size(); i++) {
if (a[i] <= 'Z' && a[i] >= 'A') {
a[i] += 32;
}
}
}
void process() {
string a;
getline(cin, a);
... | ALGO | 0.999573 | 3.586478 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-01-10T10:35: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": "296e8c108805... |
3d2b0b7a-e85b-4c93-b00e-e1f9c7869f65 | adoggie/Algorithm_Package | RBFNet/KMeans_Algorithm.cpp | // KMeans_Algorithm.cpp: implementation of the CKMeans_Algorithm class.
//
//////////////////////////////////////////////////////////////////////
//#include "stdafx.h"
#include "KMeans_Algorithm.h"
#include <assert.h>
/*
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
*/
... | ALGO | 0.999743 | 5.320812 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-04-08T07:35:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c3d8a754f7... |
2999ce6e-bdfa-4469-83f8-ee6b0794c46f | cms2l2v/2l2v_fwk | interface/muresolution_run2.h | #ifndef ElectroWeakAnalysis_MuResolution
#define ElectroWeakAnalysis_MuResolution
#include "TRandom3.h"
#include "TMath.h"
struct CrystalBall{
const double pi = TMath::Pi();
const double SPiO2 = sqrt(TMath::Pi()/2.0);
const double S2 = sqrt(2.0);
double m;
double s;
double a;
dou... | ALGO | 0.9979 | 5.671262 | {
"github_metadata": {
"branch": "master",
"commit_count": 2444,
"repo_created_at": "2013-06-05T21:07:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 30,
"issues": 3,
"pull_requests": 5
},
"file_meta": {
"content_id": "27e7d4b... |
ad4a9041-a5d0-42d6-af6e-a644b01d924f | CzJaewan/rl_local_planner | navigation/src/lookahead_point3.cpp | #include <iostream>
#include <map>
#include <math.h>
#include "ros/ros.h"
#include <geometry_msgs/PoseWithCovarianceStamped.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/Twist.h>
#include <tf/transform_listener.h>
#include <tf/transform_datatypes.h>
#include <nav_msgs/Path.h>
#include <nav_msgs/Odom... | TOOL | 0.998176 | 3.40479 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2021-05-20T08:03:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 47,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0ada42... |
764f6a55-3a0d-4771-bdf3-887c60fbed09 | skygupta07/DSA | 21_linkedList3/4_rotateLLbyKsteps.cpp | // rotateLinkedListByKSteps.cpp
//LC61
// rotate by k steps ka matlab last ke element ko pakdo then usey aage laga do..
/*
Given the head of a linked list, rotate the list to the right by k places.
Example 1:
Input: head = [1,2,3,4,5], k = 2
Output: [4,5,1,2,3]
Example 2:
Input: head = [0,1,2], k = 4
Output:... | ALGO | 0.999958 | 5.879856 | {
"github_metadata": {
"branch": "main",
"commit_count": 141,
"repo_created_at": "2024-12-22T10:16:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8492fafb94... |
67def483-9352-4455-a82e-59ee917e54f3 | eggag32/Competitive-Programming | CSES/Range Sum Queries II.cpp | #pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define debug(x) cerr << #x << ": " << x << endl;
#define debug2(x, y) debug(x) debug(y);
#define repn(i, a, b) for(int i... | ALGO | 0.99973 | 4.928023 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2020-09-24T22:38: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": "75fa0d619... |
b1ea0d44-c0e1-49ee-bad7-da5ad97ef6bb | karygauss03/Leetcode-Solutions | 1942-the-number-of-the-smallest-unoccupied-chair/1942-the-number-of-the-smallest-unoccupied-chair.cpp | class Solution {
public:
int smallestChair(vector<vector<int>>& times, int targetFriend) {
int n = times.size();
vector<tuple<int, int, int>> events;
for (int i = 0; i < n; ++i) {
events.push_back({times[i][0], 1, i});
events.push_back({times[i][1], -1, i});... | ALGO | 0.999979 | 5.863031 | {
"github_metadata": {
"branch": "main",
"commit_count": 3023,
"repo_created_at": "2022-05-07T10:16:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e85d9b35... |
dcc75745-4aa5-42d4-93e1-bcd04abc35fb | funcdfs/Algorithm | 2025/1692C.cpp | // link: https://codeforces.com/contest/1692/problem/C -> C. Where's the Bishop?
// time: 2025/3/11 15:51:25 https://github.com/funcdfs
#pragma region headers_and_definitions // clang-format off
#include <bits/stdc++.h>
using namespace std; /* golang types */
/* int int8 int16 int32 int64 */ using int8 = signed... | ALGO | 0.999943 | 5.297075 | {
"github_metadata": {
"branch": "main",
"commit_count": 398,
"repo_created_at": "2021-05-25T12:32:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 26,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e67d00096... |
c51cd261-7e83-493b-88d6-356eb845bc2d | ishandutta2007/codeforces-l | lzr010506/normal/618/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define N 300005
#define lson (pos << 1)
#define rson (pos << 1 | 1)
int n, m, tag[N * 4];
double pi = acos(-1);
struct point
{
double x, y;
point(double _x = 0, double _y = 0) : x(_x), y(_y) {}
point operator +(point &p) { return point(x + p.x, y + p.y); }
friend os... | ALGO | 0.999893 | 3.89494 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2899d70cfe8c... |
2fb4da9f-dd44-47a4-9fab-06bb5776cd4f | ishandutta2007/codeforces-v | vosptu/normal/982/D.cpp | #include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define N 110000
int a[N], to[N], ss[N], sum[N], fa[N];
int all, ansx, ansk, n;
bool cmp(int x, int y) {
return a[x] < a[y];
}
int gf(int x) {
if (fa[x] != x)
return gf(fa[x]);
return fa[x];
}
void merge(int x, int y) {
x = gf(x);
... | ALGO | 0.999938 | 3.559531 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:31: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": "4f7c7db81417... |
a239c665-6f6b-48e1-86ec-e8ec669aadff | alimorgaan/data-structures-algorithms | 11-Sorting/BubbleSort.cpp | #include <iostream>
#include <vector>
using namespace std;
void bubbleSort(vector<int> &myVector)
{
for (int i = 0; i < myVector.size() - 1; i++)
{
int flag = 1;
for (int j = 0; j < myVector.size() - 1 - i; j++)
{
if (myVector[j] > myVector[j + 1])
{
... | ALGO | 0.999097 | 5.138756 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-09-03T00:44:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2d8d113d07... |
8ea19335-69f8-4f4a-a8b9-99009ff03f27 | eduherminio/Google_Code_Jam_2017 | Qualification_round/B_Tidy_Numbers/2_small.cpp | /*
* Author: <NAME>
*
*/
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
bool order_function (unsigned long long i,unsigned long long j) { return (i>j); }
int main()
{
int n_inputs;
std::cin >> n_inputs;
unsigned long long input;
unsigned long long output=0;
for (int ... | ALGO | 0.999915 | 5.314212 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-04-09T14:14:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b6d5ce7b9... |
46cc3397-0fd9-4adc-b8f4-0329e01404f0 | ishandutta2007/codeforces-s | sonechko/normal/721/B.cpp | #include<bits/stdc++.h>
using namespace std;
const long long MOD = 1000000000000000;
const int N = 100+10;
const int M = 10;
const string st2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string s1 = "abcdefghijklmnopqrstuvwxyz";
#define mod % MOD
#define filesio(x) freopen(x ".in", "r", stdin); freopen(x ".out", "w", stdout... | ALGO | 0.999959 | 3.478416 | {
"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": "72e2bede8e65... |
13972c0b-8823-4fee-9c7e-3a6c0dae194d | nmwsharp/geometry-central | src/pointcloud/sample_cloud.cpp | #include "geometrycentral/pointcloud/sample_cloud.h"
#include <random>
namespace geometrycentral {
using surface::Face;
using surface::SurfacePoint;
namespace pointcloud {
std::tuple<std::unique_ptr<PointCloud>, PointData<Vector3>, PointData<SurfacePoint>>
uniformlySamplePointsOnSurface(surface::SurfaceMesh& mesh... | ALGO | 0.919384 | 7.115207 | {
"github_metadata": {
"branch": "master",
"commit_count": 536,
"repo_created_at": "2017-11-20T15:40:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1217,
"forks": 166,
"issues": 77,
"pull_requests": 16
},
"file_meta": {
"content_id": "4... |
ee197bec-5b82-435d-8af9-0e4a8ac4b923 | alialjndy/problem-solving- | taxi.cpp | #include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include<vector>
using namespace std ;
int main(){
int size , k1 = 0, k2 =0 , k3 , k4 , one = 0 , two = 0 , three = 0 , four = 0, total = 0 ;
cin >> size;
int array[size];
for(int i = 0 ; i<size; i++){
cin>>array[i];
if(array[i] == 1) {one++ ... | ALGO | 0.999879 | 3.392309 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-01-30T00:07: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": "8a68a457713e... |
6b086333-614e-4410-a319-2fc83ac175b5 | harshil-eth/Leetcode- | Buy Maximum Stocks if i stocks can be bought on i-th day - GFG/buy-maximum-stocks-if-i-stocks-can-be-bought-on-ith-day.cpp | //{ Driver Code Starts
/* Driver program to test above function */
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int buyMaximumProducts(int n, int k, int price[]){
//Write your code here
vector<pair<int, int>> arr;
for(int i=0; i<n; i++) {
... | ALGO | 0.999948 | 5.631063 | {
"github_metadata": {
"branch": "main",
"commit_count": 741,
"repo_created_at": "2023-05-29T11:41:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9cfe4fab96... |
4d743123-3106-4471-974f-cc37f94de899 | ishandutta2007/codeforces-n | noimi/normal/1071/A.cpp | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep3(i,a,b) for(ll i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#defin... | ALGO | 0.998949 | 3.121253 | {
"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": "fc8946ccdd4f... |
7628f5cd-1e55-484a-94bd-3dcd0af04a54 | TusharCSE35/Online-Programming | Codeforces/Smallest_kpm.cpp | /*********************************************************************************\
* _________ _ _ ________ _ _ __ ________ *
* |___ ___|| | | || ______|| | | | / \ | ____ | *
* | | | | | || |______ | |_____| | / /\ \ | |____| |... | ALGO | 0.999995 | 3.500007 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2021-06-15T14: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": "a4e45ab01f6... |
ad5ae5e9-7fcd-43b1-a2b8-ee1d954ef076 | jureslak/codebook | implementacija/algo/maximum_subarray.cpp | #include "maximum_subarray.h"
int maximum_subarray(const vector<int>& a) { // glej komentarje ce ne dovolimo prazne vsote
int max_ending_here = 0, max_so_far = 0; // A[0]
for (int x : a) { // a[1:]
max_ending_here = max(0, max_ending_here + x);
max_so_far = max(max_so_far, max_ending_here);
... | ALGO | 0.99819 | 4.885064 | {
"github_metadata": {
"branch": "master",
"commit_count": 103,
"repo_created_at": "2014-11-08T17:36:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e16528e2... |
4147d815-8abb-4ea1-8318-aef08ebab29b | csalcedo001/eda_clustering | include/eda_disjoint_set/impl/base_disjoint_set.ipp | #ifndef DISJOINT_SET_BASE_DISJOINT_SET_IPP_
#define DISJOINT_SET_BASE_DISJOINT_SET_IPP_
#include "base_disjoint_set.hpp"
#include "base_node.hpp"
namespace eda {
namespace disjoint_set {
template <typename T, class Compare, class Node>
void BaseDisjointSet<T, Compare, Node>::insert(T value) {
if (this->node(value... | ALGO | 0.976265 | 6.639254 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-10-17T20:21:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba371e39b... |
4fa58448-9679-448d-858b-ecd9a3602a0c | thegamer1907/Code_Analysis | Codes/AC/3431.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_map>
#include <deque>
#include <cmath>
#include <math.h>
#include <string>
#include <time.h>
#include <random>
#include <memory.h>
#include <bitset>
using namespace std;
#def... | ALGO | 0.999741 | 3.087365 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2019-05-24T10:35:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d738bd2e... |
4431eafb-0870-4164-b9d3-ff12fb3a63d4 | jay2013/leet | remove-linked-list-elements.cpp | /* ******************************************************************
* title: Remove Linked List Elements
* url: https://leetcode.com/problems/remove-linked-list-elements/
* date: Fri Oct 28 11:30:20 CST 2016
* description: 删除链表中给定元素,返回删除结束的链表。
* general idea: 扫一遍,发现给定元素,删除即可。
* tags: link-list
****************... | ALGO | 0.999956 | 4.514997 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2016-10-18T15:29: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": "c8eb933d9... |
3cb1a94a-65f5-4c24-86e5-38db66f55528 | poneciak57/OI-prep-2023-2024 | archive2-17.02.2k24/DPS/main.cpp | #include <bits/stdc++.h>
#define INF 1000000007
typedef long long ll;
typedef std::string str;
typedef std::pair<ll, ll> llPair;
template <typename T>
using vec = std::vector<T>;
const ll MOD = 1000992299;
const ll pows_count = 1e6 + 7;
ll ten_pows[pows_count];
const ll factorials_count = 3e4 + 7;
ll factorials[fa... | ALGO | 0.99998 | 4.359131 | {
"github_metadata": {
"branch": "main",
"commit_count": 112,
"repo_created_at": "2023-09-20T14:57:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7952b808b2... |
3bf029a7-5906-44eb-ab05-9aa468c0793d | PointCloudLibrary/pcl | keypoints/include/pcl/keypoints/harris_6d.h | /*
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, <NAME>, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must reta... | ALGO | 0.995825 | 6.632279 | {
"github_metadata": {
"branch": "master",
"commit_count": 14566,
"repo_created_at": "2013-02-12T16:40:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10495,
"forks": 4656,
"issues": 432,
"pull_requests": 147
},
"file_meta": {
"content_id... |
2ee474a4-5b3a-41fd-8500-eafeda250c3b | bryancalisto/competitive_prog | hackerrank/max_array_sum/main.cpp | // https://www.hackerrank.com/challenges/max-array-sum/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=dynamic-programming
#include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
// Complete the maxSubsetSum function below.
int maxSubsetSum(vector<... | ALGO | 0.999925 | 4.833265 | {
"github_metadata": {
"branch": "main",
"commit_count": 130,
"repo_created_at": "2021-04-30T17:04: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": "9f974b8a16... |
c077ba5c-0761-4545-9a2c-18fc2df2e55e | pavanbaloju/data-structures-and-algorithms | binarysearch/basic/01_binarySearch.cpp | #include <iostream>
#include <vector>
using namespace std;
// Problem Statement:
// Given a sorted (in ascending order) integer array 'nums' of 'n' elements and a 'target' value,
// return the index of 'target' in 'nums' if it exists, otherwise return -1.
// Intuition:
// Since the array is sorted, binary search is ... | ALGO | 1 | 6.843181 | {
"github_metadata": {
"branch": "main",
"commit_count": 362,
"repo_created_at": "2023-09-04T16:28: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": "f03897aee8... |
46c89cde-cc8d-43e5-875f-6f2742447aba | DevOpsAraj/Striver-SDESheet-Challenge2023 | 132_SymmetricTree.cpp | // Code Studio - Symmetric Tree
#include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node *left, *right;
Node(int val)
{
data = val;
left = right = NULL;
}
};
class SymmetricTree
{
public:
int ans = true;
void solve(Node *root1, Node *root2)
{
... | ALGO | 0.999995 | 5.677461 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-07-01T07:45:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "44c86e8402d... |
c30eb733-99a1-4709-b3ac-e5f2d7ef1cf7 | sola2233/leetcode | Nowcoder/HW/HJ69.cpp | /**
* https://www.nowcoder.com/practice/ebe941260f8c4210aa8c17e99cbc663b?tpId=37&tqId=21292&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fdifficulty%3D3%26page%3D1%26pageSize%3D50%26search%3D%26tpId%3D37%26type%3D37&difficulty=3&judgeStatus=undefined&tags=&title=
* 矩阵乘法
*/
#include <iostream>
#i... | ALGO | 0.999342 | 3.914487 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2021-08-17T07:02: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": "45e2cf2d7... |
98c214e0-6ab6-4b0a-9a5d-72fa6cb9c166 | jpetreski19/Data-Structures | bstree.cpp | #include <iostream>
using namespace std;
class node {
public:
int value;
node* left_child;
node* right_child;
node (int value) {
this->value = value;
left_child = NULL;
right_child = NULL;
}
void insert(int x) {
if (x <= this->value) {
if (this->left_child == NULL) {
this... | ALGO | 0.999984 | 4.878043 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-12-24T00:18: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": "e58d38fecb... |
5172a66e-4ae7-4286-b5cd-abccb5181895 | Caikunzhen/robot_utils | include/robot_utils/controller/lqr.hpp | /**
*******************************************************************************
* @file lqr.hpp
* @brief Linear Quadratic Regulator (LQR) controller
*
* @section history
*
* @version V1.0.0
* @date 2025-05-10
* @author Caikunzhen
* @details
* 1. Complete the lqr.hpp
*************************************... | ALGO | 0.965167 | 7.161128 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2025-04-08T06:57: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": "313cdd4f7... |
174f3674-39bd-4559-a0d1-ed6c9a54942b | Neer393/Strivers-SDE-Challenge | Merge-Two-Sorted-Linked-Lists.cpp | #include <bits/stdc++.h>
/************************************************************
Following is the linked list node structure.
template <typename T>
class Node {
public:
T data;
Node* next;
Node(T data) {
next = NULL;
this->data = data;
... | ALGO | 0.999999 | 5.521649 | {
"github_metadata": {
"branch": "main",
"commit_count": 185,
"repo_created_at": "2023-06-08T07:38:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac6d40dba9... |
06028bcc-464a-4677-8cbc-e80ff29b30ef | hareta0109/atcoder | submissions/abc/abc054/d.cpp | #include <bits/stdc++.h>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<... | ALGO | 0.999854 | 3.929609 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2022-08-24T11:29: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": "9fe81fc2d47... |
2b17184e-98bb-4b47-8c36-5b4d23979730 | marlonwc3/cp-codes | LA/LA4513==Stammering Aliens.cpp | #include <bits/stdc++.h>
#define _ printf("\n");
#define sc1(a) scanf("%d", &a)
#define sc2(a,b) scanf("%d %d", &a, &b)
#define sc3(a,b,c) scanf("%d %d %d", &a, &b, &c)
#define sc4(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d)
#define iz(b) if(b==0) { break; }
#define pb(a) push_back(a)
#define inf 0x3f3f3f3f
#define l... | ALGO | 0.999938 | 3.490916 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2015-01-02T17:57:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "82f343bd9... |
1ec9f690-ed05-4dab-87c1-9d2843cea14a | Robocatt/acmp | Main/333.cpp | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
using namespace std;
int gcd(int a, int b){
return (b == 0 ? a : gcd(b, a % b));
}
int main() {
string s1, s2, s3;
set<char> se1;
set<char> se2;
set<char> se3;
vector<char> arr;
cin >> s1 >> s2 >> s3;
f... | ALGO | 0.999926 | 4.028558 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-07-05T07:40: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": "a0c438ddee87... |
54ac772d-eaa7-43cc-829d-0124a645ee59 | Skyaducc/DTQG-2021-2022 | CODE/B.LONGRUN/A.cpp | // có n học sinh chạy vòng quanh sân có chu vi C , chạy L vòng
// tính số lần mà một bạn vượt qua bạn khác trong quá trình chạy
// +) học sinh i vượt học sinh j khi vận tốc của i > j
// +) thời gian chạy là C * L / vận tốc học sinh lớn nhất = T
// +) nếu bạn i chạy x vòng và bạn j chạy y vòng thì số lần bạn i vượt qua ... | ALGO | 0.999978 | 4.017255 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-11-24T07:26: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": "5dee60044ca6... |
0e4d0a17-475f-46dd-ad85-ac85e41f46e1 | mrunaltarwatkar018/Placement_Data_Structures_N_Algorithms | Arrays/2D Arrays/Spiral_Matrix.cpp | /* Leetcode Problem No.: 54. Spiral Matrix */
/*
Company Tags : Paytm, Zoho, <NAME>, Accolite, Amazon, Microsoft, Snapdeal,
D-E-Shaw, MakeMyTrip, Oracle, MAQ Software, nearbuy, Nagarro, BrowserStack
Frequency : 80%
Leetcode Qn Link ... | ALGO | 0.999993 | 6.757825 | {
"github_metadata": {
"branch": "master",
"commit_count": 716,
"repo_created_at": "2024-06-24T13:15:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1eda28ef... |
38d1b48f-04c8-4869-a1fa-b9c0909835ae | lovinix/BOJ_cpp | 16975.cpp | #pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using lli = long long;
int N, M;
lli tree[4 * 100'001], lazy[4 * 100'001];
void u(int l, int r, int v, int n = 1, int s = 1, int e = N);
int q(int i, int n = 1, int s = 1, int e = N);
void p(int n, int s, int e);
i... | ALGO | 0.999928 | 5.519896 | {
"github_metadata": {
"branch": "master",
"commit_count": 403,
"repo_created_at": "2020-05-25T06:03: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": "46114c93... |
cc807a45-1cc1-41a7-a646-d53684cdc040 | xdtianyu/android-4.3 | packages/inputmethods/LatinIME/native/jni/src/words_priority_queue.h | /*
* Copyright (C) 2011 The Android Open Source Project
*
* 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 app... | TOOL | 0.990101 | 6.943785 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2013-07-29T07:46:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 9,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "1c0a66ed0... |
18df7410-994c-4fed-b4d5-ec453a15194e | NilFoundation/crypto3 | libs/pubkey/include/nil/crypto3/pubkey/accumulators/aggregate_verify.hpp | //---------------------------------------------------------------------------//
// Copyright (c) 2021 <NAME> <<EMAIL>>
// Copyright (c) 2021 <NAME> <<EMAIL>>
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "... | TOOL | 0.929 | 7.355692 | {
"github_metadata": {
"branch": "master",
"commit_count": 10456,
"repo_created_at": "2019-04-13T23:20:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 84,
"forks": 13,
"issues": 44,
"pull_requests": 9
},
"file_meta": {
"content_id": "511f... |
af3dd5d5-5472-4710-b2b6-d34e078043b6 | yash0530/Competitive-Programming | 02 CONTESTS/Misc/Mashup (Div-2 Difficulty)#2/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define INF (int) 9e18
#define HELL (int) (1e9 + 7)
#define int long long
#define double long double
#define uint unsigned long long
#define deb(x) cerr << #x << " => " << x << "\n"
#define deba(x) cerr << #x << "\n"; for (auto a : x) cerr << a << " "; ce... | ALGO | 0.999997 | 4.027138 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2019-12-15T06:50:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "60a5b08b... |
2f3b0e26-06ea-4eb5-87c2-72f63122c78a | naryeo628/algorism | 8장 과제 미완/4번/4번.cpp | #include <stdio.h>
#include <stdlib.h>
#define MAX_ELEMENT 200
#define K_NARY 3
typedef struct {
int key;
}element;
typedef struct {
element heap[MAX_ELEMENT];
int heap_size;
}HeapType;
void init(HeapType *h)
{
h->heap_size = 0;
}
//left_child of i=i*k-(k-2)
//parent index of l=(l+k-2)/k
void insert_max_heap(He... | ALGO | 0.999909 | 3.761079 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-10-06T14:49: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": "46b03d52d0... |
38228066-e42a-4276-ad6d-22e3dc9d9bdf | ckeisc43rd-bclai/neoj | 62.cpp | #include<bits/stdc++.h>
using namespace std;
int arr[15][15];
bool ok=0;
void print(){
for(int i=0;i<9;i++)
for(int j=0;j<9;j++) cout<<arr[i][j];
cout<<'\n';
}
int find_next(int r,int c){
for(int i=r;i<9;i++)
for(int j=0;j<9;j++)
if(arr[i][j]==0) return i*9+j;
return -1;
}
ve... | ALGO | 0.999927 | 5.674675 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-03-08T03:07: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": "873550e3b454... |
2482392e-03f0-455e-b2a3-aea3e81b105b | zhiyuhuo/hotpot_slam | include/hotpot_slam/bkp/track_camera-20170301.h | #ifndef TRACKER_H_
#define TRACKER_H_
// this file will define a class to compute the relative changes between two neighbo frames
// the tracker will be a static instance which works as a member of the
#include <iostream>
#include <queue>
#include <opencv2/opencv.hpp>
#include <pcl/point_types.h>
#include "rgbd_fram... | ALGO | 0.995377 | 5.19504 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-03-01T20:30:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "afa4a341ce... |
40b040a5-1fbb-41d7-88c2-f90d841efde4 | LitaoYao/Leetcode | 2312.cpp | // https://leetcode.cn/problems/selling-pieces-of-wood/
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
long long sellingWood(int m, int n, vector<vector<int>>& prices) {
vector<vector<long long>> grid(m + 1, vector<long long>(n + 1, 0));
for (vector<int>& price : prices)
{
... | ALGO | 0.999949 | 5.063007 | {
"github_metadata": {
"branch": "main",
"commit_count": 86,
"repo_created_at": "2021-04-30T13:16:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "950aaa49146... |
a04a8b20-9bf2-45ed-860a-fd3bf0443b87 | qkrdmstn/coding-test | 백준/Gold/7569. 토마토/토마토.cc | #include <iostream>
#include <queue>
#include <tuple>
#include <algorithm>
using namespace std;
int m, n, h;
queue<tuple<int, int, int>> q;
int dx[6] = { -1,1,0,0,0,0 };
int dy[6] = { 0,0,-1,1,0,0 };
int dz[6] = { 0,0,0,0,-1,1 };
int map[101][101][101];
int dist[101][101][101];
int main(void)
{
ios::sync_with_stdio... | ALGO | 0.999891 | 3.592024 | {
"github_metadata": {
"branch": "main",
"commit_count": 458,
"repo_created_at": "2023-05-03T08:09: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": "0d4fbd1c38... |
962ceec7-27e2-4b74-8ac2-a33ee4cc2851 | mrkriv/Laboratory | Denis/lab9-15/lab9-15/Source.cpp | #include <iostream>
#include <conio.h>
using namespace std;
bool isSymbol(char c);
bool isPalindrom(char* text, int start, int len);
void main()
{
char text[256];
while (true)
{
cout << "Enter text: ";
cin.getline(text, sizeof(text) / sizeof(char));
int offest = -1;
int start, len = 0;
int count = 0;
... | ALGO | 0.998318 | 3.680884 | {
"github_metadata": {
"branch": "master",
"commit_count": 133,
"repo_created_at": "2016-03-16T19:59:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "df67e8c1... |
28f8aa6a-d725-4501-83e7-1c7d9e45253d | duuucccan23/ahmidas | src/L2/Contract/Disconnected/Disconnected_compute_loop_twist2_operator_a.cpp | #include "Disconnected.ih"
//Compute the disconnected loop of the operator O_{mumu} and O_{mumu}\gamma5
// O_00 and g5 O_00 cross checked independtly using an independent code
// still to cross check the spatial derivative
//this function is used to perfom contraction on a Core::StochasticPropagator< 1 >
// not t... | ALGO | 0.990731 | 5.521959 | {
"github_metadata": {
"branch": "master",
"commit_count": 490,
"repo_created_at": "2015-12-30T14:16:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a829243... |
4ca3642f-345f-4c15-9b0a-7d6f4ce43797 | chiragmishra03/LeetCode-DSA | Solve the Sudoku - GFG/solve-the-sudoku.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// UNASSIGNED is used for empty cells in sudoku grid
#define UNASSIGNED 0
// N is used for the size of Sudoku grid.
// Size will be NxN
#define N 9
// } Driver Code Ends
class Solution
{
public:
//Function to find a solved Sudoku.... | ALGO | 0.999833 | 7.009351 | {
"github_metadata": {
"branch": "main",
"commit_count": 806,
"repo_created_at": "2023-05-21T18:50: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": "f316839450... |
53f745b4-642f-4847-ae24-0ebf1ecce080 | kventinel/BSU | 4_sem/Algorithms/SimpleTask/0.3.cpp | #include <iostream>
#include <cstdio>
#include <vector>
struct matrix {
int n;
int m;
};
int rek(int i, int j, const std::vector<matrix> &matrices,
std::vector<std::vector<int>> *answers) {
if ((*answers)[i][j] == -1) {
int minimal_answer = 1000000000;
for (int k = i; k < j; ++k) {
min... | ALGO | 0.999949 | 3.860143 | {
"github_metadata": {
"branch": "master",
"commit_count": 182,
"repo_created_at": "2017-03-21T11:31:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7faf239... |
a0d36a61-110b-4c70-a324-fe775366586b | keijak/comp-pub | atcoder/abc127/F/review1.cpp | #include <bits/stdc++.h>
#define REP_(i, a_, b_, a, b, ...) \
for (int i = (a), END_##i = (b); i < END_##i; ++i)
#define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define ALL(x) std::begin(x), std::end(x)
using i64 = long long;
template<typename T, typename U>
inline bool chmax(T &a, U b) {
ret... | ALGO | 0.999695 | 4.288437 | {
"github_metadata": {
"branch": "master",
"commit_count": 2362,
"repo_created_at": "2020-04-12T08:07: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": "bac7c8e... |
b08b6881-a3f5-4517-b7a7-61bc3a7b8a6d | wassimalharaki/Codeforces | 900/BurenkaPlayswithFractions.cpp | #include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define int long long
#define all(v) v.begin(), v.end()
#define nl << '\n'
#define v vector
#define vi vector<int>
#define pii pair<int, int>
#define mp make_pair
#define pb push_back
#define INF LONG_LONG... | ALGO | 0.99981 | 4.10848 | {
"github_metadata": {
"branch": "main",
"commit_count": 160,
"repo_created_at": "2023-09-19T17:56: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": "d5fd393b05... |
2394faa8-0695-47cd-961d-ddcb0aa4f554 | KeyOfSpectator/OJ | leetcode/cpp/42_Binary Tree Level Order Traversal II.cpp | ////
//// 42_Binary Tree Level Order Traversal II.cpp
//// Leetcode
////
//// Created by 冯诗淳 on 15/10/11.
//// Copyright © 2015年 KeyOfSpectator. All rights reserved.
////
//
///*
// 参考 http://www.cnblogs.com/ganganloveu/p/3843470.html
// 遇到问题:
// ans 加入 line 后 , 再修改line的值后, ans 不变,和java对象指针不同 ! 注意!!!
//
// 两种方法:
... | ALGO | 0.999962 | 4.733137 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2014-11-25T02:30: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": "84d576429... |
d1e76db3-43f0-4bc5-86ec-131a31601cb2 | SkyterX/graph-sync-range | GraphSyncRange/Solver/GraphSyncRange.Solver/src/graph/enumeration/GraphEnumeration.cpp | #include <vector>
#include <algorithm>
#include <graph/enumeration/GraphEnumeration.h>
#include <graph/Graph.h>
#include <util/MathUtils.hpp>
#include <random>
#include <random>
#include <random>
using namespace std;
namespace
{
void PrintPercentage(size_t done, size_t total) {
if (total < 100) {
fprintf(stderr... | ALGO | 0.988078 | 5.701814 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2016-06-05T14:08:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c063a37a2... |
8e382ae6-1bec-4b59-9e2a-2b88e749e728 | FrankRun/A-Simulation-Platform-for-Truck-Platooning | CACC_driver_model truck/eigen-3.3.8/eigen-3.3.8/eigen-3.3.8/bench/btl/libs/mtl4/mtl4_LU_solve_interface.hh | //=====================================================
// File : blitz_LU_solve_interface.hh
// Author : <NAME> <<EMAIL>)>
// Copyright (C) EDF R&D, lun sep 30 14:23:31 CEST 2002
//=====================================================
//
// This program is free software; you can redistribute it and/or
//... | ALGO | 0.996984 | 4.665406 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2024-03-11T02:25:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86d8353791c... |
88575561-8a07-48e2-b43f-2acbd265dc7f | rasputtim/SMF | Source/math/SMF_Pluecker.cpp | /*
SMF - Super Math Fabric
Copyright (C) 2014 Rasputtim <<EMAIL>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the freeMem Software Foundation; either version 2 of the License, or
(at your option) any la... | ALGO | 0.992469 | 5.253361 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-09-05T23:34: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": "a0ef565914... |
b5dfe342-b275-438a-8090-6092fdc121eb | satellitex/rupc2016 | WannabeHop/sate/main.cpp | #include<bits/stdc++.h>
using namespace std;
int N,M;
int G[3001][2];
vector<int> rG[3001][2];
int V[3001];
int dp[3001][3001];
typedef pair<int,int> P;
int main(){
cin >> N >> M;
for(int i=0;i<N;i++){
cin >> V[i] >> G[i][0] >> G[i][1];
rG[G[i][0]][0].push_back(i);
rG[G[i][1]][1].push_back(i);
}
... | ALGO | 0.999887 | 3.724347 | {
"github_metadata": {
"branch": "master",
"commit_count": 395,
"repo_created_at": "2016-02-17T06:41:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "010ebe5c... |
b8927b38-9108-45ac-b0fc-04c572234a2d | sushisyuki/competitive-programming | AtCoder/競プロ典型90問/021/main.cpp | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < (n); i++)
#define REPS(i, n) for(int i = 1; i <= (n); i++)
#define RREP(i, n) for(int i = (n)-1; i >= 0; i--)
#define RREPS(i, n) for(int i = (n); i > 0; i--)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#... | ALGO | 0.999961 | 4.178988 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2021-08-25T14:24: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": "66c89cc9b34... |
be274151-9555-443b-aa98-75b065edfc3b | akashpatilx7/Code-chef | Practice Problems/NFS.cpp | // Chef is playing Need For Speed. Currently, his car is running on a straight road with a velocity U metres per second and approaching a 90∘ turn which is S metres away from him. To successfully cross the turn, velocity of the car when entering the turn must not exceed V metres per second. The brakes of Chef's car all... | ALGO | 0.998879 | 4.67899 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2022-05-07T04:59: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": "42c2ad464b... |
269a3fcc-8ffd-4659-b962-52dd74230c8d | Gall-ardo/CS-202-Bilkent-Homeworks | CS202_HW3/insertionorders.cpp | /**
* Title: Hashing
* Author : <NAME>
* ID: 22202709
* Section : 1
* Homework : 3
* Description : Counting possible insertion orders for hash table
*/
#include <iostream>
#include <fstream>
using namespace std;
#define ll long long
#define MOD 1000000009
void insertionOrders(int n, int* table){
int divide2 = 0;
... | ALGO | 0.999959 | 4.106342 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-01-03T11:30: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": "805dcdd911b... |
f4e8ced5-8184-4055-90d1-f80bfc2a254f | jmarshall23/Unreal2004 | karma/Mcd/src/mesh/ObbObb.h | /* -*-c++-*-
*===============================================================
* File: ObbObb.h
*
* Copyright (c) 1997-2002 MathEngine PLC
*
*
* $Revision: 1.5.18.1 $
* $Date: 2002/04/04 15:28:56 $
*
*================================================================
*/
#ifndef CX_OBBOBB_H
#define CX_OB... | ALGO | 0.995926 | 6.131503 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-11-27T23:58:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42d4ae733d48... |
6c07dd62-a193-41d8-a669-7c30ea3ba206 | dchandran/tinkercell | ExternalCode/copasi/optimization/CPraxis.cpp | // Begin CVS Header
// $Source: /fs/turing/cvs/copasi_dev/copasi/optimization/CPraxis.cpp,v $
// $Revision: 1.13 $
// $Name: Build-33 $
// $Author: shoops $
// $Date: 2010/07/16 19:01:58 $
// End CVS Header
// Copyright (C) 2010 by <NAME>, Virginia Tech Intellectual
// Properties, Inc., University of Heidelb... | ALGO | 0.999787 | 3.612697 | {
"github_metadata": {
"branch": "master",
"commit_count": 2932,
"repo_created_at": "2016-02-24T04:29:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "472d75a... |
9891ae50-ba76-46d2-a7af-7a2e5c177546 | kamyu104/LeetCode-Solutions | C++/letter-combinations-of-a-phone-number.cpp | // Time: O(n * 4^n)
// Space: O(1)
// iterative solution
class Solution {
public:
vector<string> letterCombinations(string digits) {
static const vector<string> lookup = {" ", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
if (empty(digits)) {
return {};
... | ALGO | 0.999919 | 6.986438 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
a79f1586-80bc-4105-95dd-9724746f005d | yffbit/ReBeL_LeducHoldem | cpp/limit_solver.h | #if !defined(_LIMIT_SOLVER_H_)
#define _LIMIT_SOLVER_H_
#include <thread>
#include <condition_variable>
#include <atomic>
#include <deque>
#include <algorithm>
#include "util.h"
#include "game.h"
#include "cfr.h"
#include "net_interface.h"
#define AVG_STRATEGY 1
#define BEST_CFV 2
using Strategy = vector<HandVectorX... | ALGO | 0.999936 | 4.773233 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-05-10T07:47: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": "7ed710cf234a... |
5ceeae45-ee2d-465a-bfc8-0aac4a71287e | likaikkk/Algorithm | Code/_06_Dijkstra.cpp | #include<iostream>
using namespace std;
int head[100000], cnt;
long long ans[1000000];
bool vis[1000000];
int m, n, s;
struct edge
{
int to;
int nextt;
int wei;
} edge[1000000];
// 添加边的函数,x到y的边权重为z
void addedge(int x, int y, int z)
{
edge[++cnt].to = y;
edge[cnt].wei = z;
edge[cnt].nextt = he... | ALGO | 0.999991 | 3.52136 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-09-16T13:21: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": "abf2bdb55a... |
f79feca4-a9b4-4533-8e4c-168660a42c34 | HandIeNeeded/ACM | SGU/275.cpp | #include <bits/stdc++.h>
#define REP(i, a) for (int i = 0; i < (int) (a); i ++)
#define REPP(i, a, b) for (int i = (int) (a); i <= (int) (b); i ++)
#define MST(a, b) memset(a, b, sizeof(a))
using namespace std;
const int N = 105;
long long a[N];
void Gauss(int n, int &now) {
now = 1;
REP(i, 60) {
if (now > n) b... | ALGO | 0.999995 | 3.872428 | {
"github_metadata": {
"branch": "master",
"commit_count": 382,
"repo_created_at": "2014-11-12T09:21:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5bcc79f3... |
93d8f775-ad2d-4cf5-8ee3-9829eec8b8c2 | eliasmagdaleno/csci140s21_src | lab_4a/reworked/dice.cpp | // who: <NAME> | <EMAIL>
// what: uses a 2d array to dipslay number of times a sum occured in the correct row and column
// why: Lab 4a
// when: 4/21/21
#include <iostream>
#include <iomanip>
#include "die.h"
#include "my_includes.h"
void initSumFreqs(double freqs[], size_t size)
{
for (size_t i = 1; 1 <= 6; ++... | ALGO | 0.998803 | 5.159334 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2021-04-04T19:40: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": "ff7fcdf22d... |
5a1f515e-1b53-44c5-8b3c-7001c7a37d40 | bulletphysics/bullet3 | Extras/ConvexDecomposition/bestfit.cpp | #include "float_math.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
/*----------------------------------------------------------------------
Copyright (c) 2004 Open Dynamics Framework Group
www.physicstools.org
All rights reserved.
Redistribution and use... | ALGO | 0.99903 | 6.576291 | {
"github_metadata": {
"branch": "master",
"commit_count": 9404,
"repo_created_at": "2011-04-12T18:45:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13557,
"forks": 2973,
"issues": 238,
"pull_requests": 141
},
"file_meta": {
"content_id"... |
3852c3bc-143d-40d5-bb18-5a2c271d8cd2 | ishandutta2007/codeforces-f | ftiasch/normal/291/E.cpp | #include <bits/stdc++.h>
struct Solver
{
Solver(int n) : child(n)
{
for (int i = 1, p; i < n; ++ i) {
std::string s;
std::cin >> p >> s;
child[p - 1].emplace_back(i, s);
}
std::string p;
std::cin >> p;
m = p.size();
go.resize(m + 1);
std::vector<int> fail(m + 1);
g... | ALGO | 0.999132 | 4.030809 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:43:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6a6332b75c8... |
756d64f3-afdb-4b42-9ac1-20bfb028160e | johnmoses/zero-to-hero-dsa | linked-lists/singly-linked-list/main.cpp | /*
Singly Linked Lists
Given some nodes with values 20, 30, 40, design a fully functional singly linked list with the following operations:
- get value of node
- add node at head
- add node at tail
- add node at index
- delete node at index
- traverse and display nodes
*/
#include <iostream>
c... | ALGO | 0.999416 | 6.585447 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-04-12T19:15:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "299c37a231c... |
78e5b277-5e6c-427d-b726-b4431ef95151 | leoni05/PS | SCPC/2017/pre1/5_TLE.cpp | #include <stdio.h>
#include <algorithm>
#include <vector>
#include <memory.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string.h>
#include <string>
#include <math.h>
using namespace std;
typedef long long ll;
const ll INF = 1e15;
const int INFN = 1000;
const int MOD = 1e9 + 7;
const int... | ALGO | 0.999946 | 3.951868 | {
"github_metadata": {
"branch": "master",
"commit_count": 733,
"repo_created_at": "2020-03-26T10:57:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "289bf45b... |
04a9300d-c9b0-418a-b47b-bb87bf39f352 | ganesanuflorin/Chess-Board | Etapa2/MoveTree.cpp | #include "MoveTree.h"
#include <stdio.h>
#include "stuff.h"
#include "Tools.h"
#include <stdlib.h>
#include <list>
#include "time.h"
#include "Xboard.h"
extern FILE* debug_file;
extern Game joc;
extern Xboard xboard;
using namespace std;
MoveTree::MoveTree(){
nrNoduri=0;
}
//aloca memorie pentru un nod si face ... | ALGO | 0.999504 | 3.264707 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-03-10T12:01: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": "f2d52a0bd2df... |
18e572e3-33db-4206-9338-120de3bab3ee | MaskRay/HackerRank | dortmund-dilemma.cc | /* Problem
Number of strings of length K with exactly K different characters, having at least one proper prefix & suffix in common
f[n][k]: Number of strings of length N consisting of characters 1..K (not necessarily all of them), having no proper prefix & suffix in common
f[n][1] = n
Lemma: if a string o... | ALGO | 0.999926 | 4.299225 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-03-10T04:46:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 48,
"forks": 45,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "0ed2e2b2... |
e1432567-b5f3-418d-8505-454df081c25d | taruvar-mittal/DSA-Solutions | Searching and Sorting/merge sort.cpp | class Solution
{
public:
void merge(int arr[], int l, int m, int r)
{
int x = m - l + 1;
int n = r - m;
int *leftarr = new int[x];
int *rightarr = new int[n];
for (int i = 0; i < x; i++)
{
leftarr[i] = arr[l + i];
}
for (int i = 0; i ... | ALGO | 0.999975 | 5.537208 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2021-04-16T04:57: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": "c6aa3828... |
bc066c85-97e5-40f5-b66c-746f582e1dea | infocelab/embedded-projects | software_projects/c_programs/calender/calendar.cpp | // Name: calendar
// Description:This code displays calendar for years after 2000.
#include<stdio.h>
#include<conio.h>
#include<time.h>
main()
{
int col;
//stores days for every month
int mdays[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int year,mon,dayc=0,mont=0;
printf("enter any year after 1999... | ALGO | 0.989473 | 3.220669 | {
"github_metadata": {
"branch": "master",
"commit_count": 1568,
"repo_created_at": "2015-08-19T02:44: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": "b1bea2c... |
8150e705-3567-435c-a756-bb0e369d0751 | Hyper-Infinity/DsaCodes | Heap/heapify_heapsort.cpp | /* <<<<< <NAME> >>>>> */
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
typedef long long int ll;
typedef unsigned long long int ull;
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define PB push_back
#define MP make_pair
typedef vector<long long int> vli;
typedef vector... | ALGO | 0.999977 | 4.742502 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-07-28T14:00: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": "b38f1873e6c3... |
d44e5fc6-4cfe-4f98-bb07-7bf147509157 | tensorflow/lingvo | lingvo/tasks/car/ops/pairwise_iou_op.cc | /* Copyright 2018 The TensorFlow 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 by applicable law or a... | ALGO | 0.981876 | 7.276997 | {
"github_metadata": {
"branch": "master",
"commit_count": 4728,
"repo_created_at": "2018-07-24T22:30:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2845,
"forks": 450,
"issues": 115,
"pull_requests": 31
},
"file_meta": {
"content_id": "... |
2cec3142-3076-40b6-84af-f4a001a82814 | willstudy/LeetCode | level_order_bottom.cpp | /*
Given a binary tree, return the bottom-up level order traversal of its nodes' values.
(ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ \
9 20
/ \
15 7
return its bottom-up level order traversal as:
[
[15,7],
... | ALGO | 0.999998 | 6.600665 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2015-12-09T03:01: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": "dc9ad4951... |
1104df18-094b-4da1-9c0e-f55f89e8da29 | chubillkelvin/leetcode | solutions/c++/problems/[0973_Medium] K Closest Points to Origin.cpp | #include <bits/stdc++.h>
using namespace std;
class Point {
private:
int x;
int y;
double dist;
public:
Point(int _x, int _y) {
x = _x;
y = _y;
dist = sqrt(pow(x, 2) + pow(y, 2));
}
vector<int> getPoint() {
return {x, y};
}
double getDist() {
r... | ALGO | 0.999999 | 6.136075 | {
"github_metadata": {
"branch": "master",
"commit_count": 454,
"repo_created_at": "2021-02-20T12:11:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f265f3e1... |
727145ee-6966-4ae6-bf01-e755d31e7b2a | TakashiMatsuda/ractIP_alifold | src/centroidalifold/contralign/wrapper.cpp | // Copyright 2009, 2010 <NAME>
#include "Defaults.ipp"
#include "InferenceEngine.hpp"
#include "ParameterManager.hpp"
#include "contralign.h" // wrapper's header
namespace CONTRALIGN
{
template<class T>
struct CONTRAlign<T>::Impl
{
Impl ();
~Impl () {}
const T* ComputePosterior (const std::string& ... | ALGO | 0.980598 | 6.096329 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2013-12-28T07:29: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": "f7cc82e08... |
60c4e661-ff2a-46c8-b43e-2606ea6c3eb8 | marshtv/28.4.2-Station-Operation-Sim | main.cpp | #include <iostream>
#include <cassert>
#include <string>
#include <vector>
#include <chrono>
#include <thread>
#include <mutex>
struct Train {
std::string name;
int time = 0;
};
std::vector<Train> station;
std::mutex station_mutex;
void GoWaitGo(Train train) {
std::this_thread::sleep_for(std::chrono::seconds(trai... | TOOL | 0.927108 | 4.417739 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-01-13T00:45: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": "a678f68cf5... |
9b19143c-c0fd-4bca-8751-7b6dea3f0769 | krypty/CudaMSE | Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/moo/device/math/MandelbrotMathBase.h | #ifndef MANDELBROTBASE_MATH_H_
#define MANDELBROTBASE_MATH_H_
#include <math.h>
#include "ColorTools.h"
/*----------------------------------------------------------------------*\
|* Declaration *|
\*---------------------------------------------------------------------*/
/*-----------------------------------... | ALGO | 0.98562 | 4.855398 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2015-09-18T08:54:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "eeec63064... |
690ac276-c12a-45ae-a31c-941eff05ed72 | wenwu313/LeetCode | leetcode/154_FindMinimumInRotatedSortedArray2.cpp | #include<iostream>
#include<vector>
using namespace std;
int MinInorder(vector<int> &nums, int index1, int index2) {
int result = nums[index1];
for (int i = index1 + 1; i <= index2; i++) {
if (result > nums[i])
result = nums[i];
}
return result;
}
int findMin(vector<int>& nums) {
... | ALGO | 0.99997 | 4.784529 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2017-02-11T06:26: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": "0c0782668... |
55bc42e6-0105-419e-b5ef-4e23829e5ab6 | Gungunkhaitan/journey-with-c- | q12.cpp | #include<iostream>
#include<string.h>
using namespace std;
class Marks{
protected:
int rollNum;
static int count;
string name;
float mark1,mark2,mark3;
public:
Marks(){
mark1=0;
mark2=0;
mark3=0;
}
void setName(){
cout<<"Enter name: ";
cin>>... | TOOL | 0.941629 | 3.888628 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-04-01T06:48: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": "a51aa7a55a44... |
30798f31-7f0f-4969-8cd1-b1fdbce4546a | HeroJho/BaeckJoon | 백준/Gold/17471. 게리맨더링/게리맨더링.cc | #include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <set>
#include <climits>
#include <cmath>
using namespace std;
int N;
vector<int> Matrix[11];
int Value[11] = { 0 };
bool RedBlue[11] = { false };
bool Visited[11] = { false };
int Ans = INT_MAX;
void Reset()
{
for (int i = 0; i ... | ALGO | 0.99982 | 3.600545 | {
"github_metadata": {
"branch": "main",
"commit_count": 626,
"repo_created_at": "2023-03-20T03:54: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": "de4d09d97a... |
485382d7-fccf-4f4b-9b37-11784b7f99f8 | bbhitec/leetcode_doodles | 2444_subarrays_with_bounds.cpp | /**
@author [mst]
@brief leetcode series
2444_subarrays_with_bounds
You are given an integer array nums and two integers minK and maxK.
A fixed-bound subarray of nums is a subarray that satisfies the following conditions:
The minimum value in the subarray is equal to minK.
The maximum value in the suba... | ALGO | 0.999823 | 6.00362 | {
"github_metadata": {
"branch": "main",
"commit_count": 272,
"repo_created_at": "2022-01-27T12:55:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cdc61bcbfa... |
89d31581-23cb-44c5-b402-50c694866111 | BulTTaeng/Algorithm | DP/Hard_13302_리조트/13302.cpp | #include <iostream>
#include <cstring>
using namespace std;
int dp[102][102];
bool rest[102];
int n , m;
int dfs(int day , int coupon);
#define MAX 1000003
int main() {
ios_base::sync_with_stdio(0);
cout.tie(0);
cin.tie(0);
int t;
cin >> n >> m;
memset(rest, false, sizeof(rest));
for (int i = 1; i... | ALGO | 0.99991 | 3.327228 | {
"github_metadata": {
"branch": "main",
"commit_count": 1049,
"repo_created_at": "2022-03-13T05:53: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": "abedc9ed6... |
ff699f0a-be5d-441c-abe2-d3b671e89f05 | Zhehang-98/ASAP_OMS_ED_EC | Experiment_May15/read_power.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>
double compute_column_average(const std::string& filename, int col_index) {
std::ifstream infile(filename);
if (!infile.is_open()) {
std::cerr << "Cannot open file: " << filename << std::end... | TOOL | 0.968329 | 6.406142 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-05-26T03:39: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": "69cf1b0880c3... |
d0954c84-5de9-442e-974b-953533fdac06 | nitinkaplas123/Ramaya-DSA | Day-14-DP/2)knapsack_problem.cpp | 1)Fractional knapsack. -> Greedy
2)0/1 knapsack -> 0 means add kro and 1 means add kro (multiple occurence not allowed)
3)unbounded knapsack -> (multiple occurence of same value allowed)
Solution 1-:
Steps-:
using recursion
Code-:
int helper(int wt[],int val[],int W,int n)
{
if(W==0 || n==0)... | ALGO | 0.999993 | 6.302381 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2024-09-13T12:48:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e3d31f7b... |
e830f26d-8e0b-4a82-a89c-10358c1f611f | tanvirtareq/programming | lightoj/1093-ghajini 2.cpp | #include<bits/stdc++.h>
#define inf 100000000
using namespace std;
typedef long long int li;
int mxtree[400010], v[200010], mntree[400010];
int buildmn(int node, int start, int ed)
{
// cout<<node<<" "<<start<<" "<<ed<<endl;
if(start>ed) return inf;
if(start==ed)
{
mntree[node]=v[start];
// ... | ALGO | 0.999555 | 3.543469 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2019-10-24T10:46: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": "549d8b120... |
1070b699-5757-4272-8043-8a9905191a4a | IcePrincess-1968/Programmes | 洛谷/[洛谷3382]三分法.cpp | #include <cstdio>
#include <iostream>
#include <cstring>
#include <string>
#include <cstdlib>
#include <utility>
#include <cctype>
#include <algorithm>
#include <bitset>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <cmath>
#define LL long long
#define LB lo... | ALGO | 0.999974 | 3.75682 | {
"github_metadata": {
"branch": "master",
"commit_count": 215,
"repo_created_at": "2018-07-31T08:25:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "82216587... |
a71597cc-87eb-4835-a1a6-9546a7719681 | greshem/lmyunit | numerical_math/math_demo/root_of_poly/RootLeastSquareGeneralizedInverse1.cpp | //RootLeastSquareGeneralizedInverse1.cpp
#include <fstream>
#include <dirent.h>
#include <string>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <map>
#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <numerical_math.hpp>
//非线性方程组最小二乘解的... | ALGO | 0.999471 | 3.131994 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-10-08T12:32: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": "bf4b6c3f94... |
75f2ae33-79af-4052-8d77-d58f4186d327 | UlisesPA3/Curso-C- | Ejercicios/Bloque2_22.cpp | //Ejercio de operaciones matemáticas utilizando switch
#include<iostream>
using namespace std;
int main(){
int num1, num2, resultado;
char operacion;
cout <<"Ingrese el primer numero: "<< endl;
cin >> num1;
cout << "Ingrese el segundo numero: "<< endl;
cin >> num2;
cout << "Ingrese la o... | TOOL | 0.941734 | 3.999181 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-04-24T19:15: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": "659d2a413e78... |
c58e5af9-d42c-434f-a2ee-56c4160e72f5 | dreamlax/aoc2024 | cpp/day12/main.cpp | #include "utils/utils.h"
#include <array>
#include <fstream>
#include <iostream>
#include <string>
#include <sstream>
#include <string_view>
#include <tuple>
#include <vector>
const uint16_t kEmpty = 0;
const uint16_t kLeft = 0b00001;
const uint16_t kUp = 0b0010;
const uint16_t kRight = 0b0100;
const uint16_t kDown =... | ALGO | 0.999243 | 6.089716 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2024-12-02T03:25:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5f009ec448a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.