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
0cf0076b-10df-4d75-915e-6aaf96783dda
yenthanh132/Codes
Codechef/2015/NOV/RECRECOV.cpp
#include <bits/stdc++.h> #define pb push_back #define sqr(x) (x)*(x) #define sz(a) int(a.size()) #define reset(a,b) memset(a,b,sizeof(a)) #define oo 1000000007 using namespace std; typedef pair<int,int> pii; typedef long long ll; const int maxn=107; int mx[maxn],my[maxn],dis[maxn],myq[maxn]; int n,m; vector<int> e[...
ALGO
0.999944
4.000914
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-24T09:41:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b597525be...
199edd01-bf97-44fb-a04f-8dc23cda234d
saifsdin/CodingInterview
DSASheet/Array-string/GeekForGeeks/Compete_the_skills.cpp
/* https://practice.geeksforgeeks.org/problems/compete-the-skills5807/1?page=1&difficulty[]=-2&category[]=Arrays&sortBy=submissions A and B are good friend and programmers. They are always in a healthy competition with each other. They decide to judge the best among them by competing. They do so by comparing their thr...
ALGO
0.999984
5.246883
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-06-22T12:28: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": "fde9a87b3ff...
d88b466d-85f3-4fd0-8702-f104672ea653
ppparkta/BOJ
백준/Gold/2758. 로또/로또.cc
#include <iostream> #include <string.h> #include <algorithm> using namespace std; long long t; long long dp[11][20001]; long long ro(long long n, long long m); void solve(); void solve() { long long n, m; cin >> n >> m; cout << ro(n, m) << '\n'; } long long ro(long long x, long long y) { if (y <= 0)...
ALGO
0.999951
4.570478
{ "github_metadata": { "branch": "newb", "commit_count": 257, "repo_created_at": "2022-05-15T08:05:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9499afc31f...
a9e69329-5c7c-4401-a69b-1e09d1f2d15f
Tanjim131/Problem-Solving
UVa/10260.cpp
#include<cstdio> #include<cstring> using namespace std; int check(char i){ if(i == 'A' || i == 'E' || i == 'I' || i == 'O' || i == 'U' || i == 'H' || i == 'W' || i == 'Y') return 0; return 1; } int gen(char i){ if(i == 'B' || i == 'F' || i == 'P' || i == 'V') return 1; else if(i == 'C' || i == 'G...
ALGO
0.999676
3.192903
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2020-05-27T20:39:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f36852c8...
35bffe5f-f67e-45af-a3c5-b39a47252896
gitcoder-aman/CPlusPlus-DSA
Stack_DSA/15MaxRectangleINBinaryMatrix.cpp
#include<iostream> #include<stack> #include<vector> using namespace std; //Time Complexity = O(n*m) //Space complexity = O(m) //m for column and n for row class Solution{ private: vector<int>nextSmallerElement(int* arr,int n){ stack<int>s; s.push(-1); vector<int>ans(n); ...
ALGO
0.999979
4.859442
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-07-10T03:28:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9de09353c8...
c7a88d95-6d66-4656-8c93-2ca1114c70f4
masayukisobe/atcoder
problems/bootcamp/hard/64/main.cpp
// #define _GLIBCXX_DEBUG // #pragma GCC optimize("O2,unroll-loops") #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define uint unsigned int #define ii pair<int,int> #define iii tuple<int,int,int> #define endl '\n' #define debug(x) cout << #x << ": " << x << endl #i...
ALGO
0.999885
3.64153
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2024-04-15T13:28: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": "e5128399f...
476e035f-f568-4b70-9237-064fdd126863
andremaravilha/DSc-Dissertation
source/src/util/local_search.h
#ifndef MANEUVER_SCHEDULING_LOCAL_SEARCH_H #define MANEUVER_SCHEDULING_LOCAL_SEARCH_H #include <list> #include <random> #include "../algorithm/algorithm.h" #include "../neighborhood/neighborhood.h" #include "../problem/problem.h" namespace orcs { namespace local_search { /** * Perform the stan...
ALGO
0.999961
6.421056
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-10-07T16:08:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4f1998864...
d9f3cbbc-2ae0-4da4-8ab2-596ca8030124
qwaker00/Olymp
PetrSu/Winter 2014/Day4/H/hax.cpp
#include <iostream> #include <cstdio> #include <string> #include <assert.h> #include <queue> #include <algorithm> typedef long long LL; typedef long long ll; typedef long double LD; typedef long double ld; using namespace std; const int N = 1000111; int n, k; int a[N]; priority_queue< pair<int, int> > q; int main(...
ALGO
0.999986
3.305391
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2012-09-04T15:56:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "16140521a...
2616fbbc-3341-44bf-8165-676076b1afc1
EL-800/LeetCode-Problems
1590. Make Sum Divisible by P.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int minSubarray(vector<int>& nums, int p) { int remove = 0; for (int num : nums) remove = (remove + num) % p; if (!remove) return 0; unordered_map<int, int> subCount; int ...
ALGO
0.999565
5.212861
{ "github_metadata": { "branch": "main", "commit_count": 524, "repo_created_at": "2023-11-27T23:21: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": "c509dde4f3...
85a6b1b3-5136-4ee7-a6cf-bcf0a42a87a9
josemar23ran/Carrera-de-Caballos
main.cpp
#include <iostream> #include <thread> #include <windows.h> #include <stdio.h> #include <conio.h> #include "graphics.h" using namespace std; int c; int meta_x = 600; void* carrera(void*) { while (!kbhit()) { c = rand() % 4; this_thread::sleep_for(chrono::milliseconds(50)); } } int main() { ...
TOOL
0.908145
3.77058
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-12T00:00: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": "0889cf895af3...
8ec5eea4-1b70-4951-a627-7962b03547bc
yyatsuo/atcoder
abc188/d.cpp
#include <bits/stdc++.h> #define INF INT_MAX #define ll long long #define ull unsigned long long #define rep(i,n) for(ll i=0; i<n; ++i) #define FOR(i, s, e) for(ll i=s; i<e; ++i) #define MOD 1000000007 using namespace std; template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;} temp...
ALGO
0.999946
3.958239
{ "github_metadata": { "branch": "master", "commit_count": 528, "repo_created_at": "2019-04-19T23:13:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ff9867c...
9a0b0f16-091b-4002-9567-70d2ab1bca04
LokiSparken/Computer-Graphics-Notes
Books/Computer Graphics/CG - Rendering/Ray Tracing/RayTracing by PeterShirley/Ray-Tracing-the-Next-Week/Chapter8/camera.h
#ifndef CAMERAH #define CAMERAH #include <cmath> #include "ray.h" #include "const.h" #include "mymath.h" /* 在透镜(光圈)上随机一点作光源。 这里在z=0平面上随机单位圆上点,因为通常vup设(0, 1, 0),当然这里在外部调用构造传入的参数也是这个。 所以此时透镜平面就是z=0即x,y轴构成的平面。 */ vec3 random_in_unit_disk() { vec3 p; do { p = 2.0*vec3(random_double(), rand...
TOOL
0.950227
5.075212
{ "github_metadata": { "branch": "master", "commit_count": 285, "repo_created_at": "2019-07-09T13:19:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85c077b...
f930ec7f-25d2-4422-8c1c-b120cbcb6016
srijoy-paul/CrackYourPlacement
Arrays/Spiral Matrix.c++
class Solution { public: vector<int> spiralOrder(vector<vector<int>> &matrix) { int n = matrix.size(); int m = matrix[0].size(); int top = 0, bottom = n - 1, left = 0, right = m - 1; vector<int> res; while (left <= right && top <= bottom) { for (int i...
ALGO
0.999996
6.233494
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-07-15T17:57: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": "2de906ac4fa...
d8a9cf7c-579a-4393-bb0e-a183fc53a32c
tomotakaeru/atcoder
200502_ABC165/E - Rotation Matching.cpp
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define REP(i,s,n) for(int i=s; i<(n); ++i) #define ALL(n) begin(n),end(n) using ll = long long; const ll INF = 1e18; template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chm...
ALGO
0.999982
3.733991
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-03-29T01:56: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": "5480aff84...
30ab295c-c7e9-43fb-aa27-066b5f5bf257
ihaagrawal/Leetcode-Daily-Questions
Day-0382: 2226. Maximum Candies Allocated to K Children.cpp
// 2226. Maximum Candies Allocated to K Children (MEDIUM) // https://leetcode.com/problems/maximum-candies-allocated-to-k-children/description/?envType=daily-question&envId=2025-03-14 class Solution { public: int maximumCandies(vector<int>& candies, long long k) { long long left = 1, right = *max_element(c...
ALGO
0.999975
6.346195
{ "github_metadata": { "branch": "main", "commit_count": 569, "repo_created_at": "2024-04-08T06: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": "dd1a6897e5...
9f1fccbb-163e-4ff4-b239-4c1df195b270
withtahmid/cp
NSUPS/2023-04-07_[Individual]_Individual_1/G.cpp
/** * * Author: withtahmid * Created: 2023-04-07 10:00:13 * * */ #include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include <debug.h> #else #define debug(...) #endif #define endl '\n' #define pb push_back #define all(v) v.begin(),v.end() #define sp(n) fixed << setprecision(n) #define sizeof(v)...
ALGO
0.999927
4.376431
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-09-24T11:00:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f3fe6cc25e...
cd0ae903-99f5-4e43-8278-b13869b80d06
code-google-com/cortex-vfx
include/IECore/MarchingCubes.h
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007-2011, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
ALGO
0.981879
6.896698
{ "github_metadata": { "branch": "master", "commit_count": 4443, "repo_created_at": "2015-03-15T14:57:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 21, "pull_requests": 0 }, "file_meta": { "content_id": "883d01...
7aba4cbd-df41-4915-9d71-a0d5a8b4eb13
ShucunZhao/Leetcode
C++/20Company/08Cisco_US/91DecodeWays/sol2withDP.cpp
class Solution { public: int numDecodings(string s) { /* i: 0 1 2 3 4 s: " 1 1 1 0 6 " dp: 0 0 0 0 0 dp[i]: the total decode ways in the first i chars of string. Inference formula: There are two cases: case 1: the cu...
ALGO
0.99977
5.30855
{ "github_metadata": { "branch": "main", "commit_count": 1047, "repo_created_at": "2022-09-27T05:51: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": "d7589db05...
04fdae5f-4f62-4783-a634-2a8cd0465a52
WHUCodingAndOpen/OpenCourseResources
专业必修课/高级程序设计/作业/常军/chapter9/9-1.cpp
#include <bits/stdc++.h> #ifdef _WIN32 #include <windows.h> #endif template <class T> // 数组类模板定义 class Array { private: T *list; // 用于存放动态分配的数组内存首地址 int size; // 数组大小(元素个数) public: Array(int sz = 50); // 构造函数 Array(const Array<T> &a); // 拷贝构造函数 ~Array(); ...
ALGO
0.999042
3.809741
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2023-05-15T14:45:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 121, "forks": 49, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "da868f6e...
26af26ba-e0ba-42ec-adf6-bec958705f2f
jki14/competitive-programming
legacy/2013/ChairTree_COT2.cpp
//============================================================================ // Name : ChairTree_COT2 // Author : Seter // Version : 1.00 // Copyright : WangZhe (Chongqing University Computer College) // Description : SPOJ COT2; 给定一棵点权树,询问指定两个节点路径上的点权种数 //============================================...
ALGO
0.999944
3.559135
{ "github_metadata": { "branch": "master", "commit_count": 363, "repo_created_at": "2019-01-21T03:40:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a51985a...
8287788a-9c19-49fa-81ce-7b4a9058a87f
spqjf12345/Programmers-Algorithm
C++/[SW] 2018_jumpTele.cpp
// // [SW] 2018_jumpTele.cpp // SOMA👩🏻‍💻 // // Created by JoSoJeong on 2021/04/30. // #include <stdio.h> #include <queue> #include <iostream> #include <string.h> using namespace std; queue<int> q; #define MAX 1000001 int visit[MAX]; int moving[3] = {1, 2}; //walk, jump void find_min_power(int n){ int start...
ALGO
0.999993
3.914343
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2021-04-25T15:44: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": "740c9042bee...
6de34333-58d8-4b60-b637-d3eca4028997
mapbox/mapbox-gl-native
src/mbgl/util/longest_common_subsequence.hpp
#pragma once #include <cstddef> #include <functional> #include <iterator> #include <vector> namespace mbgl { /* Computes the longest common subsequence (LCS) of sequences A and B, represented by pairs of random access iterators. The result is output to the provided output iterator. Equality of elements i...
ALGO
0.997337
6.885576
{ "github_metadata": { "branch": "master", "commit_count": 15978, "repo_created_at": "2014-01-27T17:14:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4413, "forks": 1327, "issues": 295, "pull_requests": 17 }, "file_meta": { "content_id":...
f2c2aaff-fc61-494f-a961-37b03a4aca2b
allenge007/my_cpp_code
codeforces/Codeforces Round 985 (Div. 1 + Div.2)/e.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 4, maxm = 4e5 + 4; int tf[maxm], prime[maxn], num, a[maxn]; void solve() { int n, p = 0; cin >> n; for(int i = 1; i <= n; i ++) { cin >> a[i]; } for(int i = 1; i <= n; i ++) { if(tf[a[i]] == 0) { if(p =...
ALGO
0.999757
3.647507
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2024-09-12T14:17: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": "9957428c9...
d108b9e2-7614-4423-80c2-33a42d1d28f5
sksanket165/DYPCOE
SECO2425C073 (4th Sem)/DSAL/Pr15_2.cpp
#include <iostream> #include <vector> #include <algorithm> #include <unordered_map> using namespace std; struct Edge { int u, v, weight; }; class DisjointSet { public: vector<int> parent, rank; DisjointSet(int n) { parent.resize(n); rank.resize(n, 0); for (int i = 0; i < n; i++) ...
ALGO
0.999963
5.020278
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2024-12-21T12:04: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": "8c8fcb803f1...
dafcff37-e50b-4366-86d4-0596f47c2e2e
IAiAye/cpp-study
00_Backjoon/11723.cpp
#include <iostream> #include <string> using namespace std; bool s[21]; int m; string str; void Input() { cin >> m; } void Solution() { while (m--) { cin >> str; if (str == "add") { int num; cin >> num; s[num] = true; } else if (...
ALGO
0.995087
4.789363
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2023-02-02T19:33: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": "906bb0d4ebd...
477712a6-4273-412a-93f9-a02df5c92852
hibit-at/atcoder
ABC/ABC200-299/ABC239/d.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <limits.h> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> #include <stack> using namespace std; #define rep(i, n) for (int i = 0; i < n; i+...
ALGO
0.999465
3.973631
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2021-03-21T07:33: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": "b9519d3b...
ee7e7650-2565-4166-b0ec-a697ee92d388
b14ckb3rry/Lab
2nd_Year_1st_cem/DSA & Algorithom/infix_to_postfix_Hanoi_Balance.cpp
// #include <bits/stdc++.h> // using namespace std; // int prec(char c) // { // if (c == '^') // return 3; // else if (c == '/' || c == '*') // return 2; // else if (c == '+' || c == '-') // return 1; // else // return -1; // } // int main(){ // string s; // ...
ALGO
0.999759
4.818686
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-12-28T05:31:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "889f742877bb...
40d91fd5-9636-47df-bcbd-0e5c515726fd
TenFifteen/SummerCamp
spw/773-sliding-puzzle/solve.cc
/** * Problem: On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, * and an empty square represented by 0. * A move consists of choosing 0 and a 4-directionally adjacent number and swapping it. * The state of the board is solved if and only if the board is [[1,2,3],...
ALGO
0.999968
5.916872
{ "github_metadata": { "branch": "master", "commit_count": 2242, "repo_created_at": "2015-07-06T03:15:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "834d56ff...
e4913350-68e2-4511-a623-8647c35f9209
matthill/DemoOpenCV
ViolationDetection/CVUtil.cpp
#ifdef _MSC_VER #define snprintf _snprintf_s #endif #include "util.h" #include "CVUtil.h" #include <string> const int DENSITY_LEVEL[5] = {0, 25, 65, 80, 100}; const std::string DENSITY_TYPE[] = {"Free", "Uncrowded", "Crowded", "Too crowded"}; void drawTracks(cv::Mat& imgFrame, const CTracker& tracker) { cv::Scala...
ALGO
0.982244
3.44145
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-09-03T13:43:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "516673d836...
4ce5f5ac-2de9-43af-9e9e-eaee1f590216
ybouret/upsylon
src/chemical/y/chemical/sys/omega.cpp
#include "y/chemical/system.hpp" #include "y/mkl/kernel/apk.hpp" #include "y/mkl/kernel/gram-schmidt.hpp" #include <iomanip> namespace upsylon { using namespace mkl; namespace Chemical { void System::buildOmega() { Y_CHEMICAL_PRINTLN(" <Omega>"); ...
ALGO
0.908636
3.455729
{ "github_metadata": { "branch": "master", "commit_count": 7679, "repo_created_at": "2018-06-26T06:56: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": "7884d65...
5c3da9f6-e4f3-4143-9657-1246f70bcce9
OpenFOAM/OpenFOAM-dev
src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\...
ALGO
0.990372
6.656812
{ "github_metadata": { "branch": "master", "commit_count": 8589, "repo_created_at": "2014-12-10T15:47:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1770, "forks": 642, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "6d...
1e478eca-7df2-4375-88cd-da5c9b78fa50
viktodorov/FIB2
EDA/jutge/P22295.cc
#include <iostream> #include <vector> using namespace std; typedef vector<char> VC; typedef vector<VC> VVC; typedef vector<bool> VB; typedef vector<VB> VVB; void print_path(VC& path){ for (int i = 0; i < path.size(); ++i){ cout << path[i]; } cout << endl; } //recursive void pathing (VC path, VV...
ALGO
0.999833
4.565973
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-03-10T16:54: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": "ac32e4ee649...
9cd84393-bc21-4e9a-b285-6aac79e6224d
Autumnal-Joy/leetcode
3001-4000/3331/main.cpp
#include <bits/stdc++.h> using namespace std; static auto _ = []() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }(); class Solution { public: vector<int> findSubtreeSizes(vector<int> &parent, string s) { const auto n = static_cast<int>(parent.size()); ...
ALGO
0.99998
5.145205
{ "github_metadata": { "branch": "main", "commit_count": 649, "repo_created_at": "2024-09-27T15:34:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fe093cc5d...
cd00faba-e3d4-48a1-b46f-74bc324f7522
raymon1/data-structures-and-algorithms
3 graphs/week4_paths2/3_shortest_paths/shortest_paths.cpp
#include <iostream> #include <limits> #include <vector> #include <queue> using std::vector; using std::queue; using std::pair; using std::priority_queue; bool relax(int u, int v, vector<long long> &distances, int cost){ if(distances[u] == std::numeric_limits<long long>::max()) { return false; } if(distances...
ALGO
0.999943
3.688842
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-07-04T23:26: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": "b01156e35f...
0bf574af-705f-4118-92fa-16bc5dc951d8
lidwin2win/Mobile_Computing_Simulation
Sha_1.cpp
#include<iostream> #include<bitset> #include<string> #include<string> #include<bitset> #include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; string H[5]={"67452301","EFCDAB89","98BADCFE","10325476","C3D2E1F0"}; string K[4]={"5A827999","6ED9EBA1","8F1BBCDC","CA62C1D6"}; /* H[0] ...
ALGO
0.999782
3.158758
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-10T16:01:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46dac23f49...
1fbe78d5-22c4-499b-8dff-3ff5a25d932d
isaigm/Examples
c++/radix_sort.cpp
#include <iostream> #include <vector> #include <queue> int count_digits(int k) { int c = 0; while (k > 0) { k /= 10; c++; } return c; } int main() { std::vector<int> nums{123, 2, 3, 444, 1, 21, 20, 23, 11, 33, 3}; std::vector<std::queue<int>> ld(10); int max_digits = 0; ...
ALGO
0.999981
5.561756
{ "github_metadata": { "branch": "master", "commit_count": 302, "repo_created_at": "2019-06-06T04:52:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e97f60e...
ca3d898a-f777-4d87-813b-5d72e7ee57b3
UestcXiye/Leetcode
566.重塑矩阵.cpp
/* * @lc app=leetcode.cn id=566 lang=cpp * * [566] 重塑矩阵 */ // @lc code=start class Solution { public: vector<vector<int>> matrixReshape(vector<vector<int>> &mat, int r, int c) { int m = mat.size(), n = m ? mat[0].size() : 0; // 特判 if (m == r && n == c) return mat; ...
ALGO
0.999749
6.989148
{ "github_metadata": { "branch": "main", "commit_count": 338, "repo_created_at": "2023-05-04T13:56:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98086126d0...
321b0669-7ee1-4cae-9543-277fbc995185
MarZaitseva/cpp
project/particle.cpp
#include "particle_interface.h" #include <iostream> #include <vector> #include <cmath> Particle::Particle() { coord_p = { 0, 0, 0 }; speed = { 0, 0, 0 }; v12 = { 0, 0, 0 }; } Particle::Particle(double x_0, double y_0, double z_0, double vx_0, double vy_0, double vz_0) { coord_p = { x_0, y_0, z_0 }; speed = { vx_...
ALGO
0.913774
4.626143
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-02-25T11:47: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": "07a1ebd0b42...
b99413d9-9fb9-4864-9168-a5ef452ba8db
jordan-jarolim/RSA-kry-fit-vutbr
KRY-RSA/KRY-RSA/rsa.cpp
// // rsa.cpp // KRY-RSA // // Created by <NAME> on 30.04.18. // Copyright © 2018 FIT VUTBR. All rights reserved. // #include "rsa.hpp" #include <iostream> #include <string.h> #define BREAK_ITERATIONS 1000000 using namespace std; /** * Get N = p*q */ void Rsa::getN(mpz_t N, mpz_t p, mpz_t q){ mpz_mul(N, p...
ALGO
0.999441
5.12974
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-04-20T12:53: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": "355f5cef4...
b2921bdc-bc7c-4973-8e0e-bd52362fe456
parb220/dsmh_npsol_package
src/dsmh_basic/CEquiEnergyModel.cpp
#include <cmath> #include <algorithm> #include <vector> #include <functional> #include <ctime> #include <fstream> #include "CSampleIDWeight.hpp" #include "CEESParameter.hpp" #include "CStorageHead.hpp" #include "dw_dense_matrix.hpp" #include "dw_math.h" #include "CEquiEnergyModel.hpp" #include "CMetropolis.hpp" #inclu...
ALGO
0.999783
4.984747
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-04-11T18:45:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3a4da2e7...
439d960a-ef31-4bd9-af78-f434b77dd82b
Oaik/problems-solution
codeforces/contest/1176/a/55389571.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define clr(a,b) memset(a,b,sizeof(a)) #define all(v) ((v).begin()),((v).end()) void debug() { #ifndef ONLINE_JUDGE freopen("input.in", "rt", stdin); // freopen("output.txt", "wt", stdout); #endif cout << fixed << setprecision(4); ios::sync_with_...
ALGO
0.999987
4.142431
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2018-09-09T09:44:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa6f7993...
ae808323-b372-45cb-9ef5-803ed0f339ba
YKarpachev/Labs-Cpp-Python
lab4/3.cpp
#include <cmath> #include <iostream> #include <vector> std::vector<double> seidel(const std::vector<std::vector<double>> &A, const std::vector<double> &B, double tol = 1e-2, int max_iterations = 1000) { int n = B.size(); std::vector<double> x(n, 0.0); for (in...
ALGO
0.999985
5.504489
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-04-29T21:29: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": "10a4f1fdba4...
04effa51-032e-47b4-aecd-5e5846824079
u-wyh/luogu-code
P1419.cpp
#include <bits/stdc++.h> #define maxn 100010 using namespace std; int n, s, t, i; double l, r, mid, ans; double a[maxn]; int b[maxn]; double sum[maxn]; int q[maxn]; bool check(double x) { int i, l = 1, r = 0; for (i = 1; i <= n; i++) a[i] = (double)b[i] - x; sum[0] = 0; for (i = 1; i <= n; i+...
ALGO
0.99996
4.319867
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2025-05-09T09:40: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": "fc6b8841666...
bec8b752-e6a3-4534-bf1c-0eb8d0b5b795
iuliagroza/Algorithms
Fleury/fleury.cpp
// This code is contributed by Riyazul555 and iuliagroza // Time Complexity = O(V + E) where V is the number of vertices and E is the number of edges. // Space Complexity = O(V + E) where V is the number of vertices and E is the number of edges. #include <fstream> #include <vector> #include <bitset> #define nMax ...
ALGO
0.999952
3.981997
{ "github_metadata": { "branch": "main", "commit_count": 216, "repo_created_at": "2020-07-28T14:22:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 201, "forks": 49, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8668250...
5b6c0afb-9f9b-4bb1-b026-ae61429a486c
esbmc/esbmc
regression/esbmc-cpp/vector/ch21_17/main.cpp
// Fig. 21.30: fig21_30.cpp // Mathematical algorithms of the standard library. #include <iostream> #include <iterator> #include <string> using std::cout; using std::endl; #include <algorithm> // algorithm definitions #include <numeric> // accumulate is defined here #include <vector> bool greater9( int ); void...
ALGO
0.99947
5.153823
{ "github_metadata": { "branch": "master", "commit_count": 24772, "repo_created_at": "2015-06-20T19:35:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 360, "forks": 115, "issues": 452, "pull_requests": 82 }, "file_meta": { "content_id": "...
86164edf-12fc-4903-b352-f745e7851189
brownspy1/Phitron
Semister 02/Data Structure/Week 03/Module 09/Head and Tail.cpp
// Created by M.Mahadi on 2024-08-11 Time:16-53-44 #include <iostream> using namespace std; class Node { public: Node *prev; int value; Node *next; Node(int value) { this->prev = NULL; this->value = value; this->next = NULL; } }; void print(Node *Head) { while (Head ...
ALGO
0.999853
5.081717
{ "github_metadata": { "branch": "main", "commit_count": 552, "repo_created_at": "2024-04-23T17:31:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d176b027e...
639ebe08-6e2a-4294-bb81-57403bbc0dec
Obirvalger/espp
course.hpp
#ifndef COURSE_HPP #define COURSE_HPP #include <set> #include <map> #include<fstream> #include<sstream> #include "vector_operations.hpp" #include "polynom.hpp" #include "multi_affine.hpp" #include "espp.h" using namespace std; vector<vector<bool>> reverse(vector<vector<bool>> matrix) { int i, j, k, l, n = matrix.s...
ALGO
0.946392
3.161925
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-04-08T20: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": "eb814c580...
2da77ed2-0f3d-4336-b119-8263a46ec1aa
ideefixe77/war-card-game-simulator
war.cpp
#include <stdio.h> #include <time.h> #include <list> #include <vector> #include <algorithm> using namespace std; struct put_s { int card_1; int card_2; }; enum sort_type { SORT_RANDOM, SORT_NORMAL, SORT_REVERSE }; enum strategy_type { RANDOM_STRATEGY = 0, PLAYER_1_FIRST = 1, PLAYER_2_FIRST = 2, STRONGER_FIR...
ALGO
0.999795
3.543369
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-12-15T22:11: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": "e698f60d14fc...
02a96790-72fa-4657-9705-eb13298685d7
wujiadi/MeshBasedWarping
ImageWrap.cpp
#include "ImageWrap.h" #include <cmath> #include <QImage> #include <ANN/ANN.h> // ANN declarations int k = 1; // number of nearest neighbors int dim = 2; // dimension double eps = 0; // error bound int maxPts = 1000; // maximum number of data points int sqRad = 1...
ALGO
0.992378
4.578875
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-03-09T04:37:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da68bbfd9...
a76facad-d0ea-48b5-a5f2-3b8245619aca
ichoqueru/11_arreglos
ejemplo1.cpp
#include<iostream> using namespace std; int main(){ int m, i, A[20], max, min; cout << "Ingrese la cantidad de elementos: "; cin >> m; while(m <= 0 || m > 20){ cout << "El numero debe ser mayor que 0 y menor o igual a 20" << endl; cout << "Ingrese otro numero: "; cin >> m; ...
ALGO
0.995861
3.591958
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-06-12T04:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a452845c30cc...
61dacf65-809e-44ab-8055-0029e2ad4d21
AidenKim923/algorithm
프로그래머스/3/138475. 억억단을 외우자/억억단을 외우자.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; struct stNum { int i; int c; }; stNum dp[5000001]; bool cmp(stNum& a, stNum& b) { if (a.c == b.c) { return a.i < b.i; } return a.c > b.c; } vector<int> solution(int e, vector<int> starts) { vector<int> ...
ALGO
0.999983
3.737386
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2023-05-19T19:52: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": "e915dacbbf...
095ea990-418b-42c0-896a-895a9e5e21ed
LYoGA/ACM
DP/UVA10617.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAXN = 65; char str[MAXN]; long long d[MAXN][MAXN]; long long dp(int a, int b) { if (a > b) return 0; if (a == b) return d[a][b] = 1; if (d[a][b] != -1) return d[a][b]; ...
ALGO
0.999956
4.026714
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2013-08-25T08:25: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": "31e0eb66...
9f4c5c7f-e903-454e-b266-c594dfb7072c
Rajesh2723/CompetitveCoding-.CodingNinjas
C++ Standard Template Library I/MaximumLengthPairChain.cpp
/* Maximum length pair chain Send Feedback You are given ‘N’ pairs of integers in which the first number is always smaller than the second number i.e in pair (a,b) -> a < b always. Now we define a pair chain as the continuous arrangement of pairs in which a pair (c,d) can follow another pair (a,b) only when b < c. Find...
ALGO
0.999943
5.453257
{ "github_metadata": { "branch": "main", "commit_count": 404, "repo_created_at": "2022-09-12T16:51: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": "5517f28dff...
651dc1c0-a883-4296-9396-011730a3c5cd
luojiahao-cn/zlab_robots
catkin_ws/src/frcobot_description/src/DualArmCalibrator.cpp
#include <ros/ros.h> #include <image_transport/image_transport.h> #include <cv_bridge/cv_bridge.h> #include <sensor_msgs/Image.h> #include <apriltag_ros/AprilTagDetection.h> #include <apriltag_ros/AprilTagDetectionArray.h> #include <geometry_msgs/PoseStamped.h> #include <tf2_ros/transform_broadcaster.h> #include <tf2_r...
TOOL
0.937228
5.886192
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2025-02-22T09:00:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5dc2a7d58...
212e8b09-7c12-4bbb-bd95-c23000914a04
zhichen3/Microphysics
networks/sn160/reaclib_rates.H
#ifndef REACLIB_RATES_H #define REACLIB_RATES_H #include <AMReX.H> #include <AMReX_Print.H> #include <actual_network.H> using namespace Rates; struct rate_eval_t { Array1D<Real, 1, NumRates> screened_rates; Array1D<Real, 1, NumRates> dscreened_rates_dT; Array1D<Real, NrateReaclib+1, NrateReaclib+Nrate...
ALGO
0.978684
4.897302
{ "github_metadata": { "branch": "main", "commit_count": 2954, "repo_created_at": "2022-07-15T22:34:20.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "AMReX-Astro/Microphysics", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "co...
15d9167a-0bf8-4c44-a1b0-a153fee1fdf7
tommy16102/2022-algorithm-study
2022/10주차/정환훈/1931_회의실 배정.cpp
#include <bits/stdc++.h> using namespace std; int n; vector<pair<int, int>> meeting; void input() { cin >> n; for (int i = 0; i < n; i++) { int start; int end; cin >> start >> end; meeting.push_back({ start,end }); } } void solve() { // 시작 시간 기준으로 정렬 sort(meeting.begin(), meeting.end()); int i = 0; in...
ALGO
0.999956
4.14477
{ "github_metadata": { "branch": "main", "commit_count": 725, "repo_created_at": "2021-07-12T21:58:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "e535390ecb...
488b0d55-7dd6-40ec-965e-750b18d13e1e
zhaoxuhui/bundle-adjustment
main.cpp
#include<iostream> #include"ORBMatching.h" #include<g2o/core/sparse_optimizer.h> #include<g2o/core/block_solver.h> #include<g2o/core/robust_kernel.h> #include<g2o/core/robust_kernel_impl.h> #include<g2o/core/optimization_algorithm_levenberg.h> #include<g2o/solvers/cholmod/linear_solver_cholmod.h> #include<g2o/types/sla...
ALGO
0.999444
3.987441
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-09T14:25:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "804c6db03d...
ec1ef0d5-9f0d-4870-b371-aeb11cd20f3d
diserus/SAOD-labs
lab4/main.cpp
#include <iostream> using namespace std; void FillInc(int A[],int n) { for(int i=0;i<n;i++) { A[i]=i; } } void FillDec(int A[],int n) { for(int i=0;i<n;i++) { A[i]=n-(i+1); } } void FillRand(int A[],int n) { for (int i=0;i<n;i++) { A[i]=rand()%10; } } in...
ALGO
0.997898
4.479937
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-02-22T12:58:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a412f18cc00...
43722022-c815-4a17-bde9-a6514b78251f
cofls6581/hongjangal
백준_코테연습/BFS 알고리즘/연구소 2/hyejun.cpp
#include <iostream> #include <queue> #include <vector> #include <cstring> #include <tuple> using namespace std; int n, m; int a[50][50]; int dist[50][50]; int dx[4] = { 0,-1,0,1 }; int dy[4] = { -1,0,1,0 }; vector<pair<int, int>> candi; int ans = -1; void bfs() { // BFS memset(dist, -1, sizeof(dist)); queue<pair<...
ALGO
0.99992
4.323028
{ "github_metadata": { "branch": "main", "commit_count": 716, "repo_created_at": "2022-01-09T06:48:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1870714dce...
d2a27a2a-279c-432c-88af-276a3b8a7527
bosslee21/Nyu-tandon-bridge-winter-2022
week11/HW11/jlb9419_hw11_q1.cpp
#include <iostream> using namespace std; void printTriangle(int n); void printOpositeTriangle(int n); void printRuler(int n); int main() { printTriangle(4); printOpositeTriangle(4); printRuler(4); return 0; } void printTriangle(int n) { if(n == 0) { return; } else { printTriangle...
ALGO
0.999776
3.63956
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-05-24T18:50:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34bb09df97b...
b026ba19-39cf-44b7-aeea-7fc50276fac2
hengyuekang/Algorithm_exercise
leetcode_weekly_competition /2013.检测正方形.cpp
/* * @lc app=leetcode.cn id=2013 lang=cpp * * [2013] 检测正方形 */ // @lc code=start #include <iostream> #include <string> #include <vector> #include <deque> #include <list> #include <forward_list> #include <array> #include <fstream> #include <stack> #include <queue> #include <algorithm> #include <numeric> #include <in...
ALGO
0.99942
5.896372
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2021-03-03T11:09:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd65e4db0...
cc2bff86-a34f-4efd-92ae-81f07761275f
kendryte/nncase
src/Native/src/kernels/stackvm/reference/topk.cpp
/* Copyright 2019-2021 Canaan Inc. * * 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 agreed ...
ALGO
0.999802
7.363577
{ "github_metadata": { "branch": "master", "commit_count": 2257, "repo_created_at": "2018-04-04T12:11:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 799, "forks": 198, "issues": 15, "pull_requests": 11 }, "file_meta": { "content_id": "15...
b6a843ae-69fc-4cb0-9ee7-60b8588dd290
srmacario/competitive-programming
codeforces/CFR_686/d.cpp
#include <bits/stdc++.h> using namespace std; #define st first #define nd second #define pb push_back #define cl(x,v) memset((x), (v), sizeof(x)) #define db(x) cerr << #x << " == " << x << endl #define dbs(x) cerr << x << endl #define _ << ", " << typedef long long ll; typedef long double ld; typedef pair<int,int> p...
ALGO
0.999907
3.787841
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-03-20T13:55: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": "46274ced0...
f8660b2e-c08b-4e2b-b0c5-5b05d1a308db
topology-tool-kit/ttk-paraview
VTK/Accelerators/Vtkm/Filters/vtkmClip.cxx
// SPDX-FileCopyrightText: Copyright (c) <NAME>, <NAME>, <NAME> // SPDX-License-Identifier: BSD-3-Clause #include "vtkmClip.h" #include "vtkmClipInternals.h" #include "vtkCellIterator.h" #include "vtkDataArray.h" #include "vtkDataSet.h" #include "vtkDemandDrivenPipeline.h" #include "vtkImplicitFunction.h" #include "v...
TOOL
0.916209
7.15735
{ "github_metadata": { "branch": "5.13.0", "commit_count": 133, "repo_created_at": "2020-09-16T10:00:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db4c13b...
410367f0-e68e-452c-9b6c-60b0b645fc1f
skhapijulhossen/data-structures
stack/Stack.cpp
#include <iostream> // Stack Class class Stack { private: int size, top; int *array; public: Stack(int size) { this->size = size; this->top = -1; this->array = new int[size]; std::cout << "Stack Initialized"; } // bool push(int data) { if (this-...
ALGO
0.96156
4.768789
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-06-22T09:05: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": "6dc659fe2eb...
d0e904d4-587a-4c8b-804b-c0a045092a60
julliet27/Past_solved_problem
codeforceClock.cpp
#include<bits/stdc++.h> #define ll long long int #define endline "\n" #define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) using namespace std; const int mod=1e9+7; const int mx=1e6+1; vector<ll>prime; ////// ALL Prime Numbers ////void AllprimeNum(){ //// bool CheckIsPrime[mx]; //// ////...
ALGO
0.999429
4.163826
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-04-23T20:00: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": "6005759690a...
5d513a13-a376-4662-b958-19ff34089d37
banimania/CompetitiveProgramming
Codeforces/831B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef vector<ll> vll; #define REP(i, a, b) for (int i = a; i < b; ++i) #define REPV(i, a, b) for (int i = a; i >= b; --i) #define SCAN(a, n) for (int i = 0; i < n; ++i) cin >> a[i] #define PRINT(a) for (int i = 0; i < a.size(); ++i) { cout << ...
ALGO
0.999984
4.047757
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2025-01-31T20:06:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afd2c9ebcf...
b7498560-4758-4bde-ab54-8c7ef14b6397
john-zal/GonGmG
level2/캐시.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* 캐시.cpp :+: :+: :+: ...
ALGO
0.999584
5.263725
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2022-01-24T04:06:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24da66c1813...
086e08ae-fba8-45e6-937c-f221d452709f
rSullivan11/SchoolWork
Ernsburger/first/Week1/Day2/Class/review_1_files/01_parameter_passing/Project/Main.cpp
/* <NAME> CS A250 January 1, 2025 Program to compute the perimeter and the area of a rectangle. */ #include <iostream> #include <iomanip> // to format decimals using namespace std; // NOTE: Function declarations must be written before the main() function void welcomeMessage(); // welcomeMessage - Displays a m...
TOOL
0.976633
5.521512
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-03-04T20:39: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": "5c64b39b4...
e21dc78c-fa48-4344-91a4-3d05270f575c
mhw-mathcode/acm-algorithm
数据结构/fhq-treap维护值域.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; struct node { int l, r; int key, val; int siz; } t[N << 1]; int idx, dl, dr, rt, temp; int get_rand(int x) // 新建一个节点 { t[++idx].key = x; t[idx].val = rand(); t[idx].siz = 1; return idx; } void push_up(int pos) { // 左右儿子...
ALGO
0.999969
5.141758
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-05-14T01:18: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": "90899209f66...
d6e9237d-a4d5-4b10-86e2-af93a3479169
danyaffff/ITMO-Programming
Sem 2, Lab 3/classes.cpp
#include "Square.hpp" #include <cmath> #include <iostream> square::square(point p, double e, double a): a(p), rib(e), angle(a) {} double square::getX() { return this->a.x; } double square::getY() { return this->a.y; } bool square::operator== (square &s) { double square1 = pow(this->rib, 2), square2 = po...
TOOL
0.981422
3.435438
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2020-02-08T21:38: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": "c88e7e9f...
04818b0a-e366-4334-8f5b-0a760a61a757
Just1Developer/cs-tulip
bitvector.cpp
#include "bitvector.h" #include <bit> /** * Creates a new bitvector. Initializes all values to prevent unwanted errors and warnings, * and reads the bitvector from a string to a vector\<uint64>.<br/> * To reduce shift operations, the bits inside a 64-bit word are stored from right to left, so * in reverse order.<...
ALGO
0.970309
5.11156
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-12T15:25: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": "256ab5242079...
a9646008-e2ff-4e1d-9cf2-240d6e146759
wahid6313/Dsa-Questions
Arrays2/rearrangeElementSign.cpp
#include <iostream> #include <vector> using namespace std; vector<int> rearrangeBySign(vector<int>& nums) { int n = nums.size(); vector<int> v(n); int pos = 0, neg = 1; for (int i = 0; i < n; i++) { if (nums[i] > 0) { v[pos] = nums[i]; pos += 2; } else ...
ALGO
0.999994
5.217853
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2025-02-25T15:02: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": "81ebb9c165f...
8c2baee6-a89a-46ea-bf77-01b8de4f25cf
chaiyuntian/MPlugins
Plugins/Voxel/Source/Voxel/Private/VoxelSpawners/VoxelSpawnerUtilities.cpp
// Copyright 2020 Phyronnaz #include "VoxelSpawnerUtilities.h" #include "VoxelData/VoxelDataIncludes.h" #include "VoxelSpawners/VoxelSpawnerConfig.h" #include "VoxelSpawners/VoxelSpawnerManager.h" #include "VoxelSpawners/VoxelSpawnerRandomGenerator.h" TUniquePtr<FVoxelSpawnerRandomGenerator> FVoxelSpawnerUtilities::G...
ALGO
0.940338
6.595309
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2020-11-02T03:08: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": "d82d8cd1a5d...
acb6aae4-8222-4e0f-a0bd-65dfe25d7959
windystrife/UnrealEngine_NVIDIAGameWorks
Engine/Source/ThirdParty/PhysX/APEX_1.4/common/include/CurveImpl.h
/* * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
TOOL
0.993587
6.931682
{ "github_metadata": { "branch": "4.18-GameWorks", "commit_count": 14, "repo_created_at": "2018-03-06T15:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 176, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id"...
ed6be634-96ed-4eae-96d0-0daff62a72d8
Byuntil/BAEKJOON
백준 class3/g4_7662.cpp
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<map> using namespace std; int T, k, n; char c; priority_queue<int, vector<int>, greater<>> minQ; priority_queue<int, vector<int>, less<>> maxQ; map<int, int> m; //반대쪽 큐에서 제거된 값인지 구별하기 위해 map에 해당 숫자가 현재 몇 개 남았는지 기록(배열은 너무 커서 map으로) void ...
ALGO
0.999853
4.449775
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2022-01-23T15:00: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": "985b0805928...
a5bad35d-f68e-499c-97e0-a966a69999ad
ge49nuk/BCLmatrix
examples/simple/otherImplementations/gasnetTest.cpp
#include <bcl/bcl.hpp> #include <bcl/containers/CircularQueue.hpp> #include <bcl/containers/FastQueue.hpp> #include <string> #include <cstdlib> #include <time.h> #include <omp.h> #include <algorithm> #include <bitset> #include <random> #include <queue> using namespace std; static inline double curtime(void) { str...
ALGO
0.997127
3.444893
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2021-04-14T14:53:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c15bcee0...
4d9da1c7-bccc-4560-9191-f37fd45628d2
gefeng/cp
atcoder/abc349/D.cpp
#include <iostream> #include <utility> #include <cassert> #include <algorithm> #include <cmath> #include <array> #include <string> #include <vector> #include <queue> #include <set> #include <map> void run_case() { int64_t L, R; std::cin >> L >> R; std::vector<int64_t> p2(61, 1); for(int i = 1; i <= 60...
ALGO
0.999512
4.049058
{ "github_metadata": { "branch": "main", "commit_count": 980, "repo_created_at": "2022-07-19T19:38: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": "04fad06473...
802f1f95-f907-4f73-a2aa-9359756bf174
katsuroom/convexhullalgorithms
ConvexHullAlgorithms/main.cpp
#include <windows.h> #pragma comment(lib, "d2d1") #include <vector> #include <time.h> #include "Graphics.h" #include "Color.h" #include "Point.h" #include "ConvexHull.h" using namespace std; // variables Graphics* graphics; int screenWidth = 1024; int screenHeight = 600; const int uiSplit = 300; int originX = uiSpl...
ALGO
0.996352
4.610852
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-10-17T19:32: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": "52b98c0f1df7...
ea008a9b-1bba-4876-a241-08c129e5524f
CubbyFlow/CubbyFlow
Includes/Core/Utils/Serial-Impl.hpp
// This code is based on Jet framework. // Copyright (c) 2018 <NAME> // CubbyFlow is voxel-based fluid simulation engine for computer games. // Copyright (c) 2020 CubbyFlow Team // Core Part: <NAME>, <NAME>, <NAME>, <NAME> // AI Part: <NAME>, <NAME> // We are making my contributions/submissions to this project solely i...
ALGO
0.978563
7.38617
{ "github_metadata": { "branch": "main", "commit_count": 996, "repo_created_at": "2018-05-05T13:13:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 286, "forks": 34, "issues": 33, "pull_requests": 1 }, "file_meta": { "content_id": "84dfe71...
e8644988-b507-41ba-b9e0-86c74dfde508
JorgeIba/Reference
Graphs/Flow/Dinic.cpp
/* When all capacities are the unity: O(n*sqrt(n)) General without scaling: O(V^2*E) General with scaling: O(E*V*log(U)) where U is maximum flow */ template <typename T = int> struct Edge { int to; T flow, capacity; bool rev; Edge *res; Edge(int to, T capacity, bool rev = false) ...
ALGO
0.999411
4.615963
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2020-04-14T01:24:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a13ae8dc...
4924374b-1cfa-47df-877c-8123f79ab5d2
yzzupgo/MFTCG
Data/abc170_b/kartikea_gupta/wa/14296480.cpp
#include <iostream> #include <bits/stdc++.h> #include <string> #include <stdlib.h> #include <cmath> #include <cstdio> #include <algorithm> #include <fstream> #include <typeinfo> #define ll long long #define ld long double #define vll vector<ll> #define pll pair<ll, ll> #define vpll vector<pll> #define I insert #define ...
ALGO
0.999978
3.112735
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-08-22T17:27:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f6fef0465b5...
a37115e5-11c2-4953-bddf-a69a1578104d
StableAgOH/solved-problems
luogu/P5367.cpp
#include <iostream> #include <chrono> using namespace std; //========================================== #include <vector> const int maxn = 1e6+5; const int mod = 998244353; typedef long long ll; int n; ll c[maxn]; int lowbit(int x) { return x&-x; } void modify(int p,int x) { for(int i=p;i<=n;i+=lowbit(i)) c[i] += x; } ...
ALGO
0.999994
4.553469
{ "github_metadata": { "branch": "main", "commit_count": 197, "repo_created_at": "2022-03-31T10:13: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": "6a5dcddf64...
82b8607b-9dc3-4c15-a157-46c6b6ef4abb
WindowWasher/ProjectEuler
p19/ProjectEuler_19.cpp
#include <iostream> #include <utility> int main() { enum days {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}; int months[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; days day = Tuesday; int sundays = 0; for(int i = 1901; i <= 2000; i++) { if(i % 4 == 0) { if(i % 100 == 0) ...
ALGO
0.99944
3.953625
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-02-08T08:09: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": "5ac2d8afc0...
254b7b37-a2d0-4635-9506-184b73176b49
lovesh12/OS
Lab/Disk SSTF.cpp
#include <bits/stdc++.h> using namespace std; int getMINSeekTimeRequest(vector<int> &requests, vector<bool> &allocated, int head) { int n = requests.size(); int min = -1; int minIdx = -1; bool found = false; for (int i = 0; i < n; ++i) { if (!found) { if (!allocated[i]) { found = true; min = ...
ALGO
0.999988
4.330177
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-28T18:12: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": "fbe0757ca1...
0774bfdc-e051-4c09-b104-c621e14636e1
davisking/dlib
dlib/svm/feature_ranking.h
// Copyright (C) 2008 <NAME> (<EMAIL>) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_KERNEL_FEATURE_RANKINg_H_ #define DLIB_KERNEL_FEATURE_RANKINg_H_ #include <vector> #include <limits> #include "feature_ranking_abstract.h" #include "kcentroid.h" #include "../optimization.h"...
ALGO
0.998536
7.137888
{ "github_metadata": { "branch": "master", "commit_count": 8325, "repo_created_at": "2014-01-29T00:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14068, "forks": 3436, "issues": 41, "pull_requests": 5 }, "file_meta": { "content_id": ...
6b24a158-5ce1-466d-ba46-acac77aa8541
shubhampatil11/Competitive-Programming
Geometry/Polygon.cpp
struct Polygon { vector<Point> pts; Polygon(vector<Point> pts_) : pts(pts_) {} Polygon() : Polygon(vector<Point>()) {} void Add(Point p) { pts.push_back(p); } // positive for counterclockwise LD Area() { LD area = 0; int SZ = (int)pts.size(); for(int i = 0; ...
ALGO
0.999668
4.80794
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2018-06-17T16:26:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bdfd782b...
e4dbd678-a8af-4294-b157-6f3eb137d85b
sheng09/sheng09.github.io
2016/10/11/fast-permutation/permutation3.cpp
#include <iostream> #include <ctime> #include <string> static int n; static int end; static int count = 0; static int *sol = new int [n] {}; static int avai = 0; void print() { for(int i =0; i < n; ++i) std::cout << sol[i]; std::cout << ";" << count << "\n"; } void permutation( int pos ) { for(int i = 0;...
ALGO
0.997016
4.05082
{ "github_metadata": { "branch": "master", "commit_count": 239, "repo_created_at": "2016-06-08T12:48:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1175d00f...
145c6e02-73ad-459d-9d42-c82734881a1b
godisu524/BaekJunQuiz
Konkuk/8-2.cpp
#include <cstdio> #include <vector> using namespace std; vector<pair<long, long> > dist; vector<vector<pair<long, bool> > > edges; long totalInv; void dfs(long vertex, long parent){ for(long p = 0; p < edges[vertex].size(); p++){ long neighbor = edges[vertex][p].first; if(neighbor == parent){co...
ALGO
0.999948
3.862086
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-01-16T08:08:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa89ed82f...
f1e98490-381e-4bda-b22e-ba1e998eace5
ProFuSELab/DS-COCA
Specialization-Matrix/mbp_and_imac/specialization_all_mass_ds.cpp
//************************************************************************************************** // // PROJECT : Specialization Matrix // CLASS : Specialization Matrix // PURPOSE : Simulate // //************************************************************************************************** // // Copyright...
ALGO
0.997258
4.226547
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2018-05-08T05:33:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97dfd0a46a...
0cbd45c3-f534-47af-8574-7f9ed0e422f0
iamantony/CppNotes
src/algorithms/data_structures/array/insert_interval.hpp
#ifndef INSERT_INTERVAL_HPP #define INSERT_INTERVAL_HPP /* https://leetcode.com/problems/insert-interval/ Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1: Input: ...
ALGO
0.999415
6.583768
{ "github_metadata": { "branch": "master", "commit_count": 636, "repo_created_at": "2014-10-08T15:47:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 14, "pull_requests": 0 }, "file_meta": { "content_id": "d6c9984...
e7291cef-a7d3-4bb1-a5fb-20a85852c462
hljeong/cp
kattis/guilds2.cpp
#include <bits/stdc++.h> #define A first #define B second #define vc vector using namespace std; using ll = long long; using ld = long double; using vi = vc<int>; using vll = vc<ll>; using si = set<int>; using sll = set<ll>; using pii = pair<int, int>; using mii = map<int, int>; using gr = vc<vi>; template<class T> bo...
ALGO
0.999992
4.64179
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2022-03-04T08:01: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": "8292026944a...
0860da88-48f8-425a-8017-0def5b305569
NiltonGMJunior/neps-basica
05 - Funções e Ordenação/primo/main.cpp
#include <iostream> bool eh_primo(int x) { // Se x <= 1, retorna falso if (x <= 1) return false; // Se x for 2 ou 3, retorna verdadeiro if (x <= 3) return true; // Verifica se x é par if (x % 2 == 0) return false; // Percorre os números ímpares à partir de 3 em busca de divisores de x ...
ALGO
0.999931
4.639214
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-02-17T20:30: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": "1fc6085bf...
9f0ddfe8-f608-4725-9092-e9f5bad3bdde
tina80lvl/Discrete_math
Generating functions/D_trees/main.cpp
#include <iostream> #include <vector> #define M 998244353 std::vector<long long> a, b, br; long long get_element(int v, int i) { switch (v) { case 1: { if (i >= a.size()) return 0; return a[i]; break; } case 2: { if (i >= b.s...
ALGO
0.999951
3.998127
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-06-16T16:23:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89434c2a4d...
b1a919d9-9010-43ce-afd0-03ad563e2d2f
aalto-intelligent-robotics/lamide
graph_map_lamide/graph_localization_lamide/src/mcl_ndt/submap_mcl.cpp
#include "graph_localization_lamide/mcl_ndt/submap_mcl.h" #include "graph_map_lamide/ndt_dl/ndtdl_map_type.h" namespace perception_oru { namespace graph_localization { SubmapMCLType::SubmapMCLType(LocalisationParamPtr param) : LocalizationType(param) { if (SubmapMCLParamPtr mclParam = boost::dynamic_pointer_...
ALGO
0.907363
5.451067
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-07-25T12:52:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a1d559a15fac...
9d33a443-5191-46dd-9802-5e3174371263
jim2832/Leetcode
1074-number-of-submatrices-that-sum-to-target/1074-number-of-submatrices-that-sum-to-target.cpp
class Solution { public: int numSubmatrixSumTarget(vector<vector<int>>& matrix, int target) { int row = matrix.size(); int col = matrix[0].size(); if(row < 1){ return 0; } // calculate the prefix sum for(int i=0; i<row; i++){ for(int j=1; j<c...
ALGO
0.999982
6.351645
{ "github_metadata": { "branch": "main", "commit_count": 3319, "repo_created_at": "2023-06-10T06:37: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": "b25aba94e...
1170d2d1-5ec8-45d9-9fda-a6c353ad615b
Akhan521/CSC-17C
Homework/Simple_Vector_Modification/main.cpp
/* * File: main.cpp * Author: <NAME> * Created: 9-12-2022 @ 7:45 PM * Purpose: Modifying the Simple Vector class. */ //System Libraries. #include <iostream> //I/O Library. #include <cstdlib> //CSTD Library. #include <ctime> //Time Library. using namespace std; //User Libraries. #include "SimpleVecto...
TOOL
0.995155
4.397069
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2022-08-20T21:59: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": "6f05c0901...
5ab9abf3-9387-426a-b574-d59fbb4d581d
restless226/Data-Structures-and-Algorithms
untitled/DSA/BINARY_SEARCH/find_an_element_in_rotated_sorted_array.cpp
/* PROBLEM STATEMENT: Given a sorted and rotated array A of N distinct elements which is rotated at some point, and given an element key. The task is to find the index of the given element key in the array A. */ #include <bits/stdc++.h> #define int long long using namespace std; int bs(int arr[], int start, int end,...
ALGO
0.999981
6.000473
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2021-08-31T17:10:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1090fdf2...
44eac3b3-2a76-45fd-8998-f7e435a6aa50
the-redback/competitive-programming
solved-uva/11838.cpp
/** * @author : <NAME> * @School : CUET CSE 11 * @Topcoder : the_redback * @CodeForces : the_redback * @UVA : the_redback * @link : http://www.fb.com/maruf.2hin */ #include<cstdio> #include<cstring> #include<cstdlib> #include<cctype> #include<cmath> #include<iostream> #in...
ALGO
0.99996
3.880214
{ "github_metadata": { "branch": "master", "commit_count": 207, "repo_created_at": "2015-05-31T20:55:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "054f7aa5...
276b58d1-0675-4463-a877-bb1db2e97482
Surafel99/DSA-Lab-Challenges
409-longest-palindrome/Week2_Challenge_LongestPalindrome.cpp
#include <iostream> #include <unordered_map> #include <string> using namespace std; class Solution { public: int longestPalindrome(string s) { unordered_map<char, int> charCount; for (char c : s) { charCount[c]++; } int length = 0; bool oddFound = false; for (auto &[char_, count]...
ALGO
0.999929
6.3201
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-03-15T20:14: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": "2083bc9a054...