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
9ff3c3af-efe5-435b-abd2-5400cd9c282c
zhaokun506/driving-planning
src/reference_line/reference_line_provider.cc
#include "reference_line_provider.h" ReferenceLineProvider::ReferenceLineProvider() {} void ReferenceLineProvider::Provide( const std::vector<MapPoint> &routing_path_points, const LocalizationInfo &localzation_info, const ReferenceLine &pre_reference_line, ReferenceLine &reference_line) { // 1.将全局路径转换为自...
ALGO
0.986644
5.259846
{ "github_metadata": { "branch": "v1.0", "commit_count": 38, "repo_created_at": "2022-09-14T05:14:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 71, "forks": 32, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8514b15e...
a739ac68-8add-4b55-aa71-d7b354faa47a
LokeshMelkani07/DSA-Placement
Striver Sheet/Stack and Queues/3.cpp
#include <iostream> #include <unordered_map> #include <unordered_set> #include <vector> #include <map> #include <set> #include <algorithm> #include <stack> #include <queue> using namespace std; /* Implement Queue using Stack Problem Statement: Given a Stack having some elements stored in it. Can you implement a Queue...
ALGO
0.998545
5.797492
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2023-03-31T16:09: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": "8e16ffd1...
ac8a138d-59fb-4c79-84fa-f14bf2204cf4
IChaudhry892/hash-tables-practice
RegularShow/HashTable.cpp
#include <iostream> #include <cstring> #include <list> #include "HashTable.h" using namespace std; HashTable::HashTable(){ } bool HashTable::isEmpty(){ int sum = 0; for (int i = 0; i < hashGroups; i++){ sum += table[i].size(); } if (sum == 0){ return true; } return false; } i...
ALGO
0.994667
4.681534
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-11T05:54: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": "10a2abd65250...
1c0b27bb-8219-464d-80b9-8b1146a014f8
Jasmine424/EC602-DesignBySoftware
Homework2/errors_in_floating.cpp
#include <iostream> #include <iomanip> #include <cassert> using namespace std; int main() { float num_f = 1.0/3; double num_d = 1.0/3; long double num_ld = 1; num_ld /= 3; long double num_ld2 = (long double)1.0 /3; long double num_ld3 = 1.0 /3; cout << setprecision(22) << num_f << endl; cout << setpr...
ALGO
0.901126
3.279048
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-13T18:15:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4be0b55022...
c185d77b-41fb-40c7-880c-9a085cf001ea
PX4/PX4-Autopilot
src/modules/commander/mag_calibration.cpp
/**************************************************************************** * * Copyright (c) 2013-2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Red...
TOOL
0.95748
3.257298
{ "github_metadata": { "branch": "main", "commit_count": 47555, "repo_created_at": "2012-08-04T21:19:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9767, "forks": 14212, "issues": 1547, "pull_requests": 574 }, "file_meta": { "content_id"...
229e50be-a5ec-4231-98fb-dc637fc0bf5a
JyotiradityaShukla/DSA-CPP
Arrays/MajorityElement.cpp
#include <bits/stdc++.h> using namespace std; //Brute force int MajorityElement(vector <int> arr){ int n = arr.size(); for(int i = 0; i < n; i++){ int count = 0; for(int j = 0; j < n; j++){ if(arr[i] == arr[j]) count++; } if(count > n/2) return arr[i];...
ALGO
0.999983
4.766791
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-09-25T04:29: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": "c9f8b73d5031...
bc5e430e-1a2c-4c12-af94-246b3351c783
dmitrykitty/OOP_C_plus
ex3-5-redef-ext-as/practise1.cpp
#include <iostream> class BottleWater { enum type_assign { add, sub, mul, div, rem }; enum { max_volume = 640 }; // максимальный объем воды short volume{}; // объем воды в бутылке public: BottleWater(short volume = 0) : volume(volume) {} BottleWater operator+(const BottleWater &other)...
TOOL
0.941991
4.089068
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2025-04-04T12:05: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": "ee428f516e...
66097c52-5e68-4e90-8336-aa6f2e986453
Laurentiuq/aFeCl3
Tema2Suplimentara/leetcode1.cpp
//Kruskal pe graf, unde costul e distanta dintre oricare doua puncte(graf complet) #include <iostream> #include <bits/stdc++.h> using namespace std; class Solution { private: static const int mx = 100005; int sets[mx]; int ranks[mx]; public: int mDist(vector<int> &p1, vector<int> &p2) { // cou...
ALGO
0.999968
5.278556
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-01-25T21:36:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cf256a1be...
7b4190ea-e2be-41a5-b32b-4c5ac0bc6c0a
rainbow-auto/rainbow-codes
Luogu/CF1637D.cpp
#include <bits/stdc++.h> // #pragma GCC optimize(2) using i64 = long long; using f64 = long double; #define fastread std::ios::sync_with_stdio (false); std::cin.tie(nullptr); #define rep(QWQ, qwq, qaq) for (i64 QWQ = (qwq); (QWQ) <= (qaq); QWQ++) #define per(QWQ, qwq, qaq) for (i64 QWQ = (qwq); (QWQ) >= (qaq); QWQ--...
ALGO
0.99999
3.894348
{ "github_metadata": { "branch": "master", "commit_count": 749, "repo_created_at": "2024-09-07T02:10:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a5f38a6...
162f8c98-e2dc-4857-ab04-f73124becd6b
lis123kr/Baekjoon-Online-Judge
Accept/1517 버블 소트.cpp
#include<stdio.h> typedef long long LL; int arr[500001], b[500001]; LL merge(int p, int q) { LL ans=0; int mid = (p + q) / 2; int i = p, j = mid + 1, idx = 0; while (i <= mid && j <= q) { if (arr[i] <= arr[j]) b[idx++] = arr[i++]; else { ans += (long long)mid - i + 1; b[idx++] = arr[j++]; } } while (i <= mid...
ALGO
0.999989
4.631482
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-11-29T07:54: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": "34740c76e...
45e3a9ba-8302-429c-9334-f9257381bd94
kulasinghet/Group-27-Dijkstra-implementattions
Question 2.cpp
/* SCS2201 DSA III Assignment Question 02 <NAME> 20000995 */ #include <bits/stdc++.h> using namespace std; int turns; // Function to print the path from source to destination void print_path(vector<int>& parent, int vertex, int target) { // if vertex is 0 then we have reached the source if (vertex == 0) { r...
ALGO
0.999626
4.052511
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-10-22T14:24:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec447ac0e79d...
14e9fc1b-d9d5-40ad-8680-6c8b30c154f5
akshay090703/gfg-practice-problems
Day 33/ifFrequenciesCanBeEqual.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: bool sameFreq(string s) { vector<int> frequency(26, 0); for (int i = 0; i < s.length(); i++) { frequency[s[i] - 'a']++; ...
ALGO
0.999876
5.332917
{ "github_metadata": { "branch": "main", "commit_count": 286, "repo_created_at": "2024-02-06T08:01: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": "3c4901f838...
1b84a0eb-4385-465f-ad8d-2fa871197588
superlich7/Paddle-Lite
mobile/src/operators/math/gemm_omp_int8.cpp
/* Copyright (c) 2018 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 by applicable law or...
ALGO
0.978519
5.452269
{ "github_metadata": { "branch": "develop", "commit_count": 4398, "repo_created_at": "2020-03-03T02:12:04.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "PaddlePaddle/Paddle-Lite", "stars": 10, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { ...
0e32b326-c79f-4863-95b6-b9f8c6874691
tonoysheikh/comparative-programming-cpp-
codeforce/contest/div2/1.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; #define nl '\n' #define pb push_back #define ppb pop_back #define mp make_pair #define mod 1000000007 #define pi 3.1415926535897932384626433832795 #define lpz(i, a, b) for (int i=a; i<b; i++) #define lp(i, a, b) for (int i=a; i<=b; i++) #define t...
ALGO
0.999913
3.545004
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-05T17:49: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": "3fe02431b043...
29ac3f0a-cc0d-4d88-a5d4-72bb94029181
muhammadhasan01/cp
Online Judge/Codeforces/Gym/2018 Battle of Brains/G.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; const int M = 1e9 + 7; long long pre[N]; long long get(int l, int r) { assert(r >= l); long long ret = pre[r] % M; if (l > 0) { ret = (ret - pre[l - 1]) % M; ret = (ret % M + M) % M; } return ret % M; } void so...
ALGO
0.999977
5.080173
{ "github_metadata": { "branch": "master", "commit_count": 1187, "repo_created_at": "2019-07-13T15:49:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c25dda7...
6ec5fdd4-f0f1-4107-9aa7-fcfbd615de3e
wolflion/LeetCode
01HWOD_2023yearB_basic/od01补种未成活胡杨.cpp
#include "test.h" void od01_impl(int N, int M, vector<int>num, int k) { //lionel,感觉写得不够健壮, int left = 1, right = 0; int res = 0; for (int i = 0; i < num.size()-k; i++) { //之前这个地方的k,写的是1,觉得太拼凑,才改的k,这个应该不能完全AC吧 if (num[i] > left) { right = num[i + k]; res = right - left ? right - left : res; left = num[...
ALGO
0.999976
3.657408
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-09-22T02:15:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61f2834f2...
8f6be6f4-5862-4e2d-9d21-90d73045b6ff
raincross7/code-similarity
codes/train_code/problem038/problem038_46.cpp
#include<bits/stdc++.h> #include<cctype> using namespace std; #define rep(i,n) for (int i=0;i<(n);i++) #define reps(i,n) for (int i=1;i<=(n);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) #define rreps(i,n) for (int i=(n);i>0;i--) #define all(v) (v).begin(),(v).end() #define pi 3.1415926535897932384 #define E9 10000...
ALGO
0.999936
3.627017
{ "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": "35d60c04e505...
bba30b43-4054-4fe4-9da9-254d36fa4ebe
luchenqun/leet-code
problems/445-add-two-numbers-ii.cpp
/* * [445] Add Two Numbers II * * https://leetcode-cn.com/problems/add-two-numbers-ii/description/ * https://leetcode.com/problems/add-two-numbers-ii/discuss/ * * algorithms * Medium (40.53%) * Total Accepted: 262 * Total Submissions: 645 * Testcase Example: '[7,2,4,3]\n[5,6,4]' * * 给定两个非空链表来代表两个非负整数。数字...
ALGO
0.999951
5.991083
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2017-09-01T16:07:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c63f7684...
967566d8-e759-405f-8984-78f97b2954d6
damonchen/leetcode
algorithms/cpp/3-longest-substring-without-repeating-characters/longest-substring-without-repeating-characters.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // 使用滑动窗口方式解答 int lengthOfLongestSubstring(string s) { map<char, bool> cont; int len = s.length(); int left = 0; int right = 0; int longest = 0; while(right < len) { char r = s[right]; int sub_max = 0; // ...
ALGO
0.999918
4.835531
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2022-04-13T11:53: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": "e3616ba3c...
209ed937-a279-46f9-b883-086782400ae1
alisw/AliRoot
GPU/GPUTracking/SliceTracker/GPUTPCGlobalTracking.cxx
//**************************************************************************\ //* This file is property of and copyright by the ALICE Project *\ //* ALICE Experiment at CERN, All rights reserved. *\ //* *\ //* Prim...
ALGO
0.931018
4.510289
{ "github_metadata": { "branch": "master", "commit_count": 74535, "repo_created_at": "2016-03-07T09:20:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 256, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "9a25...
4d00f664-930c-470e-af30-cf8aef8957e2
Nikita-Keltsin/Nkeltsin-2025
LAB2-5/MyVector.cpp
#ifndef INHERITANCE_MYVECTOR_H #define INHERITANCE_MYVECTOR_H #include <iostream> #include <cstring> #include <algorithm> const int MAX_SIZE = 4; const int MAX_LENGTH = 256; template <typename T> class MyVector { public: explicit MyVector(const T &el = T(), int maxsz = MAX_SIZE) { size = 0; maxsi...
TOOL
0.990446
4.438271
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-03-30T14:19: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": "e326b7a547c...
cb63d427-33c7-49cf-8f69-7ed72caec67a
LuisLuettgens/motion_primitives
external/transworhp/example/rayleighOCP_meshRef.cpp
/*---------------------------------------------------------------- * * Example: Rayleigh OCP mit Gitteranpassung * *----------------------------------------------------------------*/ #include "TWfolder.h" #include "TWproblem.h" #include "TransWORHP.h" class RayleighPhase : public tw::TransWorhpProblem { public: ...
ALGO
0.9994
5.036898
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-03-19T19:18:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "069535eceb...
977c9761-be1d-4590-b9eb-6ee889ac7d58
ishandutta2007/codeforces-m
majk/normal/220/E.cpp
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author majk */ #ifndef MAJK_LIB #define MAJK_LIB #include <vector> #include <stack> #include <iostream> #include <unordered_map> #include <unordered_set> #include <map> #include <iomanip> #include <set> #include <functional>...
ALGO
0.999849
4.118383
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "7e9efa66affb...
3bcf2d01-2b9f-4d45-bd78-feabd02422a6
ssatendra790/CP
B_And_It_s_Non-Zero.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long typedef unsigned long long ull; #define pb push_back #define eb emplace_back #define mk make_pair #define all(x) x.begin(), x.end() #define fo(i, n) for (i = 0; i < n; i++) #define foo(i, n) for (i = 1; i <= n; i++) #define F first #define S second #def...
ALGO
0.99971
3.938889
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-21T19:21: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": "bdb672d17d5b...
50b1a2bd-b667-4aaa-9799-bf8a9eb49e00
Angellopp/CodeForces-Problems
J_Shout_Game.cpp
#include <bits/stdc++.h> #define endl '\n' #define dd(x) cerr << #x << "= " << x << "." << endl; #define ddl cerr << string(20, '=') << endl; #define ll long long #define ld long double #define ff first #define ss second #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define fastio ios_base::syn...
ALGO
0.999804
3.886872
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-02-28T04:36: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": "a6bc07864f4...
d7bd02c1-3852-4ee1-851b-2ee5a1b6f236
ASSERT-KTH/Supersonic
predictions/submissions-aizu-coop-gpt35/Codenet/p00748/305390492/response_8.cpp
#include <algorithm> #include <iostream> #include <vector> #define INF 1 << 28 using namespace std; int p[1000001]; vector<int> memo(1000001); int solve(int n, int count) { if (!n) return 0; if (memo[n]) return memo[n]; int ans = INF; for (int i = 0; i <= n; i+=6) { ans = min(ans, solve(n - p[i], co...
ALGO
0.999858
3.477816
{ "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": "34a92383ea64e...
f5336b36-1367-4a12-b603-00e56bd0c53c
ishandutta2007/codeforces-h
hitman623/normal/914/D.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int,int> #define vi vector<int> #define vii vector<pii> #define mi map<int,int> #define mii map<int,pii> #define all(a) (a).begin(),(a).end() #define x ...
ALGO
0.999731
4.655292
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "b7a3933deb2b...
49b5433f-423c-4901-bcd0-d8fa41cc4ce1
ojjiy/contests
ABC/007/c.cpp
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(), (x).end() using namespace std; template <typename T> T &chmin(T &a, const T &b) {return a = min(a, b);} template <typename T> T &chmax(T &a, const T &b) {return a = max(a, b);} using ll = long long; using ld = long dou...
ALGO
0.999638
4.208497
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-04-12T16:37:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62d3c18c2e...
788085fa-c283-428c-ab3d-7c5e167bcbf9
pkuhantao/research-phase_separation_coupling
InnerSolvPatch.h
// // InnerSolvPatch.h // // // Created by <NAME> on 5/2/14. // // // 3D complex inner solvent patch(Yin/Yang) #ifndef ____InnerSolvPatch__ #define ____InnerSolvPatch__ #include "NormalGrids2D.h" #include "NormalGrids3D.h" #include "GhostFrame3D.h" #include "Properties.h" #include <vector> using namespace std...
ALGO
0.98776
4.278081
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2014-07-03T20:03:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9d3f4d35...
cc60fa6c-79be-45bd-9a7c-93c3e1a96355
AlessandroGiulivo/prog2
Week 2/X66236_en/gene_finding.cpp
/* This program will take a DNA string as input, and return the first ORF within the string PSEUDOCODE GENE_FINDING(s) Let stop codons be a list of strings Let orf be and empty string stop_codons <- ["TGA", "TAG", "TAA"] s <- s[s.find('ATG'):] for stop_codon in stop_codons do for i = 0 to ...
ALGO
0.999214
3.745988
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-13T16:39: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": "06c2bf75c5d4...
5c20efa0-f504-40f6-864c-f0b4d96a6783
trilinos/Trilinos
packages/nox/src-loca/src-thyra/Thyra_AdaptiveSolutionManager.cpp
// @HEADER // ***************************************************************************** // NOX: An Object-Oriented Nonlinear Solver Package // // Copyright 2002 NTESS and the NOX contributors. // SPDX-License-Identifier: BSD-3-Clause // ********************************************************************...
TOOL
0.947922
5.710975
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
bb9455d3-4526-4326-8036-82f597cc6d8f
citizenof17/SummerPractice17
ReportSummer2017/B.cpp
#define _CRT_SECURE_NO_WARNINGS #include <vector> #include <iostream> #include <string> #include <set> #include <map> #include <fstream> #include <iomanip> #include <queue> #include <cmath> #include <algorithm> using namespace std; #define mp make_pair #define pb push_back #define X first #define Y second #define all...
ALGO
0.999956
3.97386
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-22T11:06: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": "715fe4cb09...
30413985-cf76-4577-b916-f29a0809141b
Dheeraj-Bangera/100-days-of-code
day88.cpp
//1631. Path With Minimum Effort class Solution { public: int n, m; int dir[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; vector<int> visited; int to1D(int i, int j) { return i*m +j; } bool dfs(int idx, int& maxEffort, int maxD, vector<vector<int>>& heights) { if (idx == n*m-1) r...
ALGO
0.999998
5.864086
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2023-06-21T06:17:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84e04d8cb2...
202bb857-8725-4538-a3f8-3683b7ae9e59
bjones777/OnlineJudge
Subway10389/Subway10389.cpp
// 10389 - Subway // https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=678&page=show_problem&problem=1330 #include <cassert> #include <cstdint> #include <cmath> #include <functional> #include <queue> #include <iostream> #include <sstream> #include <string> using namespace std; struct Point2D...
ALGO
0.999236
4.109693
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-01-11T18:33:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "414598265d5...
216b224c-9e9b-4747-88d9-1d4b22571de8
Jaminur-Rashid/Problem-Solving
Codeforces/Round-602/A.cpp
#include<bits/stdc++.h> #include<set> #include<queue> #include<algorithm> #include<map> #include<vector> #include<cmath> using namespace std; typedef long long ll; #define pb push_back #define PI acos(-1.0) #define MAX 10000007 //1e7+7 #define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X)) #define rrep(X,Y) for (int (X) =...
ALGO
0.99981
3.452429
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-09-09T11:44:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b214e85d6a...
6d9f0407-2398-4a1a-8ec7-e2c98a38a40b
qq734628996/ac-code
UVALive/2757/18742578_AC_39ms_0kB.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i = 0; i < n; i++) #define PER(i,n) for(int i = n-1; i >= 0; i--) #define FOR(i,l,r) for(int i = l; i <= r; i++) #define ROF(i,l,r) for(int i = r; i >= l; i--) #define DEBUG(x) cout << #x << "=" << x << endl; #define SHOW1(A,n) { REP(i,n-1) printf(...
ALGO
0.999846
3.545141
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-05-23T08:33:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "443940371a...
c82ec9f8-ec08-49e7-b2fe-3926dfba2783
siolag161/samogwas
core/include/clustering/dbscan.hpp
/**************************************************************************************** * File: dbscan.hpp * Description: An implementation of the DBSCAN algorithm dedicated to data clustering (Ester et al. (1996)). * * * The DBSCAN principle lies in constructing clusters from the estimated density distributio...
ALGO
0.999343
6.751248
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2014-08-25T19:38: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": "435b7c5c...
dcda6c36-2d27-43c0-b6dc-deb33ebe8fbc
KrinaGhinaiya/cpp-projects
project3/Q-4.cpp
// Q.4 Develop a program that prints the given Full Pyramid pattern using a nested for loop. // 5 // 4 5 4 // 3 4 5 4 3 // 2 3 4 5 4 3 2 // 1 2 3 4 5 4 3 2 1 #include <iostream> using namespace std; int main() { int rows = 5; for (int i = 1; i <= 5; i++) { for (int space = 1;...
ALGO
0.998796
4.704695
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-12-21T11:35: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": "9de7cffb9cd4...
a07f02b0-cc29-4a1d-bccd-07c1da12c3af
aduleba/myRepo
zadanie7.2.cpp
#include <iostream> using namespace std; // Program,który oblicza liczbe minimalna oraz maksymalna wszystkich wartości w tablicy //Napisz program, który zdefiniuje tablicę 20 losowo wybranych liczb od 0 do 999. //Napisz funkcję, która ...
ALGO
0.997982
4.399708
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2020-11-22T16:51:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ce07990c144...
1243c75d-47f5-4667-87ae-5fa9574e69ca
IOrez/CodingTestPractice
CodingTestPractice/Baekjoon/자료구조/5052.hpp
#include <iostream> #include <string> using namespace std; typedef struct nodeList NodeList; typedef struct node { bool have = false; NodeList* link = nullptr; }Node; typedef struct nodeList { Node nodes[10]; }NodeList; bool insert(NodeList*& pNodeList, string a_str, int idx) { if (a_str.size() >= idx + 1) { ...
ALGO
0.999646
4.530442
{ "github_metadata": { "branch": "master", "commit_count": 335, "repo_created_at": "2020-03-13T10:08: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": "ae8a1cef...
176e7f52-4612-45f7-804d-5cb90a7e3b19
MonashDeepNeuron/HPC-Training-Challenges
generate-lazy.cpp
// Copyright (c) <NAME> 2023 // Made in partnership with Monash DeepNeuron // for Monash DeepNeuron's HPC Training. // Details // This program will generate the input files // containing the random list of numbers used // by in some of the challenges. // // Build // $ module load gcc/10.2.0 // $ g++ -std=c++20 -o bin/...
TOOL
0.991616
6.093321
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-03-27T01:28:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "4eb2cab5f0a7...
0aafbdb6-de68-4759-a3f3-9bdfaa9bfa4a
kiranshashiny/Four_7_segment_LED_display
4_7segment_led/4_7segment_led.ino
/* Showing number 0-9 on a Common Anode 7-segment LED display Displays the numbers 0-9 on the display, with one second inbetween. A --- F | | B | G | --- E | | C | | --- D This example code is in the public domain. */ // Pin 2-8 is connected to the 7 segments of the display. int pin...
ALGO
0.964731
6.289167
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-02-14T09:56:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "84a144ed19...
f45f224b-1949-4ee1-81b7-a149f25b8ebd
zhangganlin/Algolab-2021
week13/hand/hand.cpp
///4 #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Delaunay_triangulation_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Triangulation_face_base_2.h> #include <boost/pending/disjoint_sets.hpp> #include <vector> #include <algorithm> #include <iostream> #inclu...
ALGO
0.999743
4.098568
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-02-12T15:27: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": "a66d5bc7bc...
9ee0a7ca-d22e-4d5f-a069-f72ac4027a24
kunheekimkr/PSbank
백준/c++배우기/111-120/2752.cpp
#include<iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >>c; if(a < b){ if(b < c) cout << a << ' ' << b << ' ' << c; else if (a < c ) cout << a << ' ' << c << ' ' << b; else cout << c << ' ' << a << ' ' << b; } else{ ...
ALGO
0.999974
3.538812
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-02-04T07:06:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5498ebfa80f...
d318c9c9-3053-4603-ad8b-00f63e0b1a75
ozline/luogu-cpp
list/115-集合/P1525.cpp
/** * @author OZLIINEX * @brief P1525 [NOIP2010 提高组] 关押罪犯 * @date 2023-01-24 */ /** * 并查集的应用 * * 首先读懂一下题目:给出犯人之间的怒气值,要求你把这一堆犯人放到两个监狱里,求两个监狱里影响力最小是多少(影响力指的是两个监狱里最大的怒气值) * 我们很自然的会想到:构建最小生成树,然后把最大的边去掉,剩下的边的最大值就是答案 * 但是这样做的话,我们需要把所有的边都存下来,然后排序,然后再去掉最大的边,这样做的话,时间复杂度是O(n^2logn),考虑到n = 20^4,这样做是不可行的 * * 但是我们可以用最小生...
ALGO
0.999981
4.817954
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2023-01-11T14:46:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7156edbe747...
0b389208-fa50-453b-8fb2-b499ff05b466
CCCCC11111/kookees
navt/fun_mov.ino
bool FRForward =true; bool FLForward = true; bool BRForward =true; bool BLForward = true; bool stateE1; bool pstateE1; bool stateE2; bool pstateE2; int FRcounter; int FLcounter; int BRcounter; int BLcounter; int E1; int E2; int vxn; int vyn; float power; float Ctrampa =0.005; long init_time=0; long current_time; /*vo...
ALGO
0.998715
4.240462
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-10-21T23:29:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76d3a4fea34...
bba6aa3c-3ce0-4d90-84a0-c2fc98763a96
aklk1ng/code
cpp/cf/contest/1989/c.cpp
#include <bits/stdc++.h> using ll = long long; const int mod = 998244353; void solve() { int n; std::cin >> n; std::vector<int> a(n), b(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } for (int i = 0; i < n; i++) { std::cin >> b[i]; } int x = 0, y = 0, neg = 0, pos...
ALGO
0.999994
4.790522
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2022-02-09T13: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": "a2ab49a4f2...
e193a30f-df78-4402-ad2f-ebcbd269d6c6
fextivity/codeforces-submissions
codeforces/1362/E.cpp
#include<bits/stdc++.h> using namespace std; // Optimization //#pragma GCC optimize("O3") #define endl '\n' // Shortcut #define int long long #define eb emplace_back #define pb push_back #define pob pop_back #define mp make_pair #define upb upper_bound #define lwb lower_bound #define fi first #define se second #def...
ALGO
0.999954
4.459373
{ "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": "aedfb80...
4d4d33b2-592e-4557-a13c-6d5fb1bb2905
100th/Baekjoon-Algorithm
DP/2698.cpp
#include <stdio.h> int i, j; int dp0[101][101], dp1[101][101], answer; int t, T, N, K; // dp0[인접한 비트의 개수][비트의 자리 수] // dp1[x+1][인접비트수], 0으로 끝나는건 dp0[x+1][인접비트수] int main() { for (i = 1; i <= 100; i++) { //인접한 비트의 최대값은 N-1이다. (전부 다 1이라고 가정했을때) j 끝값 줘서 반복횟수 줄임 for (j = 0; j <= i - 1; j++) { if (i == 1 && j ...
ALGO
0.999874
4.348788
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2018-03-03T11:37: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": "bac5512bc...
0e53b3a0-c7f8-4b80-b348-0f0a338ede79
tickelton/playground
challenges/lc/dp/minimum_difficulty_of_a_job_schedule.cpp
/* # Minimum Difficulty of a Job Schedule You want to schedule a list of jobs in d days. Jobs are dependent (i.e To work on the ith job, you have to finish all the jobs j where 0 <= j < i). You have to finish at least one task every day. The difficulty of a job schedule is the sum of difficulties of each day of the ...
ALGO
0.999865
5.701137
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2021-02-26T18:01: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": "22011aed...
76871ad6-3ac1-4f52-a3e3-2e08c4bcd978
yc1111/VeriBench
dbadapter/ccf/conf/cpp/app/app.cpp
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #include "ccf/app_interface.h" #include "ccf/common_auth_policies.h" #include "ccf/http_query.h" #include "ccf/json_handler.h" #include "ccf/historical_queries_adapter.h" #include <vector> #include <sstream> #include <fstre...
WEB
0.935677
3.678197
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-10-15T17:33:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "818458fd6b7...
22a55753-6307-47ec-a2d4-98c9c3c0fe91
preshaakaran/DAA_Practice
NQUEEN.CPP
#include <stdio.h> #include <conio.h> #define N 4 // Define the size of the chessboard // Function to print the solution void printSolution(int board[N][N]) { for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { printf("%d ", board[i][j]); } printf("\n"); } } // Function to check if a queen ca...
ALGO
0.999961
4.418552
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-08-15T16:47: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": "94e307e46f7...
7216e7ab-c803-4c68-bde9-1a22082e19c1
Visweshvar-Axel/LeetCode-Solutions
20_ValidParentheses/ValidParentheses.cpp
#include <stack> using namespace std; class Solution { public: bool isValid(string s) { stack<char> stack; for(char c: s){ if (c == '{' || c == '[' || c == '(') { stack.push(c); } else { if (stack.empty()) return false; char te...
ALGO
0.99882
5.565119
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-07-03T08:39:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d38fef524f3...
ad478e1a-a3fc-4774-89ce-f454304623cc
TheDev05/CARDIO
Striver/DP/DP23/Memo.cpp
#include <bits/stdc++.h> using namespace std; int getCount(std::vector<int> &p, std::vector<int> &w, std::vector<std::vector<int>> &storage, int k, int index) { if (index >= p.size()) return 0; if (storage[index][k] == -1) { int val1 = 0, val2 = 0; if (k - w[index] >= 0) ...
ALGO
0.999988
4.154142
{ "github_metadata": { "branch": "master", "commit_count": 975, "repo_created_at": "2021-06-04T20:37: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": "c5d1382a...
67e83ff8-ac65-420f-855c-496f5e8814aa
saraffa13/c-
B_Jzzhu_and_Sequences.cpp
#include<bits/stdc++.h> // ======================================================================================================= using namespace std; #define endl '\n' #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll long long #define ld long dou...
ALGO
0.999987
4.229783
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-13T16:40: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": "2cdc9f5c0bf5...
187ceec6-b797-45b2-8ff8-a8bbfa032dea
bartyyyy/2-SEM
OAIP/laba7 +/допы7 +/lab7/lab7 dop7/Source.cpp
#include <iostream> #include <fstream> #include "Header.h" using namespace std; void show(Stack* myStk) //Вывод стека { //Stack* e = ; //объявляется указатель на вершину стека int a; if (myStk == NULL) cout << "Стек пуст!" << endl; while (myStk != NULL) { a = myStk->data; //запись значения в пе...
ALGO
0.952124
3.329216
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-13T14:48: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": "bf46d67789a2...
291010d8-e3fe-41d8-9724-d584860c8011
3Strela/Competitive_Programing
Competitions/ACM-ICPC_Brazil_Subregional/AnyEx/QuebraCabeca.cpp
#include <bits/stdc++.h> using namespace std; int main() { int lin, col; cin >> lin >> col; vector<vector<string>> quebra_cabeca(lin, vector<string>(col)); vector<int> linhas(lin), colunas(col); set<string> conj_variaveis; for (int i = 0; i < lin; i++) { for (int j = 0; j < col; j+...
ALGO
0.999903
3.956924
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-06-05T22:45:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a648870e...
47665598-a567-46df-86b7-8112685d1326
eightcien/lldb
source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
//===-- EmulateInstructionARM.cpp -------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
TOOL
0.955397
6.618835
{ "github_metadata": { "branch": "master", "commit_count": 625, "repo_created_at": "2010-12-14T22:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a08b0a9e...
84091471-a381-4dee-bf71-7048b91f4704
imneme/pcg-cpp
sample/cppref-sample.cpp
/* * Random Number Generation Example * * Copyright 2012-2014 cppreference.com Contributors * Copyright 2014-2017 <NAME> <<EMAIL>> * and the PCG Project contributors. * * SPDX-License-Identifier: (CC-BY-SA-3.0 OR Apache-2.0 OR MIT) * * Code in this file is based on code from cppreference.co...
ALGO
0.994002
5.120404
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2014-10-18T04:25:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 788, "forks": 100, "issues": 30, "pull_requests": 17 }, "file_meta": { "content_id": "d46...
14b5f949-31d3-42cf-bc6f-250570765ff4
zhanghaoyu020418/winter-practice
winter_1_24/lanqiao/lanqiao/test2.CPP
#define _CRT_SECURE_NO_WARNINGS 1 // //int main() //{ // int i; // for (i = 100; i < 1000; i++) // { // int a = i % 10; // int b = i / 10 % 10; // int c = i / 100; // // if (a * a * a + b * b * b + c * c * c == i) // cout << i << endl; // } // return 0; //} #include <iostream> using namespace std; // // //int ...
ALGO
0.999882
4.268456
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2021-01-21T08:41: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": "163d7fe8...
997fcf7d-b915-4fc5-b952-f9b6c447d3d1
JamesWCCheng/cpp_testing_demo
range_base_for.cpp
#include <iostream> #include <unistd.h> #include <pthread.h> #include <cstdio> #include <memory> #include <wchar.h> using namespace std; const wchar_t* utf16 = L"\u597D\u597D"; // forward-declaration to allow use in Iter class IntVector; class Iter { public: Iter (const IntVector* p_vec, int pos) : _po...
TOOL
0.929023
3.809808
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2015-01-24T18:08: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": "c149bcfef...
9a94d629-bc88-450c-a771-88ded74e8e00
Meleeri/leetcode
Add_Two_Numbers/main.cpp
#include <iostream> struct ListNode { int val; ListNode *next; ListNode(int x): val(x), next(NULL){} }; typedef struct ListNode ListNode; ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { ListNode *first = new ListNode(0), *p = first; int c = 0; ListNode *p1, *p2; for (p1 = l1, p2 = l2; p1 && p2; p1=p1-...
ALGO
0.999849
4.577462
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2014-08-19T02:32: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": "e5dbf384b...
f8ff934f-b85b-4c0f-a7c1-dec142523c31
task4233/contest
AtCoder/ABC/090/ans_d.cpp
// ------------------------------------ // Date:2018/ 3/11 // Problem:ABC 090 . d.cpp // // ------------------------------------ #include <bits/stdc++.h> using namespace std; #define EACH(i,a) for (auto&& i : a) #define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i) #define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i) #...
ALGO
0.999893
3.867981
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2018-03-08T13:28:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4aefd36d...
3da9b105-a3e5-4d91-b7fe-69173b8e2be3
Joanp131/edd-pr-3
codi-pr-3/NodeBinari.cpp
// // Created by Joanp on 24/4/2023. // #include "NodeBinari.h" /** * Constructor amb paràmetres * @tparam Clau * @tparam Valor * @param key * @param v * @param is_root */ template<class Clau, class Valor> NodeBinari<Clau, Valor>::NodeBinari(const Clau &key, const Valor &v, bool is_root) : key(key), value(v), ...
ALGO
0.957655
5.243693
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-05-20T08:43:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "195f590d47...
fa64b20a-a768-4f4b-89e2-d66da220094c
ShivamAwasthi07/Data-Structures-Algorithms
LinkedList/Intro.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class Node{ public: Node* next; int data; Node(int val){ this->data = val; this->next = NULL; } }; int getDecimalValue(Node* head) { int finalAns = 0; while(head){ finalAns= finalAns*2...
ALGO
0.999915
4.891614
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2023-05-24T18:58: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": "a743480f8...
aa67fd56-40bc-4c6f-ac6a-ace2e282a661
SupremeWarrior108/Competitive-Programming
AtCode/A-Frog1.cpp
#include <bits/stdc++.h> using namespace std; // Macros #define pb push_back #define pf push_front #define ff first #define ss second #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define up(v) upper_bound(v) #define low(v) lower_bound(v)...
ALGO
0.999985
4.511301
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-24T14:16: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": "1af89a830772...
610542ca-7d65-46a0-a607-0af01674d325
Kazim68/Trees-Data-Structure
trees.cpp
#include <iostream> #include <stack> #include <vector> #include <queue> #include <string> using namespace std; class Node { public: string data; Node* left; Node* right; Node(string d){ data = d; left = NULL; right = NULL; } }; class Tr...
ALGO
0.999956
5.286905
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-11-14T18:50: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": "d8a801ce8d...
d715d4ed-a942-4ce9-a6ef-48785c8aba8c
NartRamadan/arduino-FocusGame
focusgame.ino
#include "pitches.h" // כוללת את ספריית הצלילים, שמכילה את התדרים עבור התווים המוזיקליים השונים // הגדרת משתנים עבור כמות הצבעים, אורך הרצף, ופין הבאזזר #define NUM_COLORS 4 // מספר הלדים/צבעים במשחק #define SEQ_LENGTH 3 // אורך רצף הלדים שצריך לשחזר #define BUZZER_PIN 5 // פין הבאזזר מחובר לפין 5 // הגדרת ...
TOOL
0.926495
4.86947
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-08-13T07:38: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": "791807ba9bc5...
2864a1e6-baca-49b7-91a0-1a2a7cc64462
ishandutta2007/codeforces-l
ludo/normal/1270/C.cpp
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2") #include<bits/stdc++.h> using namespace std; #define x first #define y second #define pb push_back #define eb emplace_back #define rep(i,a,b) for(auto i = (a); i != (b); ++i) ...
ALGO
0.999024
4.042697
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d78ca4e57c1c...
f5a36174-88ae-4f3a-8342-bcb423fe17a9
MarcusMors/Chess
main.cpp
#include <iostream> #include "Librerias/gameboard/gameboard.h" #include "Librerias/interface/interface.h" #include "Librerias/IA/IA.h" using namespace std; OnceAnnouncement title(5); /*** REPOSITORIO EN GITHUB * https://github.com/JeanCCG/ChessAux * Autores: * <NAME> * <NAME> * <NAME> * <NAME> <@marcusmors> <<...
ALGO
0.993489
3.381384
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2023-03-16T16:11: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": "ac192c82...
183bb427-b57a-4ca8-91b8-584dc3515404
tchomphoochan/cmutoi_codes
solutions/ipst/o61_oct_practice_uncategorized/wir.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; const int INF = 1e9; const int N = 100010; int h[N], diff[N]; set<pii> diffset; int parent[N]; pii query[N]; int qans[N]; int cnt = 0; int root(int u) { if (parent[u] == u) return u; return parent[u] = root(parent[u]); } int main()...
ALGO
0.999957
3.482298
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-11-15T18:15:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83923f3e3e...
bef41abd-5d97-4879-9011-95d2a7668a6b
steffen-kiess/dda
DDA/CpuFieldCalculator.cpp
/* * Copyright (c) 2010-2012 <NAME> * * 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 * to use, copy, modify, merge, publis...
ALGO
0.99631
6.414628
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-12-20T19:09:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb2e71a8f...
83e474f8-e5ab-49a8-91b6-326d1113722c
liuq901/code
Ural/ur_1710.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cctype> #include <ctime> #include <cstdarg> #include <iostream> #include <iomanip> #include <vector> #include <list> #include <deque> #include <stack> #include <queue> #include <set> #include <map> #include <utility> #include <algorithm>...
ALGO
0.999902
3.516585
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2013-09-18T08:58:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f94230a...
bbbf821a-fba2-4678-9a93-e6732ad261f7
MissAashnaa1/DSA-Questions
1029-vertical-order-traversal-of-a-binary-tree/1029-vertical-order-traversal-of-a-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.999992
6.102645
{ "github_metadata": { "branch": "main", "commit_count": 2426, "repo_created_at": "2023-08-16T21:44: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": "d980a8a37...
ba263c4d-dbe4-4092-8938-c2475a627f06
Shuv25/DSA
12Deque/1dequeUsingLinkedList.cpp
#include <iostream> using namespace std; struct Node { int data; Node *next; Node *prev; Node(int d) { data = d; next = nullptr; prev = nullptr; } }; class DequeuClass { Node *head; Node *tail; public: DequeuClass() { head = nullptr; ta...
ALGO
0.999197
5.380229
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-06-19T11:43:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3af3f765...
0b62ca47-e522-4a12-9673-4ef4ae879035
ZaicevDima/HW-144.math.spbu
1 semester/hw8/8.3/list.cpp
#include <iostream> #include "list.h" using namespace std; struct ListElement { String *value; int size; ListElement *next; }; struct List { int length; ListElement *head; }; List *create() { List *newList = new List; newList->length = 0; newList->head = nullptr; return newList; ...
TOOL
0.949366
4.419005
{ "github_metadata": { "branch": "master", "commit_count": 306, "repo_created_at": "2017-11-14T17:44:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 11 }, "file_meta": { "content_id": "d85b767...
e567cf47-cc10-4570-91c2-b11d1d6abf04
pratapshingane18/Leetcode-Daily-Problems
NamingaCompan.cpp
class Solution { public: long long distinctNames(vector<string>& ideas) { long long disName = 0; vector<unordered_set<string>> arr(26); for (string s : ideas) arr[s[0] - 'a'].insert(s.substr(1)); for (int i = 0; i < 25; i++) { for (int j = i + 1; j ...
ALGO
0.999938
5.129294
{ "github_metadata": { "branch": "main", "commit_count": 356, "repo_created_at": "2023-01-03T10: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": "75ef877dff...
3b78a747-4ff5-4468-a1f7-d669038fa5c3
00258219/portafolio_00258219
Laboratorios/Laboratorio5/ej1.cpp
#include <iostream> using namespace std; //------ Creacion de nodo y de arbol ------ struct nodo{ int info; struct nodo *izq; struct nodo *der; }; typedef struct nodo Nodo; typedef struct nodo *Arbol; Arbol crearArbol(int x){ Arbol p = new Nodo; p->info = x; p->izq = NULL; p->der = NULL; ...
ALGO
0.999744
4.461509
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2019-08-22T14:20: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": "1b0e74dd5...
7013bfbb-64bc-4cb3-aa9c-976b10371e6b
dmkz/competitive-programming
acmp.ru/0988.cpp
#include <iostream> #include <cassert> typedef unsigned long long ull; std::string solve(ull k, ull p) { ull len = 1, lvl = 1; while (lvl < k && len < p) { len = 2 * len + 1; ++lvl; } if (lvl == k && p > len) { return "No solution"; } while (lvl > 0) { len = len...
ALGO
0.99964
5.087427
{ "github_metadata": { "branch": "master", "commit_count": 2019, "repo_created_at": "2018-04-25T11:54:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 41, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "499d76...
e185c608-8c97-41ab-ad90-cf8d1d7b5daf
odorenskyi/Yemelianov-Yaroslav-KB221
lab08/prj/Yemelyanov_task/main.cpp
#include <iostream> #include <clocale> #include "ModulesYemelyanov.h" using namespace std; // Функція для обчислення значення S int s_calculation(int x, int y, int z) { // ваш код для обчислення значення S return x + y + z; } int main() { setlocale(LC_ALL, "ukr"); int x, y, z; char a, b; //...
TOOL
0.9798
3.502245
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-03-13T08:56: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": "50ac34aaee4...
121e4fb5-4eee-4597-b78c-05fc459dba21
HEltim7/cpcode
Archive/ucup/ucup2023Zaporizhzhia/H.cpp
#include <map> #include <random> #include <vector> #include <iostream> #include <algorithm> using namespace std; #define endl '\n' using LL=long long; using ULL=unsigned long long; constexpr int N=1e5+10; vector<int> adj[N]; mt19937_64 gen=mt19937_64(random_device{}()); ULL rnd[N],hsh[N]; int ind[N]; void solve() { ...
ALGO
0.999909
4.882203
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2022-06-06T13:55: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": "1b7fd1ad...
0b509047-cbbf-4247-8e44-0f639d471792
INFINITTIM/Table
Table/main.cpp
#include <iostream> #include <string> #include <random> #include <ctime> #include "Record.h" #include "HashTableUsedList.h" #include "Table.h" #include "ScanTable.h" #include "SortTable.h" #include "HashTable.h" #include "HashTableUsedArray.h" #include "HashTableUsedList.h" #include "Tree.h" #include "TreeBalance.h" #...
ALGO
0.992785
4.002598
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2025-06-02T16:52: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": "bdff269048...
b3de9565-36fb-44fa-948c-919618fb2203
Yash-Singh1/competitive-programming
cses/1746/main.cpp
// Recognize the points as a graph with the values on the y-axis and index on x-axis // Need to count possible graphs using 2D, since this is 2D graph. // We can only consider fixed points if a fixed point only is possible #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = (ll)1e9+7;...
ALGO
0.999985
4.526663
{ "github_metadata": { "branch": "main", "commit_count": 555, "repo_created_at": "2021-04-23T22:47:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e987601b70...
59e6bc16-8744-464c-bb16-aeed65375978
ionutnoje/tutoriale
C++/NoOOP/Tutoriale-codebro/switch/Main.cpp
#include <iostream> #include <string> using namespace std; int main() { int luna; cout << "introduceti o luna din an(1-12): " << endl; cin >> luna; switch (luna) { case 1: cout << "luna introdusa este ianuarie" << endl; break; case 2: cout << "luna introdusa e...
TOOL
0.93149
3.533314
{ "github_metadata": { "branch": "master", "commit_count": 254, "repo_created_at": "2021-10-07T09:21: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": "7a0ad1b4...
74aa9ef7-5055-415b-b7a2-0487941bca26
0-jij-0/CompetitiveProgramming
Problems Archive/2000 - 2999/2198 - Maximum AND.cpp
#include <iostream> #include <vector> using namespace std; vector<vector<int>> A, B; struct vectorPartition { vector<int> A0, A1, B0, B1; vectorPartition() {} }; vectorPartition check(int mask, vector<int>& a, vector<int>& b) { vectorPartition res; for (auto& x : a) (x & mask ? res.A1 : res.A0).push_back(x); for...
ALGO
0.999934
4.672659
{ "github_metadata": { "branch": "main", "commit_count": 256, "repo_created_at": "2021-02-01T07:57:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "401c91537...
82a81b35-e08a-493a-a091-798794c68e64
p-abhay/LeetCode
107-binary-tree-level-order-traversal-ii/107-binary-tree-level-order-traversal-ii.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.999992
6.116984
{ "github_metadata": { "branch": "main", "commit_count": 597, "repo_created_at": "2022-01-08T06: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": "d297f9c745...
3ceec8c6-1f35-490f-a909-7ed2bbd8870f
abansal15/codeforces-solutions
A_Forbidden_Subsequence.cpp
// <NAME> #include <bits/stdc++.h> using namespace std; #define int long long void solve() { string s, ans, t; cin >> s >> t; map<char, int> mp; int x = s.size(); for (int i = 0; i < x; i++) { mp[s[i]]++; } if (mp['a'] == 0 or mp['b'] == 0 or mp['c'] == 0) { for (auto...
ALGO
0.999954
4.558862
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-04-03T05:19: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": "098c7c11b1d2...
75c61e81-a5a3-4db9-a149-b1e3f312d222
alakhag/ComputerGraphicsLab
cg/viewport.cpp
#include<GL/glut.h> #include <GL/gl.h> #include <stdlib.h> #include<math.h> #include<stdio.h> float a,b,c,d,e,f,g,h,xmax,xmin,ymax,ymin,vxmax,vxmin,vymax,vymin; float m,i; int choice; void plotpolygon(float a,float b,float c,float d,float e,float f,float g,float h) { glBegin(GL_POLYGON); glVertex3f(a,b,...
ALGO
0.998111
3.736235
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-02-28T11:28:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ad168942d...
60ece647-0cfa-43b8-8476-1cab697a44bf
bingbingzhenbang/Introduction_to_Algorithms
Chapter16/HuffmanCodes.cpp
#include <queue> #include <memory> #include <iostream> using namespace std; struct CodeNode { char m_code; int m_frequency; CodeNode* m_parent; shared_ptr<CodeNode> m_left; shared_ptr<CodeNode> m_right; CodeNode(char code, int frequency) : m_code(code), m_frequency(frequency), m_parent(0), m_left(0), m_right(...
ALGO
0.999987
4.248761
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2016-08-12T06:38:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3d5f732...
94941f3e-9dbf-4f28-aa81-d66fd786c163
palilo815/ps
baekjoon/5000/5721.cpp
#include <bits/stdc++.h> #define loop(i,n) for(int i=0;i<n;++i) using namespace std; const int MAX = 100000; int R[MAX], C[MAX]; int DP[MAX]; int solve(int arr[], int len) { if (len == 1) return arr[0]; memset(DP, 0, sizeof(int) * len); DP[0] = arr[0], DP[1] = max(arr[0], arr[1]); for (int i = 2; i <...
ALGO
0.999875
4.575244
{ "github_metadata": { "branch": "master", "commit_count": 6725, "repo_created_at": "2020-01-12T04:58:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22ac41d...
cb4fc8ff-c86b-490b-a8bc-1805ce09f00f
y761823/ACM-code
POJ/p2960.cpp
#include <cstdio> #include <algorithm> #include <iostream> #include <cstring> #include <stack> using namespace std; const int MAXN = 10010; int s[MAXN], sg[MAXN]; bool mex[110]; int k, m; void build_sg() { for(int i = 0; i <= 10000; ++i) { memset(mex, 0, sizeof(mex)); for(int j = 0; j < k; ++j) i...
ALGO
0.999616
3.047462
{ "github_metadata": { "branch": "master", "commit_count": 598, "repo_created_at": "2015-05-11T15:21: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": "3111c141...
bf8f5b4b-69d4-49a0-a7e9-18cd5112aa3a
ayymanj/Leetcode
0102-binary-tree-level-order-traversal/0102-binary-tree-level-order-traversal.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.999983
5.919741
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2024-09-22T11:39: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": "d4e7fe93df4...
e5ef9a84-e0a8-440d-ab0c-afafa1a7f31f
Jay7221/competitve-programming
cses/Tree_Algorithms/Tree_Matching.cpp
#include <bits/stdc++.h> using namespace std; //#pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC target("avx,avx2,avx512,fma") template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } template<typename T_container,...
ALGO
0.999226
4.135938
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-20T15:54:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df534700d2fa...
d76fd058-509f-4fbb-818d-9a5ec639c27f
sekti/retrieval-test
util/line.h
#ifndef LINE_H #define LINE_H #include<vector> #include<cassert> using namespace std; /* todo: properly understand move semantics */ template<typename T> vector<T> operator^(const vector<T> &v1, const vector<T> &v2) { vector<T> v3(v1); for(int i = 0; i < (int)v2.size(); ++i) { v3[i] ^= v2[i]; } ...
ALGO
0.96012
5.260026
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-02-05T17:18:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b6a54e978...
ea685073-9b53-4650-8473-f3793bf595d3
nordicolympiad/baltic-olympiad-2017
day1/railway/input_format_validators/testRailway.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; bool totalSuccess = true; void assert(bool expr, string failureString) { if(!expr) { cerr << failureString << endl; totalSuccess = false; return; } } int main() { int maxM = 100000; int maxN = 200000; int maxS = 200000; std::...
ALGO
0.999621
3.973962
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-04-25T16:32:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e28b26607...
474cc902-e467-4408-ba6b-511c629111e6
bnugent97/CSCI1230Final
src/terraingenerator.cpp
#include "terraingenerator.h" #include <cmath> #include "glm/glm.hpp" #include <glm/gtc/random.hpp> #include <array> #include <vector> #include <algorithm> #include <limits> #include "settings.h" // Constructor TerrainGenerator::TerrainGenerator() { m_wireshade = false; // TA SOLUTION //Define resolution of ...
TOOL
0.980368
5.617983
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-11-20T18:00: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": "7dcc468aae8...
42bdbf25-a09d-4e1d-8332-1ba158b1e24c
M6894/cpp-discipline
block-2/22-algorithms-partition.cpp
// 22 #include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; enum class Gender { FEMALE, MALE }; struct Person { int age; // возраст Gender gender; // пол bool is_employed; // имеет ли работу }; template <typename InputIt> int ComputeMedianAge(InputI...
TOOL
0.989094
4.924914
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2020-01-21T10:22: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": "5b0c98abc...
13415820-5376-4ace-8175-39de1161ff78
nikolapesic2802/Programming-Practice
Circle/main.cpp
/* -Simulate the process to get the final circle. -We have 2 choices to do when going backwards, so it will be 2^k final circles. -Don't count the same circles by memorizing which ones we counted in a map(in all orientations). */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ex...
ALGO
0.999996
3.750876
{ "github_metadata": { "branch": "master", "commit_count": 371, "repo_created_at": "2018-11-05T15:11:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ceaf5adc...
eecf768f-cc47-4dfb-b2a7-c8e55d8b0ea0
notimesea/codes
poly_inverse.hpp
#include <bits/stdc++.h> using namespace std; using ll = long long; inline ll mod_pow(ll a, ll e, ll mod) { ll r = 1; while (e) { if (e & 1) r = (__int128)r * a % mod; a = (__int128)a * a % mod; e >>= 1; } return r; } inline ll mod_inv(ll a, ll mod) { return mod_pow(a, mod...
ALGO
0.999721
4.397884
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2014-02-02T19:14:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8fee9e18...
ef949e87-63a9-459d-aefc-afc1477c2b6e
jnervo/algorithm
exam/exam/string_player.cpp
// 2016-09-11, 360 exam // description: // input: full_string, string_A, string_B // output: if you can find string_A, string_B from full_string? Forward, Backward or Both? #include "string_player.h" int str_find(const char *s, const char *t, const int start_index) { int i, j, k; for (i = start_index; s[i] !...
ALGO
0.999753
4.453707
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-09-12T08:06:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4df36736...