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 |
|---|---|---|---|---|---|---|---|
080913dd-5a44-4d6d-a0a2-f68c6e203126 | Davidp1905/Sistemas-Operativos | Evaluación Rendimiento/prosesar_dat_a_CSV.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <bits/stdc++.h>
int main(){
std::vector<std::string> ejecutable = {"clasico", "transpuesta"};
std::vector<std::string> tamMatriz = {"200", "300", "500",
"750", "1000", "1500", "2000", "3000", "4000"};
std::vector<std::string> numHi... | ALGO | 0.960688 | 4.555752 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2024-01-28T18:14: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": "bb82b401d4... |
dbe63e29-cc00-456f-b7da-7864011f11b3 | sanskritividushi/CPP | COLLEGE DSA /DSLAB5.CPP | //WAP TO TRNASFORM INFIX TO POSTFIX
#include <iostream>
#define max 10
using namespaces std;
bool isOperator(char c)
{
return (c == '+' || c == '-' || c == '*' || c == '/');
}
int performOperation(int op1, int op2, char operation)
{
switch (operation)
{
case '+':
return op1 + op2;
case '-... | ALGO | 0.999387 | 4.013043 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2024-04-13T17:59: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": "01962b75e... |
f5da2798-08dc-45bb-a261-8f697e86bc88 | iamanujkumar/Codeforces | Splitting Items.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FAST_IO ios_base::sync_with_stdio(false); cin.tie(nullptr);
int main() {
FAST_IO
int q;
cin >> q;
while (q--) {
int n, k;
cin >> n >> k;
vector<ll> v(n);
for (int i = 0; i < n; i++) {
... | ALGO | 0.999976 | 4.450059 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2023-12-06T08:59: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": "ddd95a096f2... |
0e368309-ef6c-4a8e-b016-746b0b2464a1 | morris821028/UVa | OnlineJudge/ZEROJUDGE/a416. 6. 城市馬拉松.cpp | #include <stdio.h>
#include <vector>
using namespace std;
typedef struct {
int to, v;
} Arc;
vector<Arc> g[1001];
int n, m, st, ed;
int Nodd[22] = {};
void spfa(int st) {
queue<int> Q;
static int used[1001], dist[1001];
static int i;
for(i = 1; i <= n; i++)
used[i] = 0, dist[i] = 0xffff;
... | ALGO | 0.999961 | 3.637042 | {
"github_metadata": {
"branch": "master",
"commit_count": 1197,
"repo_created_at": "2013-06-14T12:34:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 571,
"forks": 269,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "660... |
f85c05a1-d3a8-4ebf-9866-25341a530a1c | asifahmedjesi/features_c_plus_plus | MyClasses/main.cpp | #include <bits/stdc++.h>
using namespace std;
void objectInitialization();
/*
* Special Member Functions:
*
* The default constructor and the destructor are both special member functions that the compiler will automatically provide
* for any class that does not explicitly define them.
*
* Four other special con... | TOOL | 0.972864 | 5.432795 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2023-08-15T10:57: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": "6220856261... |
3d28650f-9362-45d9-8849-5e8a5ff5885b | flameshimmer/Lint2015 | Lint2015/FirstBadVersion_Medium.cpp | #include "stdafx.h"
//The code base version is an integer start from 1 to n. One day, someone committed a bad version in the code case,
//so it caused this version and the following versions are all failed in the unit tests. Find the first bad version.
//
//You can call isBadVersion to help you determine which version... | ALGO | 0.986759 | 5.45525 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2015-07-28T02:46: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": "e37f36897... |
cad6146c-b7f5-4875-be91-ec9d074dfd0b | mcoder2014/myNotes | sources/Leetcodes/src/76_minimum_window_substring.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <unordered_map>
#include <limits>
using namespace std;
class Solution {
public:
string minWindow(string s, string t)
{
unordered_map<char, int> ch_in_t;
unordered_map<char, int> ch_in_s;
int count = 0,... | ALGO | 0.999954 | 6.841506 | {
"github_metadata": {
"branch": "master",
"commit_count": 194,
"repo_created_at": "2019-09-21T13:00:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ed6195b... |
74301acf-1ca3-45d6-a206-5eb7cd315e55 | tolerance93/LeetCode | House Robber/House Robber/main.cpp | /**
* Runtime: 3 ms, faster than 52.97% of C++ online submissions for House Robber.
* Memory Usage: 7.6 MB, less than 75.50% of C++ online submissions for House Robber.
*/
#include <vector>
#include <iostream>
using namespace std;
class Solution {
public:
int rob(vector<int>& nums) {
int n = (int) num... | ALGO | 0.999977 | 5.256491 | {
"github_metadata": {
"branch": "master",
"commit_count": 171,
"repo_created_at": "2021-01-10T07:42: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": "ba3ff7e6... |
d91a89a1-880b-4a7f-8123-def584334185 | synhyborex/memSim | memSim.cpp | #include "memSim.h"
using namespace std;
int main(int argc, char** argv) {
parseCommandLine(argc, argv);
init();
fillAddresses(argv[1]);
lookupAddress();
printResults();
clean();
}
void parseCommandLine(int argc, char* argv[]) {
switch(argc){
case 2:
frames = 256;
pra = FIFO;
brea... | ALGO | 0.966809 | 4.832305 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2014-02-24T01:22:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e2aca55a2... |
a0bc0d19-89ba-412a-86e0-0eb75d6291cc | Ayumu3746221/DES | BitUtils.hpp | #pragma once
#include <array>
#include <cstdint>
namespace des {
namespace BitUtils {
/**
* @brief 指定位置のビットを取得する(1始まりインデックス)
* @param data ビット列を格納する整数
* @param pos 1~64 の位置(左から数える)
* @return 取得したビット (0 or 1)
*/
uint8_t getBit(uint64_t data, int pos);
/**
* @brief 指定位置にビットを設定する(LSB=0 から起算)
* @param output ビット列... | ALGO | 0.99119 | 6.056712 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-05-18T10:53: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": "5ccca485467... |
75ba9b05-66d9-4726-a63c-6040bee4a890 | torodean/MIA | bin/utils/ml/MarkovModels.hpp | /**
* @file MarkovModels.hpp
* @author <NAME>
* @date 06/03/2025
* Description:
* This header defines generic functions for generating first-order
* and higher-order Markov models based on input sequences.
*
* The resulting model is represented as a nested unordered map structure,
* where the ... | ALGO | 0.989545 | 7.728112 | {
"github_metadata": {
"branch": "main",
"commit_count": 377,
"repo_created_at": "2025-05-19T20:40:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0086bd467... |
73da47b2-4b49-4a50-8263-c49175796159 | deepakVerma66/DSA-C-- | passByValue_Reference.cpp | #include<iostream>
using namespace std;
// pass by Value
//It leads to no change in the actual arguements
// void swap(int a, int b){
// int temp = a;
// a = b;
// b = temp;
// }
// int main(){
// int i = 6, j = 4;
// swap(i,j);
// cout<<i<<" "<<j<<".";
// return 0;
// }
//pass by refe... | ALGO | 0.999422 | 4.055164 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-08-01T09:16: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": "6a8051c85ce... |
5cb7b50e-8c31-47d0-b026-a4da8a0021e0 | ishandutta2007/codeforces-j | juanzhang/normal/980/E.cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int n, k, now, a[maxn], c[maxn], sz[maxn], fa[maxn], tid[maxn], dep[maxn]; bool vis[maxn];
vector <int> e[maxn];
void upd(int pos, int x) {
for (; pos <= n; pos += pos & -pos) {
c[pos] += x;
}
}
int query(int pos) {
int res = 0;
for... | ALGO | 0.999989 | 3.887112 | {
"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": "6cbf8238428f... |
278f16ce-9e75-4456-9f88-79beeaa118d4 | kuno4n/TopCoder | src/560-div1-250/TomekPhone.cpp | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
using namespace std;
#define SZ(x) ((int)x.size())
#define MSET(x,a) memset((x), (a), ... | ALGO | 0.999876 | 3.997648 | {
"github_metadata": {
"branch": "master",
"commit_count": 310,
"repo_created_at": "2012-10-04T08:58:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "626fece0... |
475fecf6-cf15-4c41-8c57-bac63e9d4562 | WhiZTiM/coliru | Archive2/35/5f5daa649f720e/main.cpp | #include <iostream>
#include <string>
#include <utility>
#include <map>
#include <memory>
#include <typeindex>
template < typename Key, typename Object >
class Factory{
private:
using FakeCreatorFunc = Object* (*)( );
struct RealKey {
RealKey() = delete;
Key first;
std::type_index second;
friend bool op... | TOOL | 0.906694 | 6.596042 | {
"github_metadata": {
"branch": "master",
"commit_count": 42630,
"repo_created_at": "2016-04-21T16:34:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "35487d... |
d8ce5a55-fbae-4fec-be08-e75d36ea329d | fextivity/codeforces-submissions | codeforces/1076/B.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fi first
#define se second
#define pb push_back
#define pob pop_back
#define mp make_pair
#define pque priority_queue
#define endl '\n'
#define For(i, a, b) for (int i = a; i < b; i++)
#define ForE(i, a, b) for (int i... | ALGO | 0.999906 | 3.774411 | {
"github_metadata": {
"branch": "master",
"commit_count": 1484,
"repo_created_at": "2020-12-21T15:42: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": "3db625c... |
824e3668-ab15-4a9c-a2d0-21687b289f3b | Shubby98/algo-CodingBlocks | hackerblocks/N-knight.cpp | #include<iostream>
#include<time.h>
using namespace std;
bool IsSafe(int arr[100][100],int n,int x,int y)
{
bool left = true, right = true, up = true, down = true;
if(x+2>n-1)
{
right = false;
}
if(x-2<0)
{
left = false;
}
if(y+2>n-1)
{
down = false;
}
if(y-2<0)
{
up = false;
}
if(right)
{
... | ALGO | 0.999554 | 3.845454 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-06-11T10:51:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57ca80c766... |
06ff606b-707c-431b-8619-9ae7e203569e | HotPotatoC/socs1.binus.ac.id | D5677-LG01-ASG_11-JKT/problem_b.cpp | #include <ctype.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define lld long long int
#define uint64 unsigned long long int
#define ENDL printf("\n")
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define IS_ODD(n) ((n) % 2 !=... | ALGO | 0.999616 | 3.755362 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2022-01-13T08:22: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": "4637bab606... |
28d89587-4f5d-4dca-996b-acf48c66da1e | eLtronicsVilla/Miscellaneous | CPP/constructor_and_destructor/virtual_copy_constructor2.cpp | /*
Virtual copy constructor
*/
#include <iostream>
usig namespace std;
class Base
{
public:
Base() {}
Virtual ~Base() {}
virtual void changeAttributes() = 0;
// the virtual constructor
static Base *Create(int id);
// the vi
virtual Base *Clone() = 0;
};
class Derived1: public Base
{
public:
Derived1()
{
... | TOOL | 0.934397 | 5.720329 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2018-12-16T11:11: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": "06516025b... |
b2baa8cc-432d-481e-93a8-b2a1470ca4df | dreyus95/AVSP_SourceQualityPrediction | CodeJamCrawler/dataset/09_6077_99.cpp | #include <iostream>
#include <vector>
#include <string>
#include <string.h>
#include <algorithm>
#include <sstream>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <bitset>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cfloat... | ALGO | 0.999525 | 3.358623 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2017-06-08T21:00: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": "7fc7b0e9f... |
6f868e9a-ef12-4eaa-93c1-dc5031bd9646 | SICSresearch/LatentREGpp | src/dichotomous/model/threepl.cpp | /*
* threepl.cpp
*
* Created on: Sep 20, 2016
* Author: milder
*/
#include "threepl.h"
namespace latentregpp {
namespace dichotomous {
threepl::threepl() : model(model_type::threepl, THREE_PARAMETERS) {}
double threepl::P(std::vector<double> &theta, const optimizer_vector ¶meters, int i) {
double g... | ALGO | 0.906576 | 5.223091 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2016-08-20T19:31:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "361e50c63... |
340bfba2-e81f-4ae6-80c0-f3784f4a2ec7 | Aman-chatterjee/DFAEmailValidator | emailChecker.cpp | #include <iostream>
#include <string>
#include <cctype>
#include <vector>
using namespace std;
bool isSpecialChar(char c) {
const string validSpecialChars = "!#$%&'*+-/=?^_{}|";
return validSpecialChars.find(c) != string::npos;
}
bool isValidEmail(const string& email) {
enum State { START, LOCAL, AT, D... | ALGO | 0.953042 | 5.4045 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-04-17T14:11:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "266384fd4e5... |
d9840212-c4a3-41d6-89c1-4c20dcf5b505 | Madan-2004/DAA-LAB | LAB-8/Q1/Q1.cpp | # include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
struct DS{
int* parent, * rank;
int n;
DS(int n){
this->parent = new int[n];
this->rank = new int[n];
this->n = n;
for(int i=0; i<n; i++){
parent[i] = i;
rank[i] = 1;
... | ALGO | 0.99994 | 4.48571 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-01-13T18:23:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3b28600aa4c... |
7881bd63-5a43-4115-877b-d2c02f02be40 | oznakn/metu-hw | ceng213/pa3/src/HashUtils.cpp | // This file will be overwritten while running and evaluating, do not modify!
#include <cmath>
#include <limits>
#include "HashUtils.h"
const int Primes[] = { 353, 431, 521, 631, 761, 919,
1103, 1327, 1597, 1931, 2333, 2801, 3371, 4049, 4861, 5839, 7013, 8419, 10103, 12143, 14591,
... | ALGO | 0.98763 | 5.515695 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2019-10-29T11:07:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5499220d... |
cbe6d11d-f66b-4c2e-8c0d-6c4d71e54358 | raincross7/code-similarity | codes/train_code/problem406/problem406_212.cpp | #include <stdio.h>
#include <iostream>
using namespace std;
long long a[100010];
long long mask[61];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int n;cin >> n;
for (int i=0;i<n;++i)
cin >> a[i];
long long ans=0;
long long tmp=0;
for (int i=0;i<n;++i)
tmp^= a[... | ALGO | 0.999958 | 3.475137 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "289a3c5fa9d9... |
42a8a863-00fa-4626-bece-c11151b8948e | NTU-ALComLab/JoRGS | src/io.cpp | #include "headers.h"
/* ===== Function Description:
Read from a bit list file. (for testing the program)
Side feedback: return the cost of pure-adder method.
*/
float Optimizer::importBitList(const string& file_name) {
float adder_cost = 0;
ifstream in_file(file_name, ios::in);
if (!in_file.good()) {
cerr << "... | ALGO | 0.930228 | 3.899818 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-11-04T03:24:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa19ec3f317... |
c608a309-38ab-4e25-97f5-51496a463f64 | intellhave/ProBLM | include/twoview_models.h | #ifndef TWOVIEW_MODELS_H
#define TWOVIEW_MODELS_H
#include "common_utils.h"
#include <Eigen/Core>
#include <Eigen/Dense>
#include<random>
#include<ctime>
#include<chrono>
#include<vector>
#include "Base/v3d_image.h"
#include "Math/v3d_nonlinlsq.h"
struct TwoViewModel
{
TwoViewModel(std::vector<Vec3> co... | ALGO | 0.932272 | 5.666818 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-09-29T12:15:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39bce9f02... |
6cc58a0b-8bcf-48e9-b85f-b73f92d43e81 | codemonkeyricky/lc | 2380.cpp | #include <iostream>
#include <vector>
#include <cassert>
#include <stack>
#include <queue>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <cmath>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
... | ALGO | 0.999959 | 4.709575 | {
"github_metadata": {
"branch": "main",
"commit_count": 126,
"repo_created_at": "2024-11-11T05:29: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": "1483e1da85... |
608022bb-dfd5-4b6f-9abc-255e7753a075 | msesia/knockoffgwas | snpknock2/src/family_knockoffs.cpp | #ifndef _FAMILY_KNOCKOFFS_CPP
#define _FAMILY_KNOCKOFFS_CPP
#define DEBUG 0
#include "family_knockoffs.h"
FamilyKnockoffs::FamilyKnockoffs(const vector<int> & _indices, const IbdCluster& ibd_cluster,
const vector< vector<int> > & _Z, const vector< vector<double> > & _alpha,
... | ALGO | 0.951928 | 4.75808 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2020-07-21T16:05:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "17ef50c9... |
9749c53d-82b1-46ef-b26a-630e2b96cfd4 | caiwaifung/algo | cf/572/b.cpp | #include <cassert>
#include <algorithm>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
#define all(a) a.begin(), a.end()
#define rep(i, a, b) for(int i=int(a); i<=int(b); ++i)
#define irep(i, a, b) for(int i=int(a); i>=in... | ALGO | 0.99982 | 3.138195 | {
"github_metadata": {
"branch": "master",
"commit_count": 608,
"repo_created_at": "2015-05-10T11:28:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9914a48d... |
8cb34d3b-1d75-443c-8d50-5ab43deab524 | ishreya09/DSA | Notes/associative_container/sort_map2.cpp | /*
Method 2 – using the set of pairs The idea is to insert all the (key-value)
pairs from the map into a set of pairs that can be constructed using a comparator function
that orders the pairs according to the second value.
Below is the implementation of the above approach:
*/
// C++ program for the above approach
... | ALGO | 0.999976 | 5.432504 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2022-07-29T19: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": "074257df... |
687fddc6-d2c6-4b85-9d4e-469db9b974f4 | wberdnik/My-first-programs | 26.06.1997_cpp-diplom-widows96_joke/CONCENT.CPP | #include<math.h>
#include<string.h>
#define MATHH
#define STRINGH
#include"bitmap.hpp"
#include"concent.hpp"
#include"button.hpp"
#include"tkeys.h"
#include"desktop.hpp"
#include"group.hpp"
#include"linebar.hpp"
#include"function.hpp"
#include"basedata.hpp"
#include"sourse.hpp"
#include"diagnost.hpp"
#pragma hdrstop
... | ALGO | 0.976423 | 3.124352 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2021-11-04T12:34: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": "caf89c608e83... |
46fe9067-f059-4d68-bdb2-11deab2a904d | Anguei/OI-Codes | LuoguCodes/P1250.cpp | // luogu-judger-enable-o2
#include <cmath>
#include <cctype>
#include <cstdio>
#include <cstring>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <string>
#include <vector>
#include <numeric>
#include <iomanip>
#include <iostream>
#include <algorithm>
#define fn "testdata"
#define ll long long
... | ALGO | 0.999858 | 3.735255 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-02-14T14:22:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a44e8e3a7... |
1600d26a-8679-41a4-b0f1-5de9afadc86a | gonestar321/45-Days-DSA | 0227-basic-calculator-ii/0227-basic-calculator-ii.cpp | //Comment & Upvote
class Solution {
public:
int calculate(string s) {
int sum = 0;
long long last = 0, last_result = 1;
char last_operator = '+'; //we need to remember the last operator
//base case
if(s.size() < 1) return sum;
int i = 0, sign = 1;
//Tr... | ALGO | 0.999957 | 4.740693 | {
"github_metadata": {
"branch": "main",
"commit_count": 330,
"repo_created_at": "2024-07-28T10:33: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": "2f58b15e76... |
31add81e-a205-457d-b745-9e70b35ee22a | houqingyuan/hqy | hqy.cpp | #include <iostream>
#include <string>
using namespace std;
struct Word
{
string Str;
int Count;
};
void CalcCount(Word *words,string &newWord,int size)
{
int i=0;
for(;i<size;i++)
{
if(words[i].Str==newWord)
{
words[i].Count++;... | ALGO | 0.999648 | 3.649456 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-05-31T14:51:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7be9014e34... |
a555a8a1-da71-4835-b278-85cc1e9cf96c | RiteshKafle1/DSA-CPP | Searching_andSorting/upperBound.cpp | #include <iostream>
#include <vector>
using namespace std;
int findUpperBound(vector<int> arr, int target)
{
int low = 0;
int high = arr.size() - 1;
int answer = arr.size(); // just a assumption
int mid = low + (high - low) / 2;
while (low <= high)
{
if (arr[mid] > target)
{
answer = mid;
... | ALGO | 0.99959 | 5.607782 | {
"github_metadata": {
"branch": "dsa",
"commit_count": 135,
"repo_created_at": "2025-04-09T06:14: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": "1c568d4e5ba... |
f1f4eefe-e82c-4778-88eb-8c694ebfbd7e | julesmorel/dtm_pybind11 | cpp/core/quadtree.cpp | /****************************************************************************
Copyright (C) 2017 <NAME>
Contact : <EMAIL>
Developers : <NAME> (IFP LSIS)
This file is part of PluginIFPLSIS library.
PluginIFPLSIS is free library: you can redistribute it and/or modify
it under the terms of the GNU Lesser General... | ALGO | 0.999037 | 5.083238 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2022-02-14T19:23:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c233ec9b... |
b663c542-9dc3-4900-995f-e2d894b81ef8 | IntelLabs/hexl | hexl/include/hexl/eltwise/eltwise-reduce-mod.hpp | // Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <stdint.h>
namespace intel {
namespace hexl {
/// @brief Performs elementwise modular reduction
/// @param[out] result Stores the result
/// @param[in] operand Data on which to compute the elementwise modular
/// re... | ALGO | 0.951213 | 7.086987 | {
"github_metadata": {
"branch": "development",
"commit_count": 174,
"repo_created_at": "2021-03-26T00:01:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 238,
"forks": 53,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2... |
92d59976-d12a-4e45-aff8-0b16b45fbc7d | tanyarajhans/LeetCode | 0044-wildcard-matching/0044-wildcard-matching.cpp | class Solution {
public:
bool solve(int i, int j , string &s, string &p, vector<vector<int>>&dp){
if(i<0 && j<0){
return true;
}
if(i>=0 && j<0){
return false;
}
if(i<0 && j>=0){ // check if all stars or not
for(int idx = j; j>=0 ;j--){
... | ALGO | 0.999992 | 5.350641 | {
"github_metadata": {
"branch": "main",
"commit_count": 1801,
"repo_created_at": "2021-01-10T12:56:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 944,
"forks": 202,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "ec9b0... |
72e82f05-2155-40da-8261-f9586d5b01c4 | michaelcwatts123/Course_Scheduler | Distributions.cpp | //
// Distributions.cpp
// Project_Part1
//
// Created by <NAME> on 3/16/19.
// Copyright © 2019 <NAME>. All rights reserved.
//
#include "Distributions.hpp"
vector<Student> uniform(vector<Student>& students, int numCoursePerStudent, int numCourse){
random_device rand;
mt19937 gen(rand());
uniform... | TOOL | 0.916241 | 3.800681 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-04-15T04:42: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": "f98fb4be84... |
324f21c1-df4e-4068-9b1d-ff8461fefc4d | 12562/ELEC-8590 | KL_algorithm/include/KL_bipartition_main.h | #include <limits>
#include <iostream>
#include <vector>
#include "KL_graphHelper.h"
void get_largest_decrease_cutcost_exchange_nodes(std::vector<NodeKL*> A, std::vector<NodeKL*> B, float * max_gain, NodeKL ** ELE1, NodeKL ** ELE2, unsigned int num_nodes) {
NodeKL node1, node2;
float gain;
*max_gai... | ALGO | 0.999271 | 3.497801 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2021-04-19T15:07:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "89f86cf4b... |
f9dd741e-c400-4e51-aafb-81c6e4390ff9 | nival/Prime-World | pw/branches/r1117/Vendor/boost/libs/spirit/example/qi/mini_c/mini_c.cpp | /*=============================================================================
Copyright (c) 2001-2010 <NAME>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=================================================... | TOOL | 0.930246 | 5.934479 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-09-20T17:05:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 154,
"forks": 62,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc84270d8... |
d3a972e2-5fe9-4f96-8e96-78017ff757ee | shreyask21/iotvitalsmonitoring | Analog_Frontend/include/autoranging.hpp | #include <deque>
#include <algorithm>
#include <inttypes.h>
#ifndef __ANALOG_AUTORANGE_H
#define __ANALOG_AUTORANGE_H
template <typename dtype>
class AnalogAutoRanging
{
private:
std::deque<dtype> samplebuf_dq;
size_t dq_max_size = 5;
dtype min_ele, max_ele;
bool autoranged = false;
int32_t map(int... | TOOL | 0.948969 | 5.912743 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-12-08T19:54: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": "f32c89c7a0cc... |
aa50a913-52cd-4a65-898b-19a522a69c56 | kifah-s/Fundamentals_Of_Programming | Gammal_Tech_Academy/Core_Courses/3_Data_Structures/Sec_2_Dynamic_Memory_Allocation/Les_11_Dyn_Mem_All/Exercises/Pro_2_Dyn_All_Mem_For_Integer_2_Program/Dyn_All_Mem_For_Integer_2_Program_V1.cpp |
//* Dynamically Allocates Memory For Integer 2 Program (Version 1).
/*
* Write a program that prompts the user to enter an integer 'num' and then prints the odd numbers from 1 to 'num' in ascending order.
! Output:
! Please, enter a number: 8
! Output:
! Odd numbers form 1 to 8 is: 1 3 5 7
*/
#include <iostream>
#... | ALGO | 0.992467 | 5.067607 | {
"github_metadata": {
"branch": "main",
"commit_count": 2110,
"repo_created_at": "2023-04-07T14:22:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a28e2038a... |
0267d921-2807-42a6-bfd7-2b89920d8d30 | rwth-i6/rasr | src/Tools/Aligner/Common.cc | /** Copyright 2020 RWTH Aachen University. All rights reserved.
*
* Licensed under the RWTH ASR License (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.hltpr.rwth-aachen.de/rwth-asr/rwth-asr-license.html
*
* Un... | ALGO | 0.978572 | 5.268113 | {
"github_metadata": {
"branch": "master",
"commit_count": 264,
"repo_created_at": "2020-08-10T08:34:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 57,
"forks": 16,
"issues": 7,
"pull_requests": 12
},
"file_meta": {
"content_id": "d55022... |
33070efb-f2b0-4932-aba0-bd9a710291c0 | SCS367/MyFileServer | src/http/HttpContext.cc | #include "HttpContext.h"
#include "Buffer.h"
// 解析请求行
bool HttpContext::processRequestLine(const char *begin, const char *end)
{
bool succeed = false;
const char *start = begin;
const char *space = std::find(start, end, ' ');
// 不是最后一个空格,并且成功获取了method并设置到request_
if (space != end && request_.setMe... | WEB | 0.905305 | 3.802826 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-07-19T08:43:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d51c553cd0... |
5acaaa87-69e4-47f1-8d74-630c9e9b5a58 | Soumen8603/DSA_QUES | Count Number of Bitwise Or Subsets.cpp | class Solution {
public:
int maxOrValue; // To store the maximum OR value calculated from all numbers
int subsetCount; // To store the count of subsets whose OR equals maxOrValue
vector<int> numbers; // To store the input numbers
int countMaxOrSubsets(vector<int>& nums) {
numb... | ALGO | 0.999986 | 6.286656 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2024-04-04T10:59:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e833e6dbe... |
368d07f6-1874-4ff1-aa44-47d89178fa1a | zxysnow/leetcode | 164-maximum-gap.cpp | class Solution {
public:
int maximumGap(vector<int>& nums) {
if (nums.size() < 2)
return 0;
int max_value = INT_MIN;
int min_value = INT_MAX;
for (int i : nums) {
max_value = max(max_value, i);
min_value = min(min_value, i);
}
if (m... | ALGO | 0.99988 | 5.466515 | {
"github_metadata": {
"branch": "master",
"commit_count": 280,
"repo_created_at": "2015-01-04T05:35:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 15,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14fe7d4... |
328379d3-f08e-4200-9dab-9463527c6afd | NikosBougatsas/ProgIntro | 7η σειρά/Ασκηση 38 (elev2)/elev2_n2.cpp | //O(n^2) solution
#include <iostream>
using namespace std;
int main() {
int N, B, count = 0;
cin >> N >> B;
int a[N];
for (int i = 0; i < N; i++) {
cin >> a[i];
}
for (int i = 0; i < N - 1; i++) {
bool swaps = false;
for (int j = N - 2; j > i - 1; j--) {
... | ALGO | 0.999994 | 3.615566 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2023-03-15T16:44:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19c8235a45... |
55d6acc7-aa8f-40f7-9192-bec232d4fc79 | jobsdone25/code_repository | 240108/올바른 등식 만들기/right-equality.cpp | #include<iostream>
#include<climits>
#define MAX_N 100
#define MAX_M 20
#define OFFSET 20
using namespace std;
long long dp[MAX_N + 1][MAX_M + 1 + OFFSET];
// dp[i][j] --> i번째 까지 고려했을 때 합이 j가 되는 수의 최대 수
int number[MAX_N + 1];
int main() {
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> number[i]... | ALGO | 0.999985 | 3.948689 | {
"github_metadata": {
"branch": "main",
"commit_count": 614,
"repo_created_at": "2023-12-27T15:21: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": "cf98c38694... |
dabc5513-365c-4d32-832e-386c20786eab | ak2798094/KoksalAttila_CIS17A_43396 | Book/Midterm/Problem3(Mode)/StatStructureStub_V1/main.cpp | /*
* File: main.cpp
* Author: <NAME>
* Purpose: Driver program to test out the statistics problem.
*/
//Libraries
#include <iostream>//I/O
using namespace std;
//User Libraries
#include "Array.h"
#include "Stats.h"
//No Global Constants
//Function Prototypes I supply
Array *fillAry(int,int); //Fill a... | ALGO | 0.995266 | 3.650488 | {
"github_metadata": {
"branch": "master",
"commit_count": 352,
"repo_created_at": "2021-02-19T05:14: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": "c2a05f04... |
d80c7138-8831-4b27-ac9a-c2e17af7c60b | RosettaCommons/rosetta | source/src/apps/public/sewing/ligand_sewing_tools/backside_hbond_finder.cc | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | ALGO | 0.997956 | 5.633747 | {
"github_metadata": {
"branch": "main",
"commit_count": 11737,
"repo_created_at": "2023-11-17T16:42:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 296,
"forks": 100,
"issues": 27,
"pull_requests": 9
},
"file_meta": {
"content_id": "1c8c... |
6e28cee5-c7b7-4a8f-a25f-366810ad7834 | jakobrj/GPU_INSCY | src/algorithms/Clustering.cpp | #include <ATen/ATen.h>
#include <torch/extension.h>
#include <set>
#include <map>
#include "../utils/util.cuh"
#include "../structures/SCY_tree.h"
#include "../structures/Neighborhood_tree.h"
#include "Clustering.h"
#define BLOCK_WIDTH 64
#define PI 3.14
using namespace std;
float dist(int p_id, int q_id, at::T... | ALGO | 0.999312 | 5.950882 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2020-10-07T06:11: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": "676a41e4311... |
b8152a35-5f7d-4623-8fcf-2e24b94faa31 | aryanshukla7/DBMS-ALGOS | FDPreservation.cpp | #include <iostream>
#include <string.h>
#include <vector>
#include <set>
using namespace std;
bool isSubset(string x, string y) {
int lenx = x.length();
int leny = y.length();
int count = 0;
for(int i = 0; i < lenx; i++){
bool has = false;
for(int j = 0; j < leny; j++){
if(x[i] == y[j]){
... | ALGO | 0.999461 | 5.001874 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-12-08T13:08: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": "ad2a19781e... |
b20f79ee-805e-46da-a0a8-1fbe06f7710a | winterant/Huawei-Codecraft-2022 | round1/SDK_CPP/CodeCraft-2022/backup/0322-greed-zkw-463523-good.cpp | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> PII;
const int64_t INF = (1LL << 40);
bool DEBUG = true; // 标记是否线下
// 去除字符串首尾空白符
string strip(string &str)
{
auto is_white = [](char ch)
{
return ch == ' ' || ch == '\r' || ch == '\n' || ch == '\t';
};
int i = 0, j = str.lengt... | ALGO | 0.996784 | 3.637717 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-08-15T02:44: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": "03a4b52187... |
f5e44143-98c8-48b7-ae13-73fb8939d044 | metehkaya/Algo-Archive | Problems/LeetCode/Solutions/2131.Longest_Palindrome_by_Concatenating_Two_Letter_Words.cpp | class Solution {
public:
int cnt[26][26];
int longestPalindrome(vector<string>& words) {
int n = words.size();
for( int i = 0 ; i < n ; i++ ) {
int a = words[i][0]-'a';
int b = words[i][1]-'a';
cnt[a][b]++;
}
int ans = 0;
for( int i = 0... | ALGO | 0.999975 | 5.456998 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2023-04-04T19:44: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": "abcfb08b963... |
92f6c50f-d860-47b7-aead-8ba51e9a6681 | mario86123/SourceCode | MSTModel.cpp | #include "MSTModel.h"
#include "Tools.h"
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <list>
#include <vector>
using std::cerr;
using std::cout;
using std::endl;
/*
* Class constructor.
*/
CMSTModel... | ALGO | 0.999554 | 4.63325 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2022-07-19T07:40: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": "7070fa277... |
73da4f01-1412-45d7-a984-a72c8f61c5bf | ASSERT-KTH/Supersonic | predictions/submissions-aizu-coop-gpt4/Codenet/p01305/144296688/response_6.cpp | #include <algorithm>
#include <cstdlib>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for (int l = 0; l < n; l++) {
int a[2][9];
double winrate1 = 0, winrate2 = 0;
for (int j = 0; j < 2; j++)
for (int k = 0; k < 9; k++)
cin >> a[j][k];
sort(a[1], a[1] + 9)... | ALGO | 0.999767 | 3.226472 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-02-03T10:33:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5849a525a3101... |
be771858-2411-40dc-b2cd-12c96d23cee9 | speedbyte/VirtualTestDriveFramework | include/segmentation/RegionGrow.h | //
// Created by geislerd on 06.03.17.
//
#ifndef REGIONGROW_H
#define REGIONGROW_H
#include <core/Node.h>
#include <utils/Image.h>
namespace saliency_sandbox {
namespace segmentation {
using namespace saliency_sandbox::utils;
static std::vector<cv::Scalar> generateColors(size_t n) {
... | ALGO | 0.98514 | 6.043812 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2019-07-25T19:58:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f1973c03... |
c6afcec7-4650-41cd-99d9-44e776231b3b | Sainiankushgithub/DSA-Self-paced | Dsa_gfg/Sorting/ques9.cpp | // MERGE TWO SORTED ARRAY EFFICIENT WAY
#include<bits/stdc++.h>
using namespace std;
void display(int arr[],int n)
{
for(int i=0;i<n;i++)
{
cout<<arr[i]<<" ";
}
cout<<endl;
}
void merge(int arr1[],int arr2[],int n1,int n2)
{
int i=0,j=0;
while(i<n1&&j<n2)
{
if(arr1[i]<=arr2[j... | ALGO | 0.999947 | 4.594845 | {
"github_metadata": {
"branch": "main",
"commit_count": 749,
"repo_created_at": "2022-10-28T17:24:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22fd930e56... |
dfd3cd99-a1b2-4e6d-be45-a1c5240b5623 | ChepelevAlexandr/graph-visualization | Alhorithm.cpp | #include "DrawingFunctions.h"
std::vector<std::vector<double>> Alhorithm::forceDirectedGraphDrawing(const std::vector<std::vector<int>>& A, double k, int iterations) {
std::vector<std::vector<double>> positions(A.size(), std::vector<double>(2));
std::vector<std::vector<double>> forces(A.size(), std::vector<double>(2... | ALGO | 0.999524 | 5.144559 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-24T13:55: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": "22de77cc3446... |
cfcebea2-87aa-4d9a-9037-c9bb0269cbd0 | Mysterioucz/2110327-ALGORITHM-DESIGN- | Grader/ex07m2_15puzzle/main.cpp | #include <bits/stdc++.h>
using namespace std;
int x,y;
int res = 50;
vector<pair<int,int>> dir = {{0,-1},{0,1},{-1,0},{1,0}};
unordered_map<string,bool> visited;
bool check_generated(const vector<vector<int>> &b){
string s = "";
for(int i = 0;i < 4;i++){
for(int j = 0;j < 4;j++){
s += to_... | ALGO | 0.999963 | 4.530402 | {
"github_metadata": {
"branch": "main",
"commit_count": 110,
"repo_created_at": "2025-01-20T02:47: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": "04679bcc4c... |
664e1bf1-afcd-4dfe-972a-bddd9a624a5a | AvulaCharan06/DataStructures_and_Algorithms | 0543-diameter-of-binary-tree/0543-diameter-of-binary-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999893 | 6.551724 | {
"github_metadata": {
"branch": "main",
"commit_count": 142,
"repo_created_at": "2024-12-31T02:55: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": "8df3a53658... |
8e9662c7-7431-4c77-88f0-44da119d01fc | Menci/SummerProgrammingPractice2020 | code/2019201418/主要代码/Search.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <map>
#include <queue>
#include <fstream>
using namespace std;
const double eps = 1e-7;
double V[605],S[9500],A[605],T[9500],VB[605],B[605];
int R[605],R2[605],IR[605],TotalTF[9500],TotalPTF[9500];
bool Eps(double ... | ALGO | 0.995859 | 3.379297 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2020-06-15T04:40:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 14,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd16c7f... |
d92f907d-1c51-4920-b62a-9e55ef332268 | hakank/hakank | gecode/who_killed_agatha2.cpp | /*
Who killed agatha? (The Dreadsbury Mansion Murder Mystery) in Gecode.
This is a standard benchmark for theorem proving.
http://www.lsv.ens-cachan.fr/~goubault/H1.dist/H1.1/Doc/h1003.html
"""
Someone in Dreadsbury Mansion killed Aunt Agatha.
Agatha, the butler, and Charles live in Dreadsbury Mans... | ALGO | 0.999991 | 3.665391 | {
"github_metadata": {
"branch": "master",
"commit_count": 616,
"repo_created_at": "2013-08-06T20:12:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 381,
"forks": 78,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "394b4... |
ab97325a-a339-460a-a56d-155b95abeebb | debabrota1604/C-_STL_Study | leetCode/testFile.cpp | #include<bits/stdc++.h>
using namespace std;
//short modules
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define CY cout << "YES"
#define CN cout << "NO"
#define REP(i,a,b) for(int i=a; i<=b; i++)
typedef long long ll; // Bcoz defining a long long int initialized to 1 at any eqn require... | ALGO | 0.994311 | 3.108754 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2022-03-03T12:28:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d367410c7... |
a4f9fd82-efab-45f2-bc3b-ebec4c486c1f | PositivelyBookish/AU2140213_VanajaAgarwal_DSA_Lab | LAB6/Q2.cpp | //AU2140213 <NAME>
//Q2.
#include <bits/stdc++.h>
using namespace std;
// Function to fill the array elements into a hash table
// using Quadratic Probing to handle collisions.
vector<int> QuadraticProbing(int hashSize, int arr[], int sizeOfArray)
{
vector<int> hash(hashSize);
for (auto &x : hash)
{
... | ALGO | 0.999647 | 5.097719 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2022-08-26T18:45:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0ffb4eaffc6... |
e822c11d-aa43-4f4f-b220-c3b39d146e46 | praktikum-alpro-1d-2022/1d-tugas7-farhan-ramadhan-praditya | transpose_matriks.cpp | //NPM-2210631170120
//Kelas-1D
//<NAME>
#include <iostream>
using namespace std;
void garis()
{
cout << "------------------" << endl;
}
int main()
{
int h, j, k, l, matriks[10][10], transpose[10][10];
cout << "Transpose Matriks" << endl;
garis();
cout << "Masukkan Jumlah Baris Matriks : ";
... | ALGO | 0.999527 | 4.597287 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-11-23T14:17:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1aa7bfea56965... |
cf039da5-1a80-4858-ba23-addb79f3317c | af-orozcog/competitiveProgramming | CodeForces/div3/1328D.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
typedef pair<ll,ll> pi;
int main(){
int t;
scanf(" %d",&t);
while(t--){
int n;
scanf(" %d",&n);
int nums[n];
int ans[n];
for(int i = 0; i < n;++i) scanf(" %d",&nums[i]);
int dif = 1;
in... | ALGO | 0.999959 | 3.136514 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2019-08-19T16: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": "da399e7cb... |
019f5ccf-d404-4b02-a09e-5d8a3a3e33be | FarmerJohnLYH/shareOI | JZOJ/2019.1.28/5097.cpp | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define oo 2139062143
#define sqr(x) ((x)*(x))
#define lowbit(x) ((x)&(-x))
#define abs(x) (((x)>=0)?(x):(-(x)))
#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))
#define fo(i,x,y) for (int i = (x);i <= (y);++ i)
#defi... | ALGO | 0.999994 | 3.575307 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-30T21:00:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "386619ca2f8c... |
1010d53b-d72f-4cd2-8648-bb2ec12c8b8f | wyjoutstanding/Algorithm | AlgorithmNote/AlgorithmNote-Code/第3章 入门模拟/简单模拟/B1018.cpp | #include <cstdio>
#include <map>
using namespace std;
int main() {
int n;
scanf("%d", &n);
char ca, cb;//甲乙手势
int win, draw, fail;//甲的胜平负次数
win = draw = fail = 0;
map<char, int> mp[2];//记录甲乙胜利的手势策略
for(int i = 0; i < 2; i++) {
mp[i]['J'] = 0;
mp[i]['C'] = 0;
mp[i]['B'] = 0;
}
for(int i = 0; i < n; i+... | ALGO | 0.999967 | 3.11396 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2020-01-20T13:40:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 55,
"forks": 11,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "c91c47d... |
31c883ef-fff6-4148-b41a-434dff4dff0b | nelmiux/Game-Life | TestLife.c++ | // --------
// includes
// --------
#include <iostream> // cout, endl
#include <sstream> // istringtstream, ostringstream
#include <string> // string
#include <utility> // pair
#include "gtest/gtest.h"
#include "Life.h"
using namespace std;
bool input = false;
vector<string> results;
// -----------
// TestLi... | TEST | 0.928464 | 5.279383 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2015-11-11T04:22:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a6db1c59... |
19966742-f243-485c-91c5-d342e60f9039 | ameerahaider/Optimizing-Land-Use-A-Comparative-Study-of-Dynamic-Programming-Techniques-for-Maximizing-Profit | Part3.cpp | /*
<NAME>
20I-0799
Algo F
Project
Question# 2
Part 3 Bottom Up Approach
*/
#include<iostream>
#include <bits/stdc++.h>
#include<math.h>
using namespace std;
int max(int a, int b) { return (a > b)? a : b;}
int cutLand (int rates[], int n) {
int table[n+1];
table[0] = 0;
int i, j;
for (i = 1; i <= n; i++... | ALGO | 0.999391 | 3.710813 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-08-17T18:12: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": "9265a5418250... |
20a34d42-7a2a-449b-ba86-23e91d12fac3 | PhantomOrion2000/DSA | Arrays/75. Sort Colors.cpp | class Solution {
public:
void sortColors(vector<int>& nums) {
int low = 0, high = nums.size() - 1, mid = 0;
while(mid <= high){
switch(nums[mid]){
case 0:
swap(nums[mid++], nums[low++]);
break;
case 1:
... | ALGO | 0.999989 | 5.948227 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2022-07-03T14:21: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": "5ff5fc014b9... |
b04cdb5e-fc78-4ced-8307-cf4d7c13da73 | shinhong-gyu/AlgorithmTheory | 9.RedBlackTree/RedBlackTree.cpp | #include "RedBlackTree.h"
Node* RedBlackTree::nil = nullptr;
Node* RedBlackTree::CreateNode(int data, Color color = Color::Red)
{
Node* newNode = new Node(data, color);
newNode->SetLeftChild(nil);
newNode->SetRightChild(nil);
return newNode;
}
RedBlackTree::RedBlackTree()
{
if (nil == nullptr)
{
nil = new ... | ALGO | 0.993632 | 4.869176 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-02-06T07:38: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": "dae141db672d... |
bbbb71e8-57db-4d21-906b-1f3f57d56401 | Aamiruem/Apna-College-Plus-Library | L5MicrosoftMedium/CPP/LinkedListCycle.cpp | #include <iostream>
using namespace std;
// Definition of a ListNode
struct ListNode
{
int val; // Value of the node
ListNode *next; // Pointer to the next node
// Constructor
ListNode(int x) : val(x), next(nullptr) {}
};
class LinkedListCycle
{
public:
// Method to detect if a cycle exist... | ALGO | 0.999372 | 6.491668 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2025-01-12T05:05:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0ea0e0577b... |
6dac485b-1c91-4a74-aaba-51b2adaf55b2 | prathampithalia/CP | LeetCode/112. Path Sum.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999972 | 5.66794 | {
"github_metadata": {
"branch": "main",
"commit_count": 1301,
"repo_created_at": "2023-10-02T17:38: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": "ba53ac26d... |
61e249f7-c275-4054-be2b-ad54c871a8ea | alina-aristova/webserver | config_parse/includes/Server.hpp | #ifndef SERVER_HPP
# define SERVER_HPP
# include "Configuration.hpp"
# include "Location.hpp"
# include <map>
# define DEFAULT_PORT 8080
# define DEFAULT_HOSTNAME "localhost"
# define DEFAULT_ROOT_DIRECTORY "/"
# define DEFAULT_INDEXING_FILE_PATH "/index.html"
# define DEFAULT_ERROR_FILE_PAGE "/404.html"
# define DEF... | WEB | 0.918909 | 4.342219 | {
"github_metadata": {
"branch": "main",
"commit_count": 113,
"repo_created_at": "2021-06-20T16:28: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": "bdfff6792d... |
75eac6bb-1693-446d-bff5-d9c65cf2b1cd | makio93/competitive-othersites | LeetCode/Problems/DCC/2023/Jul/W3/D21/main0-2.cpp | // 自力AC2
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = (int)(1e9);
const ll LINF = (ll)(1e18);
struct BIT {
int n;
vector<ll> d;
BIT(int n=0) : n(n), d(n+1) {}
void add(int i, ll x=1) { for (i++; i<=n; i+=i&-i) d[i] = min(LINF, d[i]+x); }
ll sum(int i) {
... | ALGO | 0.999992 | 5.184964 | {
"github_metadata": {
"branch": "main",
"commit_count": 1074,
"repo_created_at": "2021-04-26T01:47: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": "29c38afa3... |
c53ad073-173f-4780-8109-2963ae07a8cd | Lasoloz/mestint-feladatok | lab03-amoba/src/game/field.cpp | #include <game/field.hpp>
Field::Field(const size_t field_size, const size_t expected_lenght,
const Player closeness_player, const Player player)
: _field_data(field_size,
std::vector<Player>(field_size, Field::Player::EMPTY))
, _closeness_data(field_size, std::vector<bool>(fiel... | ALGO | 0.981841 | 5.578435 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2018-04-02T09:50: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": "152515eb0... |
eb97462c-5e36-4cee-a583-0b41cf3c5366 | kamyu104/LeetCode-Solutions | C++/minimum-steps-to-convert-string-with-operations.cpp | // Time: O(n^2)
// Space: O(26^2)
// dp, greedy
class Solution {
public:
int minOperations(string word1, string word2) {
const int n = size(word1);
vector<vector<int>> dp(n, vector<int>(n));
for (int i = 0; i < 2 * n - 1; ++i) {
unordered_map<char, unordered_map<char, int>> cnt... | ALGO | 0.999981 | 5.687047 | {
"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": ... |
a2280a8f-db78-47a5-8fb9-cadd4c07807e | kanishka-p1/DSA_Codes | graph/striver/kosaraju_algorithm.cpp | /********************************************************************* QUESTION ****************************************************************************************/
/*
Given a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, Find the number of strongly connected components in the graph.
Exa... | ALGO | 0.999934 | 5.735107 | {
"github_metadata": {
"branch": "main",
"commit_count": 626,
"repo_created_at": "2022-02-26T06:22: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": "bf24872301... |
5691d4d1-01f6-4d3b-b6e9-2f6e9348a367 | amyghotra/CPP-Projects | Shapes:cross.cpp | /*
<NAME>
*/
#include <iostream>
using namespace std;
int main()
{
// vars
int row; // rows == the height
int col; // cols == width
int height;
int width;
// inputs from user
cout << "Input height: ";
cin >> height;
// set the width and height to the same value
width = he... | ALGO | 0.999286 | 4.620896 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2019-02-05T02:13:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "940dac55f... |
2f0626ae-2bd7-4a95-9a77-f9a395714181 | LingNc/LingNc | school/实训/训练1/7-12 输出链表偶数结点.cpp | #include<iostream>
#include<cstdlib>
#include<cstdio>
#include<cstring>
#include<cctype>
#include<vector>
#define endl '\n'
#define foe(i,a,b) for(int i=(a);i<=(b);i++)
#define string char
using namespace std;
void Swap(string *x,string *y){
auto t=*x;
*x=*y;
*y=t;
}
string *reverse(string *begin){
int ... | ALGO | 0.99956 | 3.900722 | {
"github_metadata": {
"branch": "master",
"commit_count": 308,
"repo_created_at": "2023-12-25T12:49:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6971236... |
25ef677f-1665-4046-88b5-613303799a22 | Roatleroy/Tic-Tac-Toe | function.cpp | #include "header.h"
void TOE::createArray() {
for (int i = 0; i < 3; ++i) {
for (int k = 0; k < 3; ++k) {
array[i][k] = 'I';
}
}
inc = 0;
}
void TOE::ADDWIN() {
string xo = returnXO();
if (xo == "X") {
winsX++;
}
if (xo == "O") {
winsO++;
}
}
void TOE::displayWINS() {
cout << en... | ALGO | 0.966714 | 3.462739 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2024-01-03T18:29: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": "732829be736... |
7599815f-70e7-40f9-8230-ed94fa74e470 | Abs-Shagor/CP-Code-Library | Graph Theory/DSU && MST.cpp | //DSU & MST ?
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ll long long
const ll N = 2e5;
ll parent[N];
ll sizeof_group[N];
void make_node(ll v) {
parent[v] = v;
sizeof_group[v] = 1;
}
ll find_root(ll v) {
if(parent[v]==v) return v;
return parent[v] = find_r... | ALGO | 0.999964 | 4.46905 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2024-03-17T14:33: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": "8ef807be912... |
bbe7dd99-0faf-405b-804e-dfa8e22ff651 | fei0319/competitive-programming | code/codeforces/104172E.cpp | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <vector>
template <typename Tp>
void read(Tp &res) {
static char ch;
ch = getchar(), res = 0;
while (!isdigit(ch)) ch = getchar();
while (isdigit(ch)) res = res * 10 + ch - 48, ch = getchar();
}
constexpr int maxn = 1e6 + 19;
int n, k,... | ALGO | 0.999937 | 4.003206 | {
"github_metadata": {
"branch": "main",
"commit_count": 371,
"repo_created_at": "2022-11-12T12:44: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": "092d842677... |
ede7717e-5bbc-4180-81bb-2b156472e27d | zihanpeter/problems | P1486.cpp | #include <iostream>
#include <ctime>
using namespace std;
const int N = 1e7 + 5;
int root, cnt, n, minf, delta;
struct node {
int v, num, l, r, size;
} tree[N];
void update(int root) {
tree[root].size = tree[tree[root].l].size + tree[tree[root].r].size + 1;
}
void split(int root, int v, int &x, int &y) {
if (!root) ... | ALGO | 0.999847 | 3.993881 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2024-09-12T14:15:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39da1771e16... |
7d0552bc-88d2-4547-8965-ff0b4b61aa9d | lorenzo-ferrari/kattis | src/muzicari.cpp | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main() {
#ifdef LORENZO
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t; cin >> t;
int n; cin >> n;
vector<int> v(n);
for (int i = 0; i < n; ++i) {
cin >> v[i];
}
vector<int> jj(t+1, -1);
fo... | ALGO | 0.999986 | 3.306105 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2021-02-06T11:23: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": "123ba59579d... |
985ca1a9-cfed-451b-96df-80aacbd288ae | VladiGGeorgiev/TelerikAcademy | CodeIT/RoadNetwork/CodeBlock/RoadNetwork/main.cpp | #include <stdio.h>
#include <tchar.h>
#include <iostream>
#include <set>
#include <vector>
#include <algorithm>
#include <iterator>
using namespace std;
struct Edge
{
int index;
int from;
int to;
int weight;
Edge(int from, int to, int weight, int index)
{
this->from = from;
this->to = to;
this->weight = ... | ALGO | 0.999867 | 4.082101 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2014-10-26T07:57:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13c1b01574... |
b7937e1e-f676-4fd8-9f55-a88c46c5de5f | AI-Planning/autoscale | planners/ipc2018-opt-complementary2-3584mb/src/search/symbolic/sym_params_search.cc | #include "sym_params_search.h"
#include "../option_parser.h"
#include "../utils/timer.h"
using options::Options;
using namespace std;
using utils::g_timer;
namespace symbolic {
SymParamsSearch::SymParamsSearch(const Options &opts) :
max_disj_nodes(opts.get<int>("max_disj_nodes")),
min_estimation_time(opts.ge... | ALGO | 0.997782 | 6.587503 | {
"github_metadata": {
"branch": "main",
"commit_count": 1270,
"repo_created_at": "2021-07-13T08:45:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5b690860d... |
279fa9f4-67de-40df-983c-dba60cd0ef0b | TheTimmy/CrankNicolson | hamiltonian.h | #pragma once
#include "TridiagonalMatrix.h"
/**
* @brief HamiltonianSolver Base class for the equation solver.
* If you want to implement a custom solver inherit from this class.
* The HamiltonSolver solves the Schrödinger equation with the form
* \f[
* H|x(r, t)\rangle = i\hbar \fr... | ALGO | 0.911743 | 6.674478 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2018-09-10T10:15:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "91696f502... |
537a8d77-e199-4f78-92b8-5242009ec1b4 | dada8704/CompetitiveProgramming | UVA/750_8_Queens/8_Queens.cpp | #include<iostream>
#include<vector>
#include<array>
using namespace std;
int Queen_list[9]={0};
std::array<std::array<int, 2>, 9> tag{0};
void PRINT_QUEEN_LIST();
void eight_queen(std::array<std::array<int, 9>, 9> ar, int iter_queue, vector<int> col_queue);
void Print_ar(std::array<std::array<int, 9>, 9>& ar);
bool... | ALGO | 0.999681 | 4.103929 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2020-11-03T10:56:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "820caf61b71... |
de74b05d-f555-4f86-abda-044b1c9b7b25 | olegabdurazackov/calc-tor120transf | tortrans.cpp | #include <stdio.h>
#include <math.h>
#include "tortrans.h"
TorTrans::TorTrans()
{
//const float pi=3.14;
nu=0.92; // КПД трансформатора
// w1; /* число витков на вольт первичной обмотки */
// w2; /* число витков на вольт вторичной обмотки */
U1=220.0; // напряжение питания, В
U2=12.6; // напряжение... | ALGO | 0.995276 | 3.002536 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-04-29T11:50:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a2fc4e837aa... |
bb1041ea-32eb-4d94-8172-27928458fc17 | abhinav7061/Dsa | Array/searching.cpp | #include <bits/stdc++.h>
using namespace std;
void sort(int arr[], int n)
{
for (int i = 0; i < n; i++)
{
for (int j = i + 1; j < n; j++)
{
if (arr[j] < arr[i])
swap(arr[j], arr[i]);
}
}
}
int binarySearch(int arr[], int n, int search)
{
sort(arr, n)... | ALGO | 0.999972 | 4.884566 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-05-05T05:56: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": "9558784ec61... |
68d253a3-e435-40c5-951c-e0c0af6808b2 | Bodhert/Competitive-programing | uva/507-Jill Rides_Again/jill.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <limits>
using namespace std;
int main(){
int cases,route = 1,stops,nicennes;
vector <int> path;
//voy a manejar todo indice 1
cin >> cases;
while(cases--){
cin >> stops;
path.assign(stops,0);
for(int i = 1; i < stops; i++)... | ALGO | 0.999844 | 4.23138 | {
"github_metadata": {
"branch": "master",
"commit_count": 180,
"repo_created_at": "2016-06-14T02:12: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": "cc57bd97... |
b78110ea-6143-4322-b6cc-566dd8803df6 | Ruthwik/FFalgorithm | FordFulkerson28mar1150.cpp | #include <iostream>
#include <limits.h>
#include <string.h>
#include <queue>
#include <algorithm>
using namespace std;
// Number of vertices in given graph
for (v = t; v != s; v = parent[v]) {
u = parent[v];
rGraph[u][v] -= path_flow;
rGraph[v][u] += path_flow;
}
bool bfs(int rGraph[V][V], int s, int... | ALGO | 0.999685 | 3.655798 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2015-04-01T17:28: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": "aa04911764... |
9e1b1c96-1b92-41f5-bf33-6e23090508cf | google/filament | third_party/dawn/third_party/dxc/lib/CodeGen/DFAPacketizer.cpp | //=- llvm/CodeGen/DFAPacketizer.cpp - DFA Packetizer for VLIW -*- C++ -*-=====//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | ALGO | 0.989145 | 7.106533 | {
"github_metadata": {
"branch": "main",
"commit_count": 7301,
"repo_created_at": "2018-08-03T17:26:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 18658,
"forks": 1993,
"issues": 155,
"pull_requests": 23
},
"file_meta": {
"content_id": "... |
d3d3ac82-0fdd-422d-bbb5-31908377eef2 | bulletphysics/bullet3 | examples/ThirdPartyLibs/BussIK/Tree.h | /*
*
* Inverse Kinematics software, with several solvers including
* Selectively Damped Least Squares Method
* Damped Least Squares Method
* Pure Pseudoinverse Method
* Jacobian Transpose Method
*
*
* Author: <NAME>, <EMAIL>.
* Web page: http://www.math.ucsd.edu/~sbuss/ResearchWeb/ikmethods/index.html
*
*
This software... | ALGO | 0.999643 | 4.960313 | {
"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"... |
3e831f2f-482e-4b5a-8627-d11bbabf9e1a | vladshablinsky/algo | rcc2016_q3/d.cpp | #include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
const int MAX_N = 1e5 + 10;
const int MAX_T = 2 * 1e5 + 10;
const int MAX_S_T = 4 * MAX_T;
int t_in[MAX_T];
int t_out[MAX_T];
vector<int> g[MAX_N];
bool used[MAX_N];
int t[MAX_S_T];
in... | ALGO | 0.999909 | 4.339392 | {
"github_metadata": {
"branch": "master",
"commit_count": 425,
"repo_created_at": "2021-10-22T06:45:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d79d724... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.