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 |
|---|---|---|---|---|---|---|---|
7a16668e-b07e-48e5-bae6-79ed7061d735 | JoshVarty/DailyProjectEuler | DailyProjectEuler/2016.10.18.Problem23/2016.10.18.Problem23.cpp | // 2016.10.18.Problem23.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <vector>
#define MAX_NUM 28123
int getSumOfDivisors(int currentNumber)
{
int sumOfDivisors = 1;
int sqareRoot = sqrt(currentNumber);
for (int i = 2; i <= sqareRoot; i++)
{
if (... | ALGO | 0.99984 | 4.814067 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2016-09-26T07:31: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": "8bdbed8c3... |
9b0a64a3-c276-41bd-8cfd-c667c551ef3f | umang-singla/Competitive-Programming | Codeforces/Round 815/C.cpp | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<<vi>>
#define vii vector<pii>
#define vll vector<pll>
#define FOR(i, l, r) for (... | ALGO | 0.999883 | 3.793222 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-08-22T07:30: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": "bdd65349b536... |
360f0396-4ca6-46b6-9b07-79a87704114f | stevenhalim/cpbook-code | ch3/greedy/ballotboxes_UVa12390.cpp | // Distributing Ballot Boxes
#include <bits/stdc++.h>
using namespace std;
typedef tuple<double, int, int> dii; // (ratio r, num, den)
int main() {
int N, B;
while (scanf("%d %d", &N, &B), (N != -1 && B != -1)) {
priority_queue<dii> pq; // max pq
for (int i = 0; i < N; ++... | ALGO | 0.999975 | 3.412291 | {
"github_metadata": {
"branch": "master",
"commit_count": 392,
"repo_created_at": "2018-11-27T05:30:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2175,
"forks": 515,
"issues": 22,
"pull_requests": 14
},
"file_meta": {
"content_id": "8... |
f7657bde-2b45-449f-8199-262f4f412e36 | kaldi-asr/kaldi | src/bin/latgen-faster-mapped-parallel.cc | // bin/latgen-faster-mapped-parallel.cc
// Copyright 2009-2012 Microsoft Corporation, <NAME>
// 2013 Johns Hopkins University (author: <NAME>)
// 2013 GoVIvace Inc. (author: <NAME>)
// 2014 <NAME>
// See ../../COPYING for clarification regarding multiple authors
//
// ... | DATA | 0.919958 | 6.051827 | {
"github_metadata": {
"branch": "master",
"commit_count": 9405,
"repo_created_at": "2015-04-20T17:23:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14986,
"forks": 5368,
"issues": 189,
"pull_requests": 63
},
"file_meta": {
"content_id":... |
9c920732-363a-4312-842d-bfe43160a813 | qiaozishun4/CSP2024_BJ | BJ-Junior/answers/BJ-J02023/sticks/sticks.cpp | #include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define pli pair<ll,int>
#define pil pair<int,ll>
#define pll pair<ll,ll>
#define fi first
#define se second
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define lb lower_bound
... | ALGO | 0.999585 | 3.972385 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2024-11-01T16:05:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a72a6452a1... |
7faaddf0-724f-4e62-bca1-9cdae7576c20 | af-orozcog/miscellaneous | codeforces/1728D.cpp | // Is love even real?
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ff first
#define ss second
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> i... | ALGO | 0.999967 | 3.855588 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-08-08T02:35: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": "ff791ea42a... |
faae9613-8940-4206-9480-53b1ad9a3311 | kriishukla/CP_Solution | Atcoder/C++ 20 (gcc 12.2)/abc383_e/60605566.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
//find_by order()->iterator of indexed element, order_of_key()-> number of elements strictly less than x
#define lli long long int
typedef tree < lli, null_type , le... | ALGO | 0.999718 | 4.577437 | {
"github_metadata": {
"branch": "main",
"commit_count": 325,
"repo_created_at": "2024-12-23T05:08:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2710a45c81... |
16440140-8a8c-455f-a6eb-e70bcc9e16fa | ShiqiYu/libfacedetection | example/benchmark.cpp | #include <stdio.h>
#include <opencv2/opencv.hpp>
#include "facedetectcnn.h"
#ifdef _OPENMP
#include <omp.h>
#endif
using namespace cv;
using namespace std;
//define the buffer size. Do not change the size!
#define DETECT_BUFFER_SIZE 0x20000
using namespace cv;
int main(int argc, char* argv[])
{
if (argc != 2)
... | TOOL | 0.942579 | 4.843694 | {
"github_metadata": {
"branch": "master",
"commit_count": 210,
"repo_created_at": "2015-01-20T07:47:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12567,
"forks": 3046,
"issues": 55,
"pull_requests": 3
},
"file_meta": {
"content_id": "... |
bfa7805d-eaac-4fcd-885c-5e7feae4db29 | chawlau/search_engine | search_engine/test/make_dic/make_dic_hash_ch.cpp | #include<iostream>
#include<fstream>
#include<sstream>
#include<set>
#include<map>
#include<utility>
#include<iomanip>
#include<sys/types.h>
#include<dirent.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<sys/dir.h>
#include<cstring>
#include<string>
#include<cctype>
#include<cstdio>
#include<cstdlib>
#include<ext/h... | TOOL | 0.931647 | 4.056788 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-03-11T08:10:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "583ab8c71f... |
78a2f9d9-360b-463e-ab1f-266d21f032f4 | larrasket/ds | huff.cpp | #include "priority_queue.h"
#include <iostream>
#include <memory>
#include <unordered_map>
class huffman {
private:
struct node
{
node*left;
node*right;
int value;
node(int v) {
value =v;
left = null;
right =null;
/* return node;*/
}
};
bool isleaf(node*n) { return (n->left == null && n ->right =... | ALGO | 0.99984 | 3.67173 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-06-28T21:49: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": "5f40c6dee94b... |
40e1189e-8462-45e6-8e9b-be04c69430d9 | stillwater-sc/universal | include/universal/number/posit/specialized/posit_3_1.hpp | #pragma once
// posit_3_1.hpp: specialized 3-bit posit using lookup table arithmetic
//
// Copyright (C) 2017 Stillwater Supercomputing, Inc.
// SPDX-License-Identifier: MIT
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.
// DO NOT USE DIRECTLY!
// the comp... | ALGO | 0.917558 | 6.098799 | {
"github_metadata": {
"branch": "main",
"commit_count": 4132,
"repo_created_at": "2017-05-01T20:13:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 451,
"forks": 64,
"issues": 49,
"pull_requests": 1
},
"file_meta": {
"content_id": "2430f4... |
01f18a03-7a9c-40ca-8df3-3ee9c68c563b | navyforce141/stanford-cs106b | Assignment3/4 - Stock Cutting/src/StockCutting.cpp | /*
* File: StockCutting.cpp
* ----------------------
* Name: _ArnO_
* Section: NoBody
* This file is the starter code for the stock-cutting problem
* from Assignment #3.
* Given a vector of pipes length, return minimal number of stock pipe to purchase
*/
#include <iostream>
#include "console.h"
#include "vecto... | ALGO | 0.998897 | 4.778378 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2014-04-25T14:19:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3fb07c66a7... |
70343ce2-479d-4d31-8340-9234fda9f209 | RIzmaylov/SKILLBOX_Cpp | 7. For/Task_06.cpp | #include <iostream>
/*
Напишите программу для печати важных объявлений. Сверху объявления должен располагаться вот такой колонтитул:
~~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!~~~~~~~~~~~~~~~~
Восклицательные знаки всегда располагаются по центру строки,
причём в зависимости от важности объявления количество восклицательных зн... | ALGO | 0.995384 | 4.769791 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-07-08T05:46: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": "945cff37d66... |
9f62acc5-d600-4d60-9de6-e2d89457ad02 | shakilur157/Problem-Solving | hacker rank random/anagram.cpp | #include <bits/stdc++.h>
using namespace std;
// Complete the anagram function below.
int anagram(string s) {
long long len = s.length();
if(len&1){
return -1;
}
int s1[26]={0};
int s2[26]={0};
for(int i = 0; i < len; i++){
if(i<len/2){
s1[int(s[i]) - 97]++;
... | ALGO | 0.999622 | 4.231409 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-12-02T03:41:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ffaa6c597... |
ffe36aa1-d463-4903-993d-ed822f0471f6 | apache/openoffice | main/chart2/source/view/inc/MinimumAndMaximumSupplier.hxx | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to yo... | TOOL | 0.903491 | 6.916325 | {
"github_metadata": {
"branch": "trunk",
"commit_count": 9123,
"repo_created_at": "2013-11-13T08:00:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1049,
"forks": 341,
"issues": 0,
"pull_requests": 18
},
"file_meta": {
"content_id": "e4e... |
d542ec37-1971-4f5a-8145-4d0ebb28d6fd | truemanburbank/C-Study | backjun/10026.cpp | #include <iostream>
#include <queue>
using namespace std;
int n;
char common[101][101];
char colorBlindness[101][101];
bool commonVisited[101][101];
bool colorBlindnessVisited[101][101];
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
void Common(int x, int y)
{
queue<pair<int, int>> q;
q.push({x, y});
... | ALGO | 0.999295 | 3.836507 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2022-10-02T02:32: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": "9e3ff9fc6... |
7c5c2311-203c-44cf-b3d6-01cda1ef35c7 | Samius-Sazin/CODE | Programming/10_DP_GRAPH/DFS_7_Tree_Diameter_Of_Tree.cpp | /*
complexity : O(n)
Find Diameter of a tree:
Approach:
-Select any node and calculate depth of all nodes
-Select the node that has maximum depth
and again find out maximum depth
this maximum depth is the diameter
*/
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
//Vector for s... | ALGO | 0.998908 | 4.383449 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2025-01-31T18:27: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": "b48f05d4384... |
2f902e98-9a43-4190-9fd2-a37e2556678c | ehwan/AdventOfCode2023 | Day12.cpp | #include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
bool inc( std::vector<int> &gaps, int max_gap, int i )
{
gaps[i]++;
int sum = 0;
for( auto g : gaps ){ sum += g; }
if( sum > max_gap )
{
if( i == 0 ){ return false; }
gaps[i] = 1;
re... | ALGO | 0.999845 | 5.115552 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2023-12-02T05:06: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": "b84a49294cf... |
21f529bb-1529-4542-95b8-d5c398f812fb | SpeedOfMagic/metaprogramming | metaprogramming/library/graph/GLib/get_reached_vertexes.h | #pragma once
#include <type_traits>
#include "find_node_by_vertex.h"
#include "dfs.h"
namespace GLib {
/**
* Gets all vertexes that can be reached from vertex start.
* @see DFS
* @param graph Template parameter, graph to process
* @param start Template parameter
* @returns Parameter result, all vertexes that a... | ALGO | 0.992709 | 6.657271 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2020-11-25T17:28: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": "d5c9adec0... |
5c2f0a33-898d-462f-aefc-825e67fcb194 | UserUnauthorized/OI-Codes | HZ/73.7.cpp | //Luogu - P4827
#include <bits/stdc++.h>
typedef int valueType;
typedef std::vector<valueType> ValueVector;
typedef std::vector<ValueVector> ValueMatrix;
constexpr valueType MOD = 10007;
template<typename T1, typename T2, typename T3 = valueType>
void Inc(T1 &a, const T2 &b, const T3 &mod = MOD) {
a = a + b;
... | ALGO | 0.999799 | 3.760125 | {
"github_metadata": {
"branch": "main",
"commit_count": 673,
"repo_created_at": "2022-08-30T03:06:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f961ab377... |
d35122b4-a37e-4218-963a-96ec571cc5cb | v-anh/learnC- | learnC++/learnC++/Test2018.cpp | //
// Test2018.cpp
// learnC++
//
// Created by <NAME> on 2019/05/07.
// Copyright © 2019 <NAME>. All rights reserved.
//
#include "Test2018.hpp"
using namespace std;
bool isYoung(int n,int m,int Y[4][5]) {
if (n != m) {
return false;
}
for (int i = 0; i < n ; i ++ ) {
for (int j = 0;... | ALGO | 0.999092 | 3.079703 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-05-14T15:03: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": "c2f4e473b4... |
9da5c0ac-6004-48dd-ae1c-2510e621712b | stlbw/SimUAV | src/trimAngles.cpp | #include "../declaredFun.h"
#include <math.h>
#include<iostream>
using namespace std;
struct Trim_Angles{
double alpha_trim, deltae_trim, theta_trim, u, w;
};
Trim_Angles trimAngles(AeroDB db1, AeroDB db2, double V, double h, double gamma_0, double rho) {
double alpha_min;
double alpha_max;
alpha_mi... | ALGO | 0.997805 | 5.868349 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2023-03-17T20:18:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4644944af5... |
4e253510-ba88-4664-9b32-82492b39b40f | 10Maruf/CODEFORCES-Problem | B_Floor_or_Ceil.cpp | /*maruf_bro*/
#include <bits/stdc++.h>
using namespace std;
#define IO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define ld long double
#define ll long long
#define vec vector<ll>
#define pb push_back
#define fcin(n) \
for ... | ALGO | 0.999899 | 4.293091 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2023-10-15T17:29: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": "437e9911433... |
3057b5c1-2281-4088-865a-b86dc6060779 | etosch/stats | Mersenne.cpp | #include "RNG.h"
#include <iostream>
#include <fstream>
#define MAGIC_1 1812433253
#define MAGIC_2 2636928640
#define MAGIC_3 4022730752
#define MAGIC_4 2567483615
using std::cout;
void Mersenne::init(uint32_t seed) {
index = 0;
state[0] = seed;
for (int i = 1 ; i < recurrence_degree ; i++) {
uint32_t a =... | ALGO | 0.998499 | 3.976948 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2014-08-14T00:36: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": "3a2d64ce5d... |
2dda92cc-4acf-4618-a01f-33aaef0aa5e9 | surajmate007/Leetcode_Problem_Of_the_Day | 22_July_2022_Partition_List.cpp | // Leetcode POTD:
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
Li... | ALGO | 0.999934 | 5.557366 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2022-07-02T03:45: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": "d647b6b49b8... |
187e1578-2208-44f3-81cd-edf94ab2c127 | wpineda21/ProyectoAlgo2.0 | labo.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
class Array
{
public:
template <class T>
static void input(vector<T> &A, int n)
{
for (int i = 0; i < n; i++)
{
scanf("%d ", &A[i]);
}
}
template <class T>
static void print(vector<T> &A)
... | ALGO | 0.999831 | 5.448758 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-11-15T22:03:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9703642327d... |
aaa364fe-b71a-4f57-8d9e-842da6efb6a9 | gabriel88766/C-CPP-AlgorithmsAndContests | Codeforces/1786/A2.cpp | #include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
const ll INF_LL = 0x3f3f3f3f3f3f3f3f, MOD = 1e9+7;
const int INF_INT = 0x3f3f3f3f;
const long double PI = acosl(-1.), EPS = 1e-9;
using namespace std;
//cout << fixed << setprecision(6)
int main(){
ios_base::sync_with_stdio(fal... | ALGO | 0.999731 | 3.307605 | {
"github_metadata": {
"branch": "master",
"commit_count": 436,
"repo_created_at": "2020-08-21T00:21:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5c55010... |
7f0f6463-f8aa-4142-8a9a-fa6f4ae6e12d | jixingwu/obsavoid | obsavoid/src/assistMath.cpp | #include "assistMath.h"
void qToEuler(float& _roll,float& _pitch,float& _yaw,float q[])
{
float_t w,x,y,z;
//diffrent coordinates
w=q[0];
x=q[1];
y=q[2];
z=q[3];
if(fabs(w)+fabs(x)+fabs(y)+fabs(z)<0.1){
_roll = 0;
_pitch = 0;
_yaw = 0;
}
//cout<<"q:"<<w<<" ... | ALGO | 0.974461 | 3.311248 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-04-24T08:20: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": "1141a163d9... |
bf80bd28-f639-463a-b830-c02ba67d57a5 | ishandutta2007/codeforces-o | okwedook/normal/1131/G.cpp | #pragma GCC optimize("O3", "unroll-loops")
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <bitset>
#include <sstream>
#include <deque>
#include <queue>
#include <r... | ALGO | 0.999648 | 3.747617 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:45: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": "9f7c5d216c70... |
1cd4a983-3e6f-4b44-9946-72c2859f653a | riyasachdeva04/dsa | dsa/DP/minCost.cpp | class Solution {
public:
int minCostHelper(vector<int>& days, vector<int>& costs, int i, vector<int>& dp)
{
if(i >= days.size()) return 0;
if(dp[i] != -1)
return dp[i];
// cost for day1 pass
int cost1 = costs[0] + minCostHelper(days, costs, i+1, dp);
... | ALGO | 0.998192 | 5.042182 | {
"github_metadata": {
"branch": "main",
"commit_count": 157,
"repo_created_at": "2023-04-06T12:13:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3538b97e5e... |
40003ff2-6cdb-42c4-8f82-7047d68a23f6 | jheniferr274/cienco-3sem-ed | material 8/lista de exerc 1/Exerc 3/main.cpp | /*Faça um programa em C++ que receba o número de horas trabalhadas e o
valor do salário mínimo Calcule e mostre o salário a receber seguindo as
regras abaixo
a.A hora trabalhada vale a metade do salário mínimo
b.O salário bruto equivale ao número de horas trabalhadas multiplicado
pelo valor da hora trabalhada
c.O impos... | ALGO | 0.995016 | 3.413265 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-03-03T23:34:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d03b1f852e2... |
dbffc93e-33aa-4808-b973-13dbcc1cba98 | 07legion/Leetcode-Problems | 92-reverse-linked-list-ii/92-reverse-linked-list-ii.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) {}
* };
*/
using node = ListNode;
class Solution {
public:
... | ALGO | 0.999999 | 5.629887 | {
"github_metadata": {
"branch": "main",
"commit_count": 1371,
"repo_created_at": "2021-12-24T07:14: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": "f2d6057ae... |
24acbded-60db-44c2-9b52-e36fbbc193db | WilsonOh/cpp_containers | priorityqueue/PriorityQueue.hpp | #include <functional>
#include <ostream>
#include <vector>
template<typename T, typename Comparator = std::greater_equal<T>> class PriorityQueue {
void heap_swap_children(std::vector<T> &heap, std::size_t heap_size, std::size_t root_idx) {
std::size_t largest = root_idx;
std::size_t left_child_idx = (root_id... | ALGO | 0.998405 | 6.211331 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2022-05-03T09:41: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": "18aee14e5e2... |
07bd91a2-25ff-4b14-9b17-4084a0a2b19f | dorianturner/aoc24 | 10/1.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ifstream fin("input.in");
vector<vector<int>> map;
string line;
while (getline(fin, line)) {
vector<int> row;
for (char c : line) {
row.push_back(c - '0');
}
map.push_back(row)... | ALGO | 0.999943 | 5.802101 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2024-12-01T17:47: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": "4c9f53f6f5b... |
ebb84d58-f4df-465d-89ab-5392daf24e90 | lwins-lights/QHD-experiment | func/nonsmooth/AMGM.cpp | #include <cmath>
using namespace std;
const double L = 0.5;
const int dim = 2;
void get_potential_params(double &var_L, int &var_dim) {
var_L = L;
var_dim = dim;
}
// B = 50
double get_potential(const double *x) {
// Shift the bounds to be around the origin
double x1 = x[0] * 20;
double x2 = x[1... | ALGO | 0.999718 | 5.182657 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2023-04-28T11:35:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da239f5c0f5... |
40da15ff-3077-45a3-ba84-a32b78c476fb | LavishGulati/Competitive-Programming-CodingNinjas | Dynamic Programming 3/mehtaAndBankRobbery.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unordered_map<int, int> umapii;
typedef unordered_map<int, bool> umapib;
typedef unordered_map<string, int> umapsi;
typedef unordered_map<string, string> umapss;
typedef map<string, int> mapsi;
typedef map<pair<int, int>, int> mappiii;
typedef... | ALGO | 0.999869 | 3.843738 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-08-14T11:03:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7926157c... |
f61768a8-6041-4d58-92c3-89fadc36817e | pcw109550/problem-solving | LeetCode/binary-tree-tilt.cpp | // 563. Binary Tree Tilt
#include <iostream>
#include <cmath>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNo... | ALGO | 0.999988 | 6.059283 | {
"github_metadata": {
"branch": "master",
"commit_count": 304,
"repo_created_at": "2020-01-30T10:05:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80d0b75... |
d5f9b28c-62c9-4024-b0a8-66174e1f2eba | C-W-Z/UVaOJ | 103.cpp | #include <bits/stdc++.h>
using namespace std;
bool smaller(const vector<int> &a, const vector<int> &b, const int d)
{
for (int i = 1; i <= d; i++)
if (a[i] >= b[i])
return false;
return true;
}
void dfs(
const vector<vector<int>> &boxes,
const int n_box,
const int d,
vector... | ALGO | 0.999963 | 4.098484 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2024-08-10T09:55: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": "8b30e0cc0... |
6cc0048f-40ca-42ca-ae70-96c4d03ce59f | gabrieliUNC/Competitive-Programming | codeforces/sereja_swaps_2.c++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
int a[10005];
signed main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, k, ans = -1e9 + 6; cin >> n >> k;
for(int i = 1; i <= n; ++i) cin >> a[i];
for(int l = 1; l <= n; ++l){
for(int r = l; r <= n; ++r){
multiset <int> s... | ALGO | 0.999959 | 4.153659 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2022-12-24T01:03:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "089cc834f... |
8d6236a1-80c1-4ba6-a5a8-a4ac1ad58024 | SYCstudio/OI | Practice/2019.4.16/CF757F.cpp | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<vector>
#include<queue>
#include<iostream>
using namespace std;
typedef long long ll;
const int maxN=202000;
int n,m,S;
vector<pair<int,int> > dE[maxN];
priority_queue<pair<ll,int> > H;
vector<int> G[maxN],iG[maxN],sG[maxN],fG[maxN];
ll... | ALGO | 0.999917 | 3.913693 | {
"github_metadata": {
"branch": "master",
"commit_count": 585,
"repo_created_at": "2018-06-07T14:07:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "657435f9... |
2cc792dc-9ff5-4b80-8f22-513003883192 | kabraneel/Competitive-Programming | Codeforces/CF#1708/B.cpp | // na ho paega humse
// nai_aati_coding
// i love PD
// Motivation when feeling low : http://bitly.com/98K8eH
#include <bits/stdc++.h>
#include <chrono>
using namespace std;
#define int long long
#ifdef KABRANEEL
#define LOCAL
#include "/home/kabraneel/coding/debug.h"
#else
#define debug(x...)
#define debugln(x...)
#e... | ALGO | 0.999622 | 3.795048 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2021-08-18T06:00: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": "91f17dae49d... |
3f7302cc-d7d8-4089-abdc-166814cd131c | jeroenrook/MOSMAC-ECJ | experiments/aclib/aclib2/target_algorithms/sat/cryptominisat-cssc14/code/cryptominisat4/varreplacer.cpp | /*
* CryptoMiniSat
*
* Copyright (c) 2009-2013, <NAME>. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.0 of the License.
*
* This libr... | ALGO | 0.997541 | 4.41148 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-03-03T13:45: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": "7fb7f8dd2c52... |
3ce15c97-0097-456d-842d-624e4032e82b | GiuseppeBellamacina/Backup-Codici-Uni | Anno1/Semestre1/Programmazione1/Code eser/Lab prog1/15_02_2019(A).cpp | #include <iostream>
#include <cstdlib>
#include <cmath>
#include <typeinfo>
#define DIM 50
using namespace std;
class A{
private:
double* w;
short len;
protected:
double const get(short i){
return w[i % len];
}
public:
A(short m) : len(m){
w = new double [len];
for(int i = 0; i < len; i++){... | ALGO | 0.989601 | 3.237045 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-11T12:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8554532b31a... |
3ab3b450-5997-4343-b51d-10867dc70fd9 | AVVKavvk/DSA | searching/linearSearch.cpp | #include <bits/stdc++.h>
#define pi 3.14
#define fl(a, b) for (int i = a; i < b; i++)
#define ma(a, b) ((a) > (b) ? (a) : (b));
#define mi(a, b) ((a) < (b) ? (a) : (b));
#define pb push_back
#define ps(a, b) std::cout << a << ' ' << b << std::endl;
#define pn(a) std::cout << a << std::endl;
#define p(a) std::cout << a;... | ALGO | 0.999411 | 3.73012 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2023-05-26T10: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": "d1c86a25b9... |
e54155e9-bf1e-414a-ad08-1e20c0e15a30 | aryanguptacsvtu/OOP-in-Cpp | STL1.cpp | #include <iostream>
#include <vector>
using namespace std;
template <class T>
void display(vector<T> &v)
{
cout << "Vector:";
for (int i = 0; i < v.size(); i++)
{
// cout << v[i] << " "; [VALID]
cout << v.at(i) << " ";
}
cout << endl;
}
int main()
{
vector<int> vec1; // Ze... | TOOL | 0.934782 | 4.10675 | {
"github_metadata": {
"branch": "main",
"commit_count": 129,
"repo_created_at": "2024-04-06T05:08:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "59efcf4a8b... |
7ddf6ad1-1ed9-4edd-a297-7133e52a6b98 | ishandutta2007/codeforces-e | egor.lifar/normal/1268/A.cpp | #include <iostream>
#include <complex>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <cmath>
#include <bitset>
#... | ALGO | 0.999962 | 3.594821 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7345bd9bfc71... |
569ffc5f-73a6-4446-9451-99ed44e552c0 | md-owais9956/Geeksforgeeks | Searching/AllocateMinimumPages/solution.cpp | class Solution {
public:
bool ispossible(vector<int>& arr, int k, int maxpages){
int students = 1, pages = 0;
for(int i = 0; i<arr.size();++i){
if(arr[i]>maxpages) return false;
if(pages+ arr[i] > maxpages){
students++;
pages ... | ALGO | 0.999993 | 5.191207 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2025-04-16T17:56:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b7481ccb68... |
889f9b93-d6d9-49b2-a5f9-be384ff9fc63 | munzayanahusn/Tucil1_13521077 | src/main.cpp | // TUGAS KECIL 1 STRATEGI ALGORITMA
// Nama : <NAME>
// NIM : 13521077
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <vector>
#include <ctime>
#include "calculation.cpp"
using namespace std;
// Inisiasi Variabel
string user[4], inp[4];
float inpNum[4];
int inpInteger[4];
char o... | TOOL | 0.977814 | 3.799348 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2023-01-21T04:53: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": "ae7014d48c1... |
7aa767bd-39f2-4791-a770-7e5e69a83af5 | LineageOS/android_hardware_samsung_slsi-linaro_exynos | libhdr/srcs/hdr10p/hdr10pMeta2Meta.cpp | /*
* Copyright Samsung Electronics Co.,LTD.
* Copyright (C) 2022 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/li... | ALGO | 0.993536 | 6.872472 | {
"github_metadata": {
"branch": "lineage-22.2",
"commit_count": 119,
"repo_created_at": "2023-03-14T09:58:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5... |
26fd0e38-457f-4497-b813-1622890f1481 | manonaamo/kyopro | easy/bishop/bishop.cpp | #include<bits/stdc++.h>
#include <iostream>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repd(i, n) for(int i = 0; i <= (n); ++i)
#define MAX_V 1000
#define INF 1001001001
using ll = long long;
using Graph = vector<vector<int>>;
using Graphstr = vector<vector<string> >;
using Pint = pair<... | ALGO | 0.999866 | 3.683587 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-11-11T10:15: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": "7bb543a782d9... |
288f8fdd-2507-49dc-b2c5-4deb7ab94450 | ziglang/zig | lib/libcxx/include/__algorithm/ranges_replace_if.h | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | TOOL | 0.967346 | 7.216711 | {
"github_metadata": {
"branch": "master",
"commit_count": 34092,
"repo_created_at": "2015-08-06T00:51:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 40012,
"forks": 2915,
"issues": 3389,
"pull_requests": 267
},
"file_meta": {
"content_i... |
ff0df810-e4ed-4513-8d16-7d806ff533a4 | Bentley386/Codeforces | 1500-1900/1500/binary_minimizer.cpp | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<fstream>
#include<map>
#include<cmath>
#include<unordered_set>
#define INF 1000000000
using namespace std;
typedef long long ll;
int main(){
//ifstream input;
//input.open("test.txt",ios::in);
int q,n;
ll k;
string... | ALGO | 0.999964 | 3.569555 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2020-07-28T18:23: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": "d34415292... |
ad8ef737-74ce-412b-afbd-42e5c656743c | asafira/GraphCode | viewer.cpp | /**
* @file viewer.cpp
* Test script for the SDLViewer and Graph
*
* @brief Reads in two files specified on the command line.
* First file: 3D Points (one per line) defined by three doubles
* Second file: Tetrahedra (one per line) defined by 4 indices into the point list
*
* Prints
* A B
* where A = number of... | ALGO | 0.946898 | 5.294785 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2017-11-22T03:33: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": "b90d884c6... |
60feec48-eca1-4951-81c4-25719d7c2556 | PatJRobinson/variadic_visitors | main.cpp | #include <string_view>
#include <variant>
#include <iostream>
void print_arg(std::string_view arg) {
std::cout << arg << '\n';
}
template <typename V, size_t I = 0, typename ... Args>
constexpr auto get(std::string_view type, auto func, Args... args) {
if constexpr (I < std::variant_size_v<V>) {
using... | TOOL | 0.953367 | 7.145301 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2024-10-21T19:32:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d6e59a87b... |
5018ad36-d5ad-4ab0-8f02-136b6817ab47 | AdityaPourush/DSA | C++/Problems/rotate array by k elements.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// void rotateRight(vector<int> &arr, int k){
// vector<int> temp;
// int s = arr.size();
// k = k % s;
// // storing the elements
// for(int i = s-k; i < s; i++){
// temp.push_back(arr[i]);
// }
// /... | ALGO | 0.99994 | 5.447066 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-10-07T17:27: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": "cbe3e73e9812... |
dec771be-834b-433b-a52e-a7d1d3c43b7a | noorshaik95/MissionRnD-C-Basics | src/isOlder.cpp | /*
OVERVIEW: Given date of births of two persons as inputs, return 1 if person one is elder,
2 if person two is elder, 0 if both are of same age.
Example: isOlder("24-07-2000", "25-07-2000") should return 1 as person one
is elder than person two.
INPUTS: DOBs of two persons as parameters in the format "DD-MM-YYYY".
... | ALGO | 0.998177 | 3.633901 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-03-01T17: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": "58013ed45... |
1fca7ad8-3686-4b7f-8ded-57dd07c371a6 | anujsolanki716/DSA-Program | mergeSort.c++ | #include<bits/stdc++.h>
using namespace std;
// void merge(vector<int> &arr, int l, int mid, int h){
// vector<int> temp;
// int left = l;
// int right = mid+1;
// while(left<=mid && right<=h){
// if(arr[left]<=arr[right]){
// temp.push_back(arr[left]);
// left++;
// ... | ALGO | 0.999999 | 5.713908 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-10-23T17:15: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": "f8f4726787b1... |
234cf3f3-6a25-46cd-a03a-1b9583231b97 | Anaveragec0der/dataStructures | SortingTechniques/SelectionSort.cpp | #include<iostream>
using namespace std;
void SwapUsing2var(int &a,int &b)//if we use this function for swapping we will not get desired output
{
b=a+b;
a=b-a;
b=b-a;
}
void Swap(int &a,int &b)//if we use this function we get the desired output
{
int temp = a;
a = b;
b = temp;}
void SelectionSort(int... | ALGO | 0.999934 | 4.66797 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-09-12T19:56: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": "590a51c7cf74... |
a515311f-cd05-40a1-88b2-8110eb484646 | bmtuschhoff/heterogeneity_in_susceptibility | Code_Simulations/FalseNegatives/Cont_MCMCL_FNeg.cpp | // [[Rcpp::depends(RcppGSL)]]
#include <RcppGSL.h>
#include <iostream>
#include <math.h>
#include <time.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
using namespace Rcpp;
// [[Rcpp::export]]
double likelihood(double kval, double thetaval, int Focal, int N, int prev_inf, int naive_inf, double false_neg)
... | ALGO | 0.999748 | 5.446263 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2023-10-06T19:23: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": "de08c0da31e... |
89da3227-5ec0-431a-8387-130661cef858 | gokulr-05/DS-PROBLEM-JS-STDIN-VS-CODE | STDIN/test2/c.cpp | #include <iostream>
#include <map>
using namespace std;
int main()
{
int testcase,count=0;
cin >> testcase;
for(int t = 0; t < testcase; t++)
{
int n;
cin >> n;
int a[n];
for(int i = 0; i < n; i++)
{
cin >> a[i];
}
for (int j = n - 2; j >= 0; --j) {
while (a[j] >= a[j + 1])... | ALGO | 0.999389 | 4.022685 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-06-15T08:43:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a780a23043... |
7833e41c-9e7b-4530-b3b8-83e1d36b3a04 | SarahLMelo/IF672-Algoritmos | Listas/Lista2/Hashify.cpp | #include <iostream>
#include <fstream>
using namespace std;
ofstream myfile;
//#define cout myfile
struct node{
int value = -1, playedTimes = 0;
long long int score = 0;
string key = "EMPTY";
};
class Hash{
private:
int size, occupiedSpace;
node *hashTable;
public:
... | ALGO | 0.994959 | 4.071889 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2021-09-23T17:18: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": "5d2b3226c80... |
7e2a1025-301f-43fa-b438-14fe763aea83 | fadilcse5bu/LightOj-Problems-Solution | 2. Medium/Eid.cpp | #include <bits/stdc++.h>
using namespace std;
bool col[10001];
vector <int> prime;
void sieve() {
for(int i = 3; i <= 100; i += 2) {
if(col[i] == false) {
for(int j = i*i; j <= 10000; j += 2*i) {
col[j] = true;
}
}
}
prime.push_back(2);
for(int i = 3; i <= 10000; i += 2){
if(col... | ALGO | 0.999839 | 4.706939 | {
"github_metadata": {
"branch": "main",
"commit_count": 120,
"repo_created_at": "2022-09-30T16:03: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": "3bdeb8a47e... |
67b70406-23ef-4434-a657-76bb3e08e600 | zxlooong/minica | Mc2Code/CA/CA.H | #include <time.h>
#define DER 1 //FORMAT_ASN1
#define PEM 3 /*定义格式*/
#define NET 4
#define P12 5
#define MAX_MD_SIZE (16+20) /* The SSLv3 md5+sha1 type */
#pragma warning(disable:4786)
#include <string>
#include <list>
typedef char * (* PNewCrlMem)(UINT len);
/*struct stuSUBJECT//个体信息 由于文本框输入限制对中... | TOOL | 0.974771 | 3.44411 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2013-01-31T19:32:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57234b4591... |
a660cbc3-bb17-4542-9057-a01ef2db0e12 | miyajan/atcoder | ABC-271/D.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N, S;
cin >> N >> S;
vector<int> a(N + 1);
vector<int> b(N + 1);
for (int i = 1; i <= N; i++) {
cin >> a.at(i) >> b.at(i);
}
vector<vector<pair<bool, vector<int>>>> dp(N + 1, vector<pair<bool, ve... | ALGO | 0.999989 | 3.457273 | {
"github_metadata": {
"branch": "main",
"commit_count": 111,
"repo_created_at": "2019-05-04T11:44: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": "323492afa7... |
aa1c8851-e336-4e98-b29d-31d0996ddb4e | ishandutta2007/codeforces-a | antontrygubo_o/normal/1594/F.cpp | #include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
using namespace __gnu_pbds;
using namespace std;
using ll = long long;
using ld = long double;
typedef tree<
... | ALGO | 0.999729 | 4.309173 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00: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": "71d1ad36010d... |
7f62b184-8453-440d-8a60-c85bbe954b14 | suyog73/DP | 5.cpp | // Knapsack 1 Atcoder
// https://atcoder.jp/contests/dp/tasks/dp_d
#include <bits/stdc++.h>
using namespace std;
#define int long long
int wt[105], val[105];
int dp[105][100005];
int func(int idx, int wt_left)
{
if (wt_left == 0)
return 0;
if (idx < 0)
return 0;
if (dp[idx][wt_left] != ... | ALGO | 0.999998 | 4.675428 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2022-04-05T04:09:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "05500b05b0... |
8d38a097-7074-4a94-b2ed-174eb053132f | ppplinday/vgg16-by-ARM-Compute-Library | src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp | /*
* Copyright (c) 2017 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights ... | ALGO | 0.995045 | 7.004235 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-06-22T09:38:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 32,
"forks": 14,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f6ec65... |
66df5732-e457-4ba6-81e6-3db90106c975 | inglada/OTB | Utilities/ITK/Code/Patented/itkActiveShapeModelCalculator.h | /*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkActiveShapeModelCalculator.h,v $
Language: C++
Date: $Date: 2009-02-01 13:08:40 $
Version: $Revision: 1.2 $
Copyright (c) Insight Software Cons... | ALGO | 0.998514 | 3.467942 | {
"github_metadata": {
"branch": "master",
"commit_count": 10982,
"repo_created_at": "2011-07-01T06:29:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac769f... |
292704c9-2aa8-4b46-b1a0-b77a20d2d4b9 | anshi0/leetcode | 0146-lru-cache/0146-lru-cache.cpp | class LRUCache {
public:
class Node {
public:
int key;
int val;
Node* next;
Node* prev;
Node(int _key, int _val) {
key = _key;
val = _val;
}
};
Node* head = new Node(-1, -1); // dummy head node
Node* tail = new Node(-1, -1); // ... | ALGO | 0.999817 | 5.928095 | {
"github_metadata": {
"branch": "main",
"commit_count": 655,
"repo_created_at": "2024-06-06T18:25: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": "356883b9d1... |
05387ae0-c090-48ec-9a78-76c3dbd07a67 | simayildeniz/Binary-Search-Tree-vs.-Hash-Table | HashTable.h | #ifndef HASHTABLE_H
#define HASHTABLE_H
# include <iostream>
# include <string>
using namespace std;
bool isPrime( int n )
{
if ( n == 2 || n == 3 )
return true;
if ( n == 1 || n % 2 == 0 )
return false;
for ( int i = 3; i * i <= n; i += 2 )
if ( n % i == 0 )
return false;
return true;
}
int nextPri... | ALGO | 0.98763 | 5.014877 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-02-16T14:46: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": "ef69bb262304... |
f887b115-50c3-4c9f-a766-403ad974ee9e | gp-ryu/TCA-optimized | anRpackage/src/estimate_Z_j_standalon.cpp | #include <Rcpp.h>
#include <RcppEigen.h>
#include <iostream>
#include <stdio.h>
#include <unordered_map>
#include <vector>
// [[Rcpp::plugins(openmp)]]
#ifdef _OPENMP
#include <omp.h>
#endif
// // // [[Rcpp::depends(RcppParallel)]]
// #include <RcppParallel.h>
//[[Rcpp::depends(RcppClock)]]
#include <RcppClock.h>
#inc... | ALGO | 0.999291 | 5.895624 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-09-10T21:16: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": "64899e214f3... |
11d7c236-6708-4f23-b909-d715269e211b | Akashdip-N/LeetCode-Solutions | 3483. Unique 3-Digit Even Numbers.cpp | /*
https://leetcode.com/problems/unique-3-digit-even-numbers
*/
/*
Solution Approach: Using set to store the unique 3-digit even numbers.
Time Complexity: O(n^3), n = size of digits array.
Space Complexity: O(n), for storing unique numbers.
Explanation:-
i. Iterate through each value of th... | ALGO | 0.999663 | 6.560317 | {
"github_metadata": {
"branch": "main",
"commit_count": 130,
"repo_created_at": "2024-11-24T00:28: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": "eb2ba7c01a... |
ab6b4e96-e7c3-4747-95ca-c711ed54f22e | bhuman/BHumanCodeRelease | Src/Modules/Sensing/FootSupportProvider/FootSupportProvider.cpp | /*
* @file FootSupportProvider.cpp
*
* This file implements a module that provides an abstract distribution of
* how much each foot supports the weight of the robot.
*
* The code is based on parts of the class BodyModel from the code of the
* team UNSW Australia.
*
* @author <NAME>
* @author <NAME>
*/
#incl... | ALGO | 0.951584 | 6.526043 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2013-12-29T18:24:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 213,
"forks": 137,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cd03b... |
3983d363-d88d-4fe3-bab3-8c19ade6a539 | Shree987/Year-of-CP | Days 91-100/Day 96/House Robber III.cpp | /*
Author : <NAME>
Problem name : House Robber III
Problem link : https://leetcode.com/problems/house-robber-iii/
Difficulty : Medium
Tags : Binary Tree, Depth-first Search, Dynamic Programming, Tree
*/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNod... | ALGO | 0.999958 | 5.741493 | {
"github_metadata": {
"branch": "main",
"commit_count": 229,
"repo_created_at": "2021-09-01T09:46: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": "841506b87c... |
d5467f8e-6454-4117-b7e1-0258f501c935 | annereinarz/ExaHyPE-Workshop-Engine | Submodules/Peano/src/peano/grid/AscendDescendLevelEnumerator.h | // This file is part of the Peano project. For conditions of distribution and
// use, please see the copyright notice at www.peano-framework.org
#ifndef _PEANO_GRID_ASCEND_DESCEND_LEVEL_ENUMERATOR_H_
#define _PEANO_GRID_ASCEND_DESCEND_LEVEL_ENUMERATOR_H_
#include "peano/grid/VertexEnumerator.h"
#include "tarch/loggi... | TOOL | 0.935622 | 6.945608 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-07-22T09:20:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed86d1919... |
5cef21ec-c698-42ff-aacf-d9b86ee31251 | cusiriScraffic/TrinityUniversityCS | Algorithms and Abstraction/Algorithms/crossCountryChallenge.cpp | #include <vector>
#include <tuple>
#include <algorithm>
#include <iostream>
using std::cout;
using std::min;
using std::vector;
using std::tuple;
using std::get;
void print(const vector<vector<int>>& x){
for (auto vec : x){
for (auto num : vec){
cout << num << "\t";
}
cout << "\n";
}
}
vector<ve... | ALGO | 0.999886 | 4.723465 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-07-12T22:00: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": "5c9795a38a... |
0613b229-1759-4733-a084-eb25900da9e9 | Apetrosia/CG-Lab12 | main.cpp | #include <SFML/Graphics.hpp>
#include <GL/glew.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <cmath>
// IDs шейдерной программы, VAO, VBO и EBO
GLuint Program, VAO, VBO, EBO;
GLuint modelLoc;
GLuint texture1;
GLuint texture2;
float mixFactor = 1.0f;
GLfloat M_PI = 3.14159265358979323846;
int... | TOOL | 0.934795 | 3.851764 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-12-10T11:42: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": "279eef35a87... |
6c596981-765c-4f30-ae88-6c14b5095d2b | benoxo/pat_exer | pat-a/1066 Root of AVL Tree (25)[AVLTree].cpp | #include <cstdio>
#include <cstdlib>
typedef struct Node {
int V;
struct Node *LChild, *RChild;
} *TNode, *PtrToNode, *Tree;
Tree AvlTree;
int Max(int A, int B) {
return A > B ? A : B;
}
int GetHeight(TNode node) {
if (node == NULL) return 0;
return Max(GetHeight(node->LChild), GetHeight(node->RC... | ALGO | 0.999972 | 3.835231 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-07-13T14:05:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "74ea627aec... |
5492e945-d6a7-4a2d-9a65-8e30dd8d5801 | mindspore-ai/mindspore | mindspore/ccsrc/plugin/device/ascend/kernel/aicpu/aicpu_ops/cpu_kernel/ms_kernel/flatten.cc | /**
* Copyright 2024 Huawei Technologies Co., Ltd
*
* 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... | TOOL | 0.916103 | 6.350019 | {
"github_metadata": {
"branch": "master",
"commit_count": 83896,
"repo_created_at": "2020-02-11T08:43:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4559,
"forks": 740,
"issues": 181,
"pull_requests": 20
},
"file_meta": {
"content_id": ... |
e7a13033-ba95-436c-822a-9a08d53a1ca8 | Farhan0140/XPSC | Week_4/Day_6/C_Jumping_on_Tiles.cpp | #include <bits/stdc++.h>
using namespace std;
//_______________________________________________________________________________________________
const int mod = 1e9 + 7;
#define pi 3.141592653
#define ll long long int
#define all(x) x.begin(),x.end()
#define out(x) (x=="\n")?cout<<"\n":cout<<x<<"\n";
#define inv(v) f... | ALGO | 0.999957 | 3.287715 | {
"github_metadata": {
"branch": "main",
"commit_count": 361,
"repo_created_at": "2024-10-26T14:16:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1d23cc34a0... |
5c695011-712a-4d85-bf45-aad11ee5fe01 | ovatman/BLG223E-2021 | L01/src/main.cpp | #include <iostream>
#include <stdio.h>
using namespace std;
void pointer_examples();
void array_examples();
void pass_by_ref_examples();
void afunc(int&,int&);
int main(){
//pointer_examples();
//array_examples();
pass_by_ref_examples();
return EXIT_SUCCESS;
}
void pass_by_ref_examples(){
... | TOOL | 0.93844 | 3.623672 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2021-07-11T17:21:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0248f27681d... |
d8b8a603-fb5f-4cdf-bd3f-80b0fc7950b9 | Xarma123/cp-practice | 348_-_Optimal_Array_Multiplication_Sequence.cpp | #include <bits/stdc++.h>
#define lol long long
using namespace std;
lol n;
lol dp[1005][1005];
map<lol, lol> b;
map<lol, lol> f;
void solve(pair<lol, lol> a[], lol i, lol j)
{
if (i >= j)
return;
if (i == j - 1)
{
return;
}
lol k;
for (k = i; k < j; k++)
{
lol v = dp... | ALGO | 0.998806 | 3.642842 | {
"github_metadata": {
"branch": "master",
"commit_count": 176,
"repo_created_at": "2022-09-18T23:21: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": "6751e5ba... |
1068eb8a-effb-42ce-a879-51086202f9cd | aiewing/LeetCode | LeetCode/面试题57-IIE. 和为s的连续正数序列 LCOF.cpp | //
// main.cpp
// Test
//
// Created by Aiewing on 2019/11/18.
// Copyright © 2019 Aiewing. All rights reserved.
//
/*
输入一个正整数 target ,输出所有和为 target 的连续正整数序列(至少含有两个数)。
序列内的数字由小到大排列,不同序列按照首个数字从小到大排列。
示例 1:
输入:target = 9
输出:[[2,3,4],[4,5]]
示例 2:
输入:target = 15
输出:[[1,2,3,4,5],[4,5,6],[7,8]]
限制:... | ALGO | 0.999832 | 5.156432 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2019-11-17T14:34:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b48df5424... |
dbff0fe5-8472-483b-af21-a8c5edff273c | yuukki2002/Ds | data structure/data structure/Graph/bfsProblem.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define MAXSIZE 10000
typedef struct Graph{
int vex[MAXSIZE];
int arc[MAXSIZE][MAXSIZE];
int vexnum, arcnum;
}Graph; // 邻接矩阵
typedef struct Queue{
int data[MAXSIZE];
int front, rear;
}Queue;
typedef struct ArcNode{
... | ALGO | 0.999131 | 4.14254 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-05-07T14:40:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b414a241bb95... |
ca15d24a-7635-4e00-95e5-e64533fce3ed | rodrichulo/6degs | 6degs.h | /* SixDegrees.h
*
*
* This file holds the outline for populating a collabgraph with an input file
* This estalishes a graph and executes commands through an input stream
* Commands include:
* DFS (Depth-first-Search)
* BFS (Breadth-first-search)
* Not (exclusion of artists, but still BFS)
*
*April 19th 2021... | ALGO | 0.974125 | 4.725541 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-09-18T03:18:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0bf0c219dbe... |
225ab9dc-82f3-4c05-9d07-dce93faf351e | hieulag15/21110448-lv10 | lv10-12.cpp | #include<iostream>
void NhapMang(int arr[][100], int &m, int &n);
void XuatMang(int arr[][100], int m, int n);
int TongCheoChinh(int arr[][100], int m, int n);
int TongCheoPhu(int arr[][100], int m, int n);
using namespace std;
#define Max 100
int main(){
int A[Max][Max];
int m,n;
NhapMang(A,m,n);
Xua... | ALGO | 0.999945 | 3.656481 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-11-17T10:34:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7bd3ee063e29... |
464493f8-bd37-4b8f-8817-4351c77d9bba | ItsLucas/acm | bjtunat4/B.cpp | #include <bits/stdc++.h>
using namespace std;
static constexpr int maxn = 100010;
struct Vector {
int x, y;
};
Vector pp[maxn], vc[maxn];
inline double dc(Vector a, Vector b) {
return 1.0 * a.x * b.y - 1.0 * a.y * b.x;
}
inline int xs(Vector a) {
if (a.x >= 0 && a.y > 0)
return 1;
if (a.x < ... | ALGO | 0.999995 | 3.982788 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2019-07-25T10:23: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": "3e0c5cef8... |
d6287534-0642-42a6-87db-567576b57693 | brandonbaez21/Programs-in-C | Calcula el factorial de un numero de forma interativa y recursiva.cpp | //programa que saca el factorial de un numero de forma interativa y recursiva
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include <iostream>
using namespace std;
// Factorial de un número entero
class factorial
{
float n;
public:
double facite(double n);
double facrecur(double n);
};
double factorial::faci... | ALGO | 0.998034 | 4.958225 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-01-05T06:22: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": "c5a5708e3611... |
44590593-ca8f-41d3-b72a-81f77fd37ab8 | sanjiv0286/Leetcode-Problem-Submissions | 0162-find-peak-element/0162-find-peak-element.cpp | #include <vector>
using namespace std;
class Solution {
public:
int findPeakElement(vector<int>& nums) {
int l = 0;
int h = nums.size() - 1;
while (l < h) {
int mid = (l + h) / 2;
if (nums[mid] >= nums[mid + 1]) {
// if mid is greater than the next e... | ALGO | 0.999898 | 6.102299 | {
"github_metadata": {
"branch": "main",
"commit_count": 1828,
"repo_created_at": "2023-10-14T19:45:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "092ec1e29... |
4c09fa7e-44e6-4f0d-b1fa-541714cf8fb9 | HekpoMaH/Olimpiads | grupa C/olimpiada/oblasten/2008/reshenija/Pleven/B/MMP/plates.cpp | #include<iostream>
#include<string>
using namespace std;
long m,n,i,j,br,l,q,w,r,k,fl;
string a,mas1[30],mas2[30],mas3[30],mas4[30],pl[30000],mas12[30],mas13[30],mas14[30],mas22[30],mas23[30],mas24[30];
string mas32[30],mas33[30],mas34[30],mas42[30],mas43[30],mas44[30];
long sra()
{
// 4 te osnovni masiva;
for(i=1... | ALGO | 0.999947 | 3.159216 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-10-04T16:17:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8beacba055... |
b301652a-9705-40aa-b438-dac784265e60 | AIFM-sys/AIFM | shenango/apps/parsec/pkgs/apps/facesim/src/Public_Library/Constitutive_Models/DIAGONALIZED_ISOTROPIC_STRESS_DERIVATIVE_3D.h | //#####################################################################
// Copyright 2004, <NAME>, <NAME>.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Cl... | ALGO | 0.944776 | 3.14565 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-10-12T02:03:30.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 122,
"forks": 37,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "539e7b4... |
8ee527c2-5b16-4dac-995b-e94be1651ffd | ISSMteam/ISSM | src/c/classes/kriging/Covertree.h |
#ifndef _COVERTREE_H
#define _COVERTREE_H
#include <map>
class Observation;
class Covertree{
/* Cover tree node. Consists of arbitrarily many points P, as long as they
* have distance 0 to each other. Keeps track of its children. */
class CoverTreeNode{
private:
//_childMap[i] is a vector of the node's ch... | ALGO | 0.995234 | 6.553372 | {
"github_metadata": {
"branch": "main",
"commit_count": 1904,
"repo_created_at": "2024-05-28T19:02:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 30,
"forks": 32,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "525aec63... |
b9648588-6757-4919-8c7a-8035ac33ea3e | LeeinUITk17/GitLAB | labmainCourse/hashtabledemo.cpp | #include <iostream>
#include <stdlib.h>
#define M 10
using namespace std;
struct Node {
int data;
Node* next;
};
Node* createNode(int initdata) {
Node* node = new Node;
node->data = initdata;
node->next = NULL;
return node;
}
typedef Node* hashtable[M];
void createHashtable(hashtable& hs) ... | ALGO | 0.999557 | 3.771274 | {
"github_metadata": {
"branch": "main",
"commit_count": 98,
"repo_created_at": "2023-04-09T14:00: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": "674b7d4f3eb... |
2ff3b8b2-6f63-405e-bd2b-cb3a8f3484aa | govinddwivedi-git/Codeforces-Solutions | B_Variety_is_Discouraged.cpp | #include <bits/stdc++.h>
using namespace std;
// Macros and constants
#define endl ("\n")
#define pi (3.141592653589)
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define mini(a, b, c) min(c, min(a, b))
#define... | ALGO | 0.999827 | 4.42678 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-07-02T15:35: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": "2cfd521f939... |
ec569363-e263-4a13-a472-093f16d16400 | MSV-Project/IBAMR | src/adv_diff/AdvDiffHierarchyIntegrator.h | // Filename: AdvDiffHierarchyIntegrator.h
// Created on 21 May 2012 by <NAME>
//
// Copyright (c) 2002-2013, <NAME>
// 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 o... | ALGO | 0.964261 | 4.890337 | {
"github_metadata": {
"branch": "msvtk",
"commit_count": 2193,
"repo_created_at": "2012-12-07T16:33:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f464b5c0... |
93665180-5968-4325-a1c0-0104d2995806 | cran/shrinkTVP | src/R_utilities.cpp | #include <RcppArmadillo.h>
#include <math.h>
using namespace Rcpp;
arma::vec pred_dens_mix_approx_dyn(arma::vec x_test,
arma::vec y_test,
arma::mat theta_sr,
arma::mat beta_mean,
arma::vec sig2_... | ALGO | 0.985823 | 5.32869 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-07-15T11:51:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4cc247405c... |
c5214ab8-7bfe-44c5-ab08-f077c06126c2 | PaddlePaddle/Paddle-Lite | lite/backends/arm/math/fp16/gemm_c8_fp16.cc | // Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... | ALGO | 0.980778 | 4.953453 | {
"github_metadata": {
"branch": "develop",
"commit_count": 7526,
"repo_created_at": "2017-09-20T11:41:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7124,
"forks": 1620,
"issues": 68,
"pull_requests": 17
},
"file_meta": {
"content_id": ... |
d31ab425-98db-48c7-974c-145e1486637c | JunBinLiang/Road-To-1900 | Leetcode/Linkedin/152-Maximum Product Subarray(M).cpp | class Solution {
public:
int maxProduct(vector<int>& nums) {
int ans = nums[0];
int p = 1;
//maximum negative
//minimum positive
int pos = -1, neg = 1;
for(int i = 0; i < nums.size(); i++) {
if(nums[i] == 0) {
p = 1;
pos = -... | ALGO | 0.99999 | 5.646351 | {
"github_metadata": {
"branch": "main",
"commit_count": 924,
"repo_created_at": "2024-09-25T02:23: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": "21c66f83db... |
609e90f5-865f-45a0-9195-691e19d0b28d | lzy831/LeetCode | 2023/T290.cc | #include "BaseHeader.h"
class Solution {
public:
bool wordPattern(string pattern, string s) {
vector<string> str_array;
splitString(s, str_array);
if (str_array.size() != pattern.size()) {
return false;
}
unordered_map<char, string> map1;
for (int i = 0; i < pattern.size(); i++) {
... | ALGO | 0.999023 | 6.107952 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2019-01-16T01:53: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": "051e39580... |
c96ee60f-0638-41d6-adbb-4b0a662664ae | peter1591/uva-online-judge | 10441/Project1/Project1/Source.cpp | #include <iostream>
#include <string>
#include <list>
#include <cassert>
class Graph
{
public:
struct ResultPathElement {
std::string word;
int next_vertex;
};
public:
Graph() {
for (int i = 0; i < max_vertics_; ++i) {
vertics_info_[i].in_degree = 0;
vertics_info_[i].out_degree = 0;
}
}
void AddWo... | ALGO | 0.999941 | 4.903666 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2016-07-01T09:34: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": "93dd9022d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.