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
fbd22731-50e6-4892-bbb2-e6c86013f371
Kosthi/leetcode
leetcode/editor/cn/2-add-two-numbers.cpp
#include "../../../stdc.h" using namespace std; //给你两个 非空 的链表,表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的,并且每个节点只能存储 一位 数字。 // // 请你将两个数相加,并以相同形式返回一个表示和的链表。 // // 你可以假设除了数字 0 之外,这两个数都不会以 0 开头。 // // // // 示例 1: // // //输入:l1 = [2,4,3], l2 = [5,6,4] //输出:[7,0,8] //解释:342 + 465 = 807. // // // 示例 2: // // //输入:l1 = [0], l...
ALGO
0.999972
5.96219
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2024-07-15T16:04: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": "0f92e6e24...
f62ac8d8-f36b-45ec-829d-7d959dc4e0ac
codeehh/ProblemSolving
BOJ/P1926.cpp
#include <iostream> #include <queue> using namespace std; const int dr[4] = {1, -1, 0, 0}; const int dc[4] = {0, 0, 1, -1}; int n, m; int board[500][500]; bool visited[500][500]; int bfs(int r, int c) { int cnt = 0; queue<pair<int, int>> q; q.push({r, c}); while (!q.empty()) { int cr = q.fro...
ALGO
0.999861
4.577283
{ "github_metadata": { "branch": "main", "commit_count": 265, "repo_created_at": "2022-07-16T02:46: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": "32bdc2fe6f...
bc4326fe-1610-47c1-a1f5-61591f5b9140
Charishma-Bailapudi/LeetCodeProblems
1290-convert-binary-number-in-a-linked-list-to-integer/1290-convert-binary-number-in-a-linked-list-to-integer.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: // int getlen(ListNo...
ALGO
0.999826
5.189805
{ "github_metadata": { "branch": "main", "commit_count": 1066, "repo_created_at": "2023-03-26T13:19:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bb39db21...
6e382614-cb78-44c1-bae2-e7362a97796b
Hyunjulie/HKU_classes
comp1117/friend.cpp
// Friend list #include <string> #include <iostream> using namespace std; struct date { int month; int day; }; struct friends { string name; date birthday; }; void swap(friends &a, friends &b) { friends temp; temp = a; a = b; b = temp; } void sort(friends array[], int n) { for (int i = n - 1...
ALGO
0.999376
4.163352
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-10-19T14:50:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebd81e3fe...
67351ba5-efda-4334-b4cf-e6a5d143519c
leodestiny/BGL_NSDI2023
src/kernel/binary_reduce.h
/*! * Copyright (c) 2019 by Contributors * \file kernel/binary_reduce.h * \brief Binary reduce function C++ header. */ #ifndef DGL_KERNEL_BINARY_REDUCE_H_ #define DGL_KERNEL_BINARY_REDUCE_H_ #include <dgl/runtime/ndarray.h> #include <vector> #include <string> #include "./binary_reduce_common.h" #include "./csr_...
DATA
0.998625
6.77654
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-04-13T08:32:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 2, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "16ff2d9eb8f...
31985000-38b3-4cd5-a18a-63096593299e
abhiXsliet/Solved-DSA-Problems
Leetcode Daily Challenge/012-June-2024/007-replace-words.cpp
// https://leetcode.com/problems/replace-words/ #include <bits/stdc++.h> using namespace std; class Solution { private: // TC : O(L*N) Where L = Length of Sentence & N = Max Length of Individual Words of Sentences // SC : O(M) Where M = Size of Dictionary string approach_1(vector<string>& dictionary, ...
ALGO
0.99981
5.596521
{ "github_metadata": { "branch": "main", "commit_count": 2156, "repo_created_at": "2023-07-29T13:17:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f93a931e6...
b51e28f7-cbf7-47ea-a394-6b176353b747
liuyaqiu/LeetCode-Solution
387-First-Unique-Character-in-a-String.cpp
#include <iostream> #include <vector> using namespace std; /* * First Unique Character in a String * * Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. * * Examples: * * s = "leetcode" * return 0. * * s = "loveleetcode", * return 2. * Note...
ALGO
0.999678
5.527237
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2016-11-06T12:48: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": "4ca56ab512...
5c369559-5485-412d-a8c8-f115099f5c8b
P79N6A/Codes-1
2016.3~2016.5/Ombrophobic Bovines.cpp
#include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<cstring> #include<iomanip> #include<iostream> #include<map> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #define lowbit(x) (x & (-x)) #define ll long long #define pr(x) cout << #x << " = " << (x) << '\n'; ...
ALGO
0.999977
3.496394
{ "github_metadata": { "branch": "master", "commit_count": 232, "repo_created_at": "2019-04-23T01:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9f38d4b...
555a5827-87ab-4102-8ef0-b8a13ef3e7ff
apache/trafficserver
plugins/statichit/statichit.cc
/** @file Static Hit Content Serving @section license License Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you u...
WEB
0.910717
7.027384
{ "github_metadata": { "branch": "master", "commit_count": 16378, "repo_created_at": "2009-10-31T08:00:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1882, "forks": 829, "issues": 409, "pull_requests": 26 }, "file_meta": { "content_id": ...
7acc4c48-2a42-4e42-926d-6325274ad26d
SeonJun-Hwang/PS
Implementation/17290.cpp
#include <iostream> #include <queue> #include <cmath> using namespace std; const short MAX = 10; bool board[MAX][MAX]; int posX[] = { 1, 0, -1, 0 }; int posY[] = { 0, 1, 0, -1 }; struct Point { short x, y; Point() {}; Point(short x, short y) : x(x), y(y){} }; int main() { int x, y; cin >> x >> y; x--; y--; ...
ALGO
0.99968
3.238889
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2019-08-05T00:48: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": "2c09a2cc7...
7ea3cbcf-f927-4e1c-83c1-6a584b7b5160
jelasus/ADA
mergeHibrid.h
#include<cmath> #include<iostream> #include<algorithm> typedef double c_arr; void InsertSort(c_arr *A,const int p,const int n){ for(int i = p + 1; i < n; ++i) for(int j = i; j > p; --j) if(A[j-1] > A[j]) std::swap(A[j-1],A[j]); } void Intercala(c_arr *A,const int p,const int q,const int r){ c_arr *B = new...
ALGO
0.99989
3.770636
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-05-05T00:54: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": "26a5cd32a...
c55668d4-0824-4193-b508-1d72b6f50e1b
penglaige/test111
player/sample_computer_player.cpp
#include <vector> #include <time.h> #include <math.h> #include <iostream> #include "sample_computer_player.hpp" namespace reversi { CellPosition SampleComputerPlayer::thinkNextMove(const Board& board) { Side turn = getSide(); int best_move = before(board,turn); return board.getAllLegalMoves(turn).at(best...
ALGO
0.999695
4.784177
{ "github_metadata": { "branch": "uct-expansion2", "commit_count": 10, "repo_created_at": "2018-04-05T12:46: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": "9...
008d697c-9608-4805-b9c8-271d4cb2ec86
nickyrio1342/Hue2017
Contest/LISTAB.cpp
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = a; i<=b; i++) #define FORD(i, a, b) for (int i = a; i>=b; i--) #define REP(i, a) for (int i = 0; i<a; i++) #define N 1001000 #define pp pair<int, int> using namespace std; struct data { long long x, y, val; operator < (const data &a) { return...
ALGO
0.999967
3.541594
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2017-09-08T07:32:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56f03202d...
245baf54-0fbc-4a14-af8a-4877e26b8205
redgum775/AtCoder-submissions
submissions/abc205/c.cpp
//#include <bits/stdc++.h> #include <iostream> #include <string> #include <vector> #include <algorithm> using ll = long long; typedef long long ll; using llu = unsigned long long; typedef unsigned long long llu; using namespace std; int main() { ll A; ll B; ll C; cin >> A >> B >> C; bool a = true; bool ...
ALGO
0.999993
4.372323
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2022-08-23T03:26: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": "06b01932...
a48e23f9-0fb0-48a1-931b-03d217724b4c
BijoySing/Problem-Solving
DSA/Tries/cicyleDitect.cpp
#include <iostream> #include <vector> #include <set> #include <algorithm> #include <limits> using namespace std; const int INF = 1e9; int N, M; vector<vector<int>> adj; vector<int> color; vector<int> path; vector<int> bestCycle; int bestSum = INF; bool dfs(int u) { color[u] = 1; path.push_back(u); for ...
ALGO
0.999992
4.928898
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2023-02-11T19:12: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": "075c1e89ec...
3a4c6530-47af-467a-870e-15d54059506f
purrfectgrape/cpp_practice
pointers.cpp
// more pointers #include <iostream> using namespace std; int main () { int firstvalue = 5, secondvalue = 15; int * p1, * p2; // declaring pointers p1 and p2 p1 = &firstvalue; // p1 = address of firstvalue p2 = &secondvalue; // p2 = address of secondvalue cout << "value of p1: " << p1 << '\n'; cout << "...
ALGO
0.997157
4.248446
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-01-31T12:44:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b366de3167d6...
2d5e8939-d25f-403f-b7bb-8a9a0e84f2b0
amanjoshi668/Mini_torrent
client/message_client.cpp
/* Name : <NAME> Roll No. : 2018201097 */ #include <message_client.h> Message ::Message(initializer_list<string> list) { this->no_of_fields = 0; this->fields_content.clear(); this->fields_size.clear(); for (auto &it : list) { this->fields_content.push_back(it); this->fields_...
TOOL
0.910592
3.771428
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-09-18T19:52:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eea98456ad...
99a8e0ed-cf74-4a7f-a8f3-e58bc7808191
Flyingfish812/OS202-projet
src/part1/simulation.cpp
#include <string> #include <cstdlib> #include <cassert> #include <iostream> #include <fstream> #include <iomanip> #include <thread> #include <chrono> #include <omp.h> #include <sys/sysinfo.h> #include <unistd.h> #include "model.hpp" #include "display.hpp" using namespace std::string_literals; using namespace std::ch...
TOOL
0.956488
5.007286
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-03-07T16:25:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d791bc2a53...
467ed459-dc87-4e3f-8af2-96c6ec2ded17
MrSingh710/Programs
C++/DSA_(Course_Practice)/187_Heaps_Class1/1_insertionDeletion.cpp
#include <iostream> using namespace std; class Heap { int *arr; int size; public: Heap() { size = 0; } void insertMaxHeap(int key) { size++; int index = size; arr[index] = key; while(arr[index] > arr[index/2] && index > 1) { swap(arr[index], arr[...
ALGO
0.999761
4.827855
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2023-12-13T14:11: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": "c902447c67c...
82bbbae1-90f1-4fbe-9265-92c6c598fb45
IsNicolasB/cpp-solutions
contests/codeforces-contest/div-3/962/C_Sort.cpp
// FOR MASHHHIC #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define forr(i, a, b) for (int i = (a); i < (b); i++) #define...
ALGO
0.999788
4.067315
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-10T23:23: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": "b84a55c1a950...
d375cd51-f632-4101-b83c-183aad442d55
velassco/VELASSCO
modules/Platform/analytics/streamlineUtils/StreamTracer.cpp
#include "StreamTracer.h" // STD #include <iostream> #include <fstream> #include <string> #include <vector> // OpenMP #include <omp.h> // RPE #include "AABB.h" #include "Grid.h" // #define STREAM_TRACER_USE_CELL_LIST // Test all primitives in an acceleration cell //#define STREAM_TRACER_USE_OMP // Use OpenMP ...
ALGO
0.961889
5.088896
{ "github_metadata": { "branch": "master", "commit_count": 997, "repo_created_at": "2017-01-30T10:35:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 6, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "536a2f17...
ce109689-674e-495f-9254-9773ff8ab645
prabhanukash/Coding-Book
DP/PartitionASetIntoTwoSubsetsWithMinimumAbsoluteSumDifference.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> dp; int main() { #ifndef ONLINE_JUDGE freopen("inp.txt", "r", stdin); freopen("out.txt", "w", stdout); #endif int n; cin >> n; vector<int> arr(n); int sum = 0; for (int i = 0; i < n; i++) cin >> arr[i], sum += arr[i]; ...
ALGO
0.99992
3.510488
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2020-11-25T15:47:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eefb524f06...
9bac7221-868a-40d0-bf62-f31faf86dc19
JoKeR-VIKING/Competitive-Programming
Recursion/quickSort.cpp
#include<bits/stdc++.h> using namespace std; void quickSort(int input[], int start, int end) { if (start >= end) return; int current = input[start], minNo = start; for (int i=start+1;i<end;i++) { if (input[i] < current) minNo++; } int temp = input[min...
ALGO
0.999895
4.889261
{ "github_metadata": { "branch": "main", "commit_count": 109, "repo_created_at": "2021-09-01T04:41:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff739ad25f...
4e7601ec-94de-4736-89bc-eabcce935319
Azure1709/OOP_Assignment
LAB_1_BTVN/BT1.cpp
/* Bài tập 1: Để tìm phân số lớn nhất và nhỏ nhất trong một mảng phân số, trước tiên, cần nhập vào số lượng phân số n. Sau đó, lần lượt nhập tử số và mẫu số của từng phân số. Khi mẫu số của bất kỳ phân số nào được nhập bằng 0, người dùng phải nhập lại giá trị hợp lệ cho mẫu số. Sau khi hoàn tất việc nhập liệu, kết quả ...
ALGO
0.999596
5.407774
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-09-29T13:27:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2eae1aa8922...
7763c969-cd3e-45dc-872e-05402bf1fe51
piandpower/vmpc
moduru/src/gui/geom/Order1.hpp
#pragma once #include <gui/geom/Curve.hpp> #include <vector> namespace moduru { namespace gui { namespace geom { class Order1 final : public Curve { public: typedef Curve super; private: double x0 { }; double y0 { }; double x1 { }; double y1 { }; double xmin { }; ...
ALGO
0.965724
5.856751
{ "github_metadata": { "branch": "master", "commit_count": 296, "repo_created_at": "2018-01-27T05:42:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ef461485...
9cd8f467-49c3-4f21-8cb9-4c5f1fd21de3
minchurl/PS
boj/1616.cpp
#include<bits/stdc++.h> #define pb push_back using namespace std; const int MAXN = 10000005; int k, m; int n; int idx[MAXN]; bool start = true; int calcPow(int a, int b) { // return a^b int r = 1; while (b--) { r *= a; } return r; } void dfs(int u) { while (idx[u] < k) { int v = (u ...
ALGO
0.99998
3.216214
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-01-22T09:02: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": "11b2390ba...
ef67ef58-4bba-40aa-b463-9f7c76ed8402
sakura745/CLion2Leetcode
leetcode/editor/cn/202-happy-number.cpp
/** 编写一个算法来判断一个数 n 是不是快乐数。 「快乐数」 定义为: 对于一个正整数,每一次将该数替换为它每个位置上的数字的平方和。 然后重复这个过程直到这个数变为 1,也可能是 无限循环 但始终变不到 1。 如果这个过程 结果为 1,那么这个数就是快乐数。 如果 n 是 快乐数 就返回 true ;不是,则返回 false 。 示例 1: 输入:n = 19 输出:true 解释: 1² + 9² = 82 8² + 2² = 68 6² + 8² = 100 1² + 0² + 0² = 1 示例 2: 输入:n = 2 输出:false ...
ALGO
0.999958
5.332346
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2023-05-10T16: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": "4c964a8df3a...
c68a306f-11d0-46f7-9ac9-a839f62074ec
hung230903/USTH
USTH_DSA/LabWork_4/Ex1_Iteration.cpp
/* Pseudo code: Function Calculate(n) sum <- 0 temp <- n while temp > 0 do sum <- sum + (temp % 10) temp <- 10 return sum Funciton main() read n from the user result <- Calculate(n) ...
ALGO
0.999768
4.990377
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-09-20T16:05: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": "8a6eb18acb8d...
8a5761b8-2480-4703-b4e5-8874eee6dbad
harsh13579/CPP-Codeforces-Codes
1300/insert_equilize.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long template <class T> void print_v(vector<T> &v) { cout << "{"; for (auto x : v) cout << x << ","; cout << "\b}"; } ll gcd(ll a,ll b) { if (b==0) return a; return gcd(b, a%b); } ll lcm(ll a,ll b) { return a/gcd(a,b)*b; } string to_upper(string a) { ...
ALGO
0.999592
3.860952
{ "github_metadata": { "branch": "Main", "commit_count": 1, "repo_created_at": "2024-08-19T15:20: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": "200f3561c207...
b606394c-513e-4cd3-8af5-5887e736d03d
corganhejijun/printer
ReadFile/stpReader/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx
// Copyright (c) 1995-1999 <NAME> // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the ...
TOOL
0.997809
4.352664
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2019-09-21T08:20:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0886f24c...
d9a7b2de-ee4e-41a8-bf73-3e4460cb8f10
migowav/LabWinter24
Homework/MiguelFloresAssignment3_/Gaddis_9thEd_Chap4_Prob12_BankCharges/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on January 15, 2024 * Purpose: Bank charges */ //System Libraries #include <iostream> #include <iomanip> using namespace std; int main() { // Declare Variables float balance; int numChecks; float serviceFee = 10.00; // Set the base monthly fee t...
TOOL
0.933803
3.919866
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-01-31T23:12: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": "a00c9e09f0bb...
deee2c6e-6779-4962-b1b8-b23b6d037591
BeatrizHanae/AED
3 - Ordenação/Desafios de Ordenação/desafio1.cpp
#include <iostream> #include <time.h> #include <cstdlib> #include <cmath> #include <vector> using namespace std; int gerarNumeros (int menor, int maior){ return (menor + (rand()%maior)); } void ordenar(double vetor[]){ int i, j; double aux; bool continua, troca; continua = 1; while(continua == true){ tro...
ALGO
0.998688
4.073607
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-07T19:09: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": "11c13e085d...
b9383e33-dab0-4c6a-adbf-892b1eef19b9
nisarg0/Algorithm-Implementation
Sorting Algorithms/O(n^2)_Algos.cpp
#include<bits/stdc++.h> using namespace std; // Insertion Sort // We divide an array into 2 parts one is sorted and other is original array // Size of first part keeps on increasing by 1 in each iteration and min value is put there void insertionSort(vector<int> &arr){ int n=arr.size(),i,j; for(i=0;i<n;i++){ ...
ALGO
0.999959
5.653051
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2021-02-05T03:55:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 235, "forks": 51, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d22f...
dcbebed0-f1d6-40b3-ab9c-d31899feb746
RonaldoQuang/Codeptit-DSA
DSA07021-DAY NGOAC DUNG DAI NHAT.cpp
//Cho một xâu chỉ gồm các kí tự ‘(‘ và ‘)’. Một dãy ngoặc đúng được định nghĩa như sau: //-Xâu rỗng là 1 dãy ngoặc đúng. //-Nếu A là 1 dãy ngoặc đúng thì (A) là 1 dãy ngoặc đúng. //-Nếu A và B là 2 dãy ngoặc đúng thì AB là 1 dãy ngoặc đúng. //Cho một xâu S. Nhiệm vụ của bạn là hãy tìm dãy ngoặc đúng dài nhất xuất hiện ...
ALGO
0.999454
4.064462
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-06-24T03:27: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": "41dc51e7eaa...
cd392bd7-e6cf-4a5f-b34a-4ec259761ac0
KALF9912/cpp
Ejercicio 25 - Suma de pares e impares total/main.cpp
/* Programa que suma numeros pares e impares*/ #include <iostream> using namespace std; int main(int argc, char const*argv[]) { //Declaracion de las variables int pares = 0, impares = 0, total = 0; //ciclo 1 for para suma de pares for (int i = 1; i <= 100; i++) { if (i % 2 == 0){ ...
ALGO
0.998617
4.247262
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-03-02T07:18:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74d2ccd1d07...
cd3999a0-93a3-4960-bcba-def9e73f9e4b
liuyubobobo/Play-Leetcode
2001-2500/2074-Reverse-Nodes-in-Even-Length-Groups/cpp-2074/main.cpp
/// Source : https://leetcode.com/problems/reverse-nodes-in-even-length-groups/ /// Author : liuyubobobo /// Time : 2021-11-13 #include <iostream> #include <vector> using namespace std; /// Using Array to store /// Time Complexity: O(n) /// Space Complexity: O(n) /// Definition for singly-linked list. struct Lis...
ALGO
0.999976
5.876352
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "cc...
979d4d25-3ee9-4da5-b3a9-cbfb2f27e40d
Aman-Kumar342/placementprepration
placementprepration/tree/intro.cpp
#include<iostream> #include<queue> using namespace std; struct Node{ int data; struct Node*left; struct Node*right; Node(int val){ data=val; left=NULL; right=NULL; } }; Node*buildtree(Node*root){ cout<<"Enter the data "<<endl; int data; cin>>data; root=new Nod...
ALGO
0.999696
4.190538
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-01-08T17:42: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": "bef10179bba...
504e621e-4138-4cea-8e66-1221f2fadd8d
mayataka/robotoc
examples/iiwa14/config_space_ocp.cpp
#include <string> #include <memory> #include "Eigen/Core" #include "robotoc/ocp/ocp.hpp" #include "robotoc/solver/unconstr_ocp_solver.hpp" #include "robotoc/robot/robot.hpp" #include "robotoc/cost/cost_function.hpp" #include "robotoc/cost/configuration_space_cost.hpp" #include "robotoc/constraints/constraints.hpp" #i...
ALGO
0.947464
6.710675
{ "github_metadata": { "branch": "master", "commit_count": 1154, "repo_created_at": "2020-05-28T04:44:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 290, "forks": 51, "issues": 14, "pull_requests": 0 }, "file_meta": { "content_id": "112...
ccf15bc5-c1d9-4e68-9ea8-fda1d1ef462c
SproutMJ/baekjoon
17411.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; int arr[1000001], dp[1000001], lis[1000001]; vector<long long> num[1000001], sum[1000001]; int main() { cin.tie(0); std::ios_base::sync_with_stdio(0); int n, len = 0; cin >> n; for (int i = 0; i < n; i++) cin >> arr[i]; for (int i = ...
ALGO
0.99998
4.076043
{ "github_metadata": { "branch": "master", "commit_count": 329, "repo_created_at": "2022-01-22T07:17:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fbe1106...
7c8e946e-72e1-4229-bdec-8c09bf465dab
goodgood619/Problem-Solving
BOJ/1761.cpp
#include <cstdio> #include <algorithm> #include <cstring> #include <vector> #include <queue> #include <map> #include <iostream> #include <string> #include <math.h> #include <set> #include <list> #include <climits> #include <string.h> #include <deque> #include <functional> using namespace std; typedef long long ll; #def...
ALGO
0.999971
3.976014
{ "github_metadata": { "branch": "master", "commit_count": 248, "repo_created_at": "2019-09-07T16:13:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f22d7ad...
9a74b7d9-c89e-4dc6-91bb-3e919e1856b7
pasongsj/code_up
baekjoon/14923/14923.cpp
#include <iostream> #include <vector> #include <queue> #include <tuple> #include <climits> std::vector<std::vector<int>> graph; const int nx[4] = { 0,0,1,-1 }; const int ny[4] = { 1,-1,0,0 }; int n, m; bool in_range(int x, int y, int n, int m) { return 0 <= x && x < n && 0 <= y && y < m; } int getpoint(std::pair<in...
ALGO
0.999891
4.302667
{ "github_metadata": { "branch": "main", "commit_count": 286, "repo_created_at": "2022-03-22T09:46: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": "36e0e06e59...
d5f76a4c-0879-47b9-8866-746fceed9286
Nadya2017/Task3
main.cpp
#include <iostream> #include <vector> using namespace std; int main() { const int m = 4; const int n = 3; vector<vector<int> >V_v(m, vector<int>(n)); vector<vector<int> > ::iterator it_2; vector<int>::iterator it; int c = 0, a = 1; for (it_2 = V_v.begin(); it_2 < V_v.end(); it_2++) {...
ALGO
0.999787
3.102524
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-11-24T19:38:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1faf1d15959...
e8f875d6-16e9-47b6-966c-d7c9b4742239
harshraj9988/LeetCode-solutions
Leetcode-solution-Java/binary_Tree_Pruning.cpp
/** Given the root of a binary tree, return the same tree where every subtree (of the given tree) not containing a 1 has been removed. A subtree of a node node is node plus every node that is a descendant of node. Example 1: Input: root = [1,null,0,0,1] Output: [1,null,0,null,1] Explanation: Only the red nodes sa...
ALGO
0.999989
6.341949
{ "github_metadata": { "branch": "main", "commit_count": 217, "repo_created_at": "2022-05-12T13:52:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c36d78643...
16569730-9e0b-40df-8a7f-bdd278a76c6f
phvdat/dsa
repos/ThucHanh/ThucHanh/list/Dlinkedlist.cpp
#include <sstream> #include <string> #include <iostream> #include <type_traits> using namespace std; template <class T> class DLinkedList { public: class Iterator; //forward declaration class Node; //forward declaration protected: Node *head; Node *tail; int count; public: DLinkedList() : h...
ALGO
0.997935
5.445092
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2020-11-07T05:50: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": "fa79662ae28...
ab1fb19a-e982-403b-8cfe-ee3aef9eb5a0
kmc-jp/icfpc-2019
old/guchoku.cpp
#include <cassert> #include <cctype> #include <iostream> #include <set> #include <tuple> #include <vector> #include <queue> #include <algorithm> #include <random> struct Point { int x, y; }; enum class BoosterCode { B, F, L, R, X, C, }; struct Booster { BoosterCode code; Point point; }; struct Inp...
ALGO
0.999967
4.098701
{ "github_metadata": { "branch": "yamunaku", "commit_count": 155, "repo_created_at": "2019-06-21T19:00:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "2feeba8...
f8929c26-1277-4730-94c0-9abf076338c4
arshpreetsingh134/Algorithms
Cracking The Coding Interview/2. Linked Lists/Palindrome.cpp
// Check if a Linked List is a palindrome #include <iostream> #include <stack> using namespace std; // A linked list node class Node { public: int data; Node *next; Node() {} Node(int data, Node *next) { this->data = data; this->next = next; } }; class LinkedList { Node *...
ALGO
0.999973
6.678332
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2021-01-23T05:56:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f405a52dbee...
e4997d26-15b1-4bec-bb14-b8cd9d026aa1
hyfu614/projects_hf
StateSpace/StateSpace.hpp
#ifndef __HF_STATESPACE__ #define __HF_STATESPACE__ #include "DM.hpp" #include "TTimeSeries.hpp" namespace TS { // // The STATESPACE equations are // // y(t) = a + H*x(t) // x(t) = b + F*x(t-1) + Phi*epsilon(t) // // y(t): ny vector, measurement // x(t): nx vector, states // epsilon(t):...
ALGO
0.995672
5.273791
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2016-09-23T20:58: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": "cafbd9ebc...
b4f5d20c-67a8-440a-8e74-da57f874dc1a
seongahpark/Algorithm_Study
Week030/seongahpark/[C]boj_1261_seongahpark.cpp
#include <iostream> #include <queue> #include <vector> #include <limits.h> using namespace std; int r, c; int dx[] = {0, 0, -1, 1}; int dy[] = {-1, 1, 0, 0}; int arr[101][101]; int dist[101][101]; queue<pair<int, int> > pq; int dijkstra(){ pq.push({0, 0}); dist[0][0] = 0; while(!pq.empty()){ int x = pq.fron...
ALGO
0.999167
4.42893
{ "github_metadata": { "branch": "main", "commit_count": 335, "repo_created_at": "2021-09-13T08:27:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0be3c354e...
15a8be02-03ed-40f7-a769-13000458eecf
cyproto/College_Labs
Advanced Data Structures/hashTable.cpp
#include<iostream> #define MAX 10 using namespace std; class Hash { private: struct node { int ID; char name[50],mobile[12]; node *next; }*temp,*head[MAX]; public: Hash() { for(int i=0;i<MAX;i++) head[i]=NULL; } void create(); void display(); void search(); }; void Has...
ALGO
0.997353
3.580592
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-02-26T18:02:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da4b30a5a...
763de604-3cc8-42dc-8f51-87d4079f318d
labhmanmohan25/Classical-Codes
bad ugly prime approach.cpp
#include <bits/stdc++.h> #include <vector> #include <string> #include <stdio.h> using namespace std; #include <math.h> int main() { long long int i,j,t,t2,temp,count; long long int a, b, flag; cin>>t; while(t--) { cin>>temp; a=pow(10,temp-1); b=pow(10,temp); if(temp==1){ cout<<"-1...
ALGO
0.999467
3.803163
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-07-28T14:20:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7424471d6...
92966461-c94b-4312-b8c4-d1d465a6ccf6
vishal22091997/Basic-Programming
PractisingGraph.cpp
#include<iostream> #include<queue> using namespace std; struct Node{ int v; int w; Node* next; }; Node* makeNode(int v, int w){ Node* newNode = new Node(); newNode->next = NULL; newNode->v = v; newNode->w = w; return newNode; } void insertNode(int u, int v, int w, Node* a[]){ Node* newNode = makeNode(v,w); ne...
ALGO
0.999938
4.284301
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-04-14T18:01: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": "1e9f11cdd1...
4451b688-61f0-4429-9130-dee0decda8b8
Tromboman22/Programming
Labs/Lab4/Lab4_Pineau_40317711.cpp
#include <iostream> #include <array> #include <string> using namespace std; int get_summation(array <int, 10> arr, int in); int main(){ cout << "Please enter 10 integers: "; array <int, 10> nums; for (int i = 0; i < 10; i++) { cin >> nums[i]; //prompt for 10 integers } cout << "You e...
ALGO
0.999406
5.290224
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2024-11-19T22:31: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": "c57a1486197...
b0307b06-5a84-495a-b6a8-cadf61385476
thanoschild/Leetcode
1058-lexicographically-smallest-equivalent-string/1058-lexicographically-smallest-equivalent-string.cpp
class UnionFind { public: vector<int> parent; UnionFind() { parent.resize(26, -1); } int findParent(int x) { if(parent[x] == -1) return x; return parent[x] = findParent(parent[x]); } void makeUnion(int x, int y) { int a = findParent(x); int b = findP...
ALGO
0.999982
6.203931
{ "github_metadata": { "branch": "main", "commit_count": 4265, "repo_created_at": "2023-11-14T08:38:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5eaa7e858...
224f17e6-48c0-4769-8c5f-778209ce7634
kimyunseok/cpp
algorithm/baekjoon/DP/1890_점프.cpp
/* * 백준 1890번 점프 * https://www.acmicpc.net/problem/1890 * 다이나믹 프로그래밍 */ #include <iostream> using namespace std; int widthHeight; int board[101][101]; long long dp[101][101]; bool visit[101][101]; long long go(int r, int c) { if (r == widthHeight && c == widthHeight) { return 1; } if (visit[r][c]) { return dp[r][c]...
ALGO
0.999822
4.183262
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2020-07-27T05:56:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0ea2ad8...
e55bc5d3-b592-40a1-96a0-6f1fc98d57be
ibayashi-hikaru/allegro-legato
lammps/src/ML-SNAP/compute_sna_atom.cpp
// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories <NAME>, <EMAIL> Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04...
ALGO
0.999399
5.93724
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-01-17T19:46:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ad1cdb22c...
3178a610-0ae3-4a1c-b58f-ba7c55cd0340
XiDian-ChenMiao/basic-cpp-master
algorithm/str_to_integer.cpp
#include <stdio.h> #include <stdlib.h> /*将字符串转为数字的函数*/ int str_to_integer(const char* str) { static const int MAX_INT = (int)((unsigned)~0 >> 1); static const int MIN_INT = -(int)((unsigned)~0 >> 1) - 1; unsigned int n = 0; if (str == 0) return 0; while (*str == ' ') { ++str; } ...
ALGO
0.973722
3.456944
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-19T00:56: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": "17cd4453a9...
1ad97131-5cc4-484a-9429-08677c9f3f3b
zzyongx/c-gist
cc.leetcode/merge_two_sorted_lists.cc
#include <iostream> struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { ListNode *head; ListNode **ptr = &head; if (l1 && l2) { while (l1 && l2) { if (l1->val < l2->v...
ALGO
0.99991
5.702812
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2014-06-03T04:10:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "2ad6008a...
af6c3064-e813-4eed-9902-8d4246032e92
MatLop-git/adventofcode_2024
Day01/day01.cpp
#include <fstream> #include <iostream> #include <string> #include <utility> #include <vector> class Helper { private: static const int MAX_VALUE = 100000; int _leftListArray[MAX_VALUE] = {0}; int _rightListArray[MAX_VALUE] = {0}; public: int _firstPuzzleAnswer = 0; int _secondPuzzleAnswer = 0; ...
ALGO
0.9992
5.513958
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2024-12-02T14:36: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": "0f64d6f3e...
f25295a9-9a2e-447f-b39a-50f6e0d32736
konstantinbelousovEC/leetcode
medium-0002-add-two-numbers.cpp
/* Initialize current node to dummy head of the returning list. Initialize carry to 000. Loop through lists l1l1l1 and l2l2l2 until you reach both ends and carry is 000. Set xxx to node l1l1l1's value. If l1l1l1 has reached the end of l1l1l1, set to 000. Set yyy to node l2l2l2's value. If l2l2l2 has reached the end of ...
ALGO
0.999984
6.519164
{ "github_metadata": { "branch": "main", "commit_count": 169, "repo_created_at": "2022-05-22T19:13: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": "3d0ae21dae...
902339b0-7f35-4979-8ee7-8f82fb61c200
cjh980402/Coding-Test-Solution
HackerRank/Easy/game-of-thrones.cpp
#include <bits/stdc++.h> using namespace std; /* * Complete the 'gameOfThrones' function below. * * The function is expected to return a STRING. * The function accepts STRING s as parameter. */ string gameOfThrones(const string &s) { int count[26] = {0}; for (char c : s) { count[c - 'a']++; ...
ALGO
0.999967
5.209245
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2022-01-08T13:39:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c685941c4d0...
0eae7533-4102-4925-b1e1-ca7860aa2c1d
jinhyukoo/BJ
2211_네트워크복구.cpp
#include<iostream> #include<queue> #include<vector> #include<functional> #include<set> using namespace std; #define MAX 1000000000 typedef pair<int, int> pii; vector<int> dist(1001, MAX), parents(1001); vector<vector<int>> inputs(1001, vector<int>(1001)); set<pii> s; int find(int u){ if(parents[u] == u) return u; ...
ALGO
0.999879
3.683357
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2019-12-02T05:17:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "3340670c3...
bd251741-d244-49d2-a2ef-7b1f79e1714b
jiaqiwang969/test01
dealii/source/grid/tria_accessor.cc
// --------------------------------------------------------------------- // // Copyright (C) 1998 - 2014 by the deal.II authors // // This file is part of the deal.II library. // // The deal.II library is free software; you can use it, redistribute // it, and/or modify it under the terms of the GNU Lesser General // Pu...
ALGO
0.999295
5.989395
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-27T02:10: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": "2d87599d3169...
df41ac3e-d72c-47aa-bff0-a5b2c4973a45
jerin32/Algorithm-Analysis
linear_binary.cpp
#include<bits/stdc++.h> using namespace std; int n=10000; int cont=0; //liner search void Linera_search(long long int a[], long long int num) { //cont+=1; int flag=0; //cont+=1; for(int i=0; i<n; i++) { cont++; if(a[i]==num) { //cont+=1; flag=1; //cont+=1; cout<<"Key="<<i<<" value="<<num<<" Total Comparison=...
ALGO
0.99979
3.573825
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-17T22:00:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2a3709514c7...
dc106a03-763c-4855-b30b-6f7281bbf637
wrf-model/WRF
var/da/da_tools/da_llxy_default_new.inc
subroutine da_llxy_default_new (info) !---------------------------------------------------------------------------- ! ! routine llxy ! ************** ! ! ! Purpose: calculates the (x,y) location (dot) in the mesoscale grids ! ------- from latitudes and longitud...
ALGO
0.997871
5.605982
{ "github_metadata": { "branch": "master", "commit_count": 6746, "repo_created_at": "2016-08-16T20:39:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1417, "forks": 765, "issues": 161, "pull_requests": 21 }, "file_meta": { "content_id": "...
55178f2c-2419-45e6-95bb-0edda088a154
imjaya/Leetcode_solved
5_longest_palindromic_substring.cpp
class Solution { public: string expand(string str, int low, int high) { int length = str.length(); while((low >= 0) && (high < length) && (str[low] == str[high])) { low = low - 1; high = high + 1; } return(str.su...
ALGO
0.999993
6.048809
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2020-08-01T06:38: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": "6f5bb809...
b094d240-c807-451f-8d4c-d2e978cb877e
ml-explore/mlx
mlx/backend/metal/kernels/gemv_masked.h
// Copyright © 2023-2024 Apple Inc. #include "mlx/backend/metal/kernels/steel/utils.h" using namespace metal; #define MLX_MTL_CONST static constant constexpr const #define MLX_MTL_PRAGMA_UNROLL _Pragma("clang loop unroll(full)") struct _NoMask { char x; constexpr METAL_FUNC operator bool() { return true; ...
TOOL
0.928161
5.795037
{ "github_metadata": { "branch": "main", "commit_count": 1269, "repo_created_at": "2023-11-28T23:33:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21610, "forks": 1279, "issues": 135, "pull_requests": 17 }, "file_meta": { "content_id": "...
2802f87a-2b6c-4da5-a7a6-5bf54a380db5
AdrianoOliveira32/uemg
Sistemas de Informação/ED3/Códigos/exercicioslide50.cpp
#include <iostream> #include <stdlib.h> #include <ctime> using namespace std; struct celula { int elemento; celula *proxima; }; void ImprimirLista(celula *lista) { celula *aux = lista; if (!lista) cout << "Lista vazia"; else { while (aux != NULL) { cout << aux->elemento << endl; aux = aux->proxima;...
ALGO
0.999592
4.666454
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-08-28T11:48: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": "77e1ac7f7...
ea489370-c176-4a67-9987-e880b51380e1
sankalp1999/DSA_problems
InterviewBit/Arrays/AddOne.cpp
vector<int> Solution::plusOne(vector<int> &a) { int carry = 0; int prevcarry = 0; // to preserve the prev carry int flag =0 ; int k = 0; // not needed auto it = a.begin(); // any leading zeros, erase them while(k + 1 < a.size()) { if(a[k] == 0) { a.era...
ALGO
0.999795
4.52544
{ "github_metadata": { "branch": "master", "commit_count": 502, "repo_created_at": "2020-07-22T12:03:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a79d82f7...
c36f862d-1870-40f5-93db-b97d8e3d9bbd
YuFudan/JDL
lkh_/src/MTSP_Report.cc
#include "LKH.h" #include "Segment.h" void MTSP_Report(GainType Penalty, GainType Cost) { GainType MinCost = INFINITY, MaxCost = -INFINITY; int64_t MinSize = INT_MAX, MaxSize = 0; Node *N = Depot, *NextN; bool Forward = SUCC(Depot)->Id != Depot->Id + Dim_salesman; int64_t SalesmenUsed = 0; do ...
ALGO
0.999195
4.797906
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-05-07T13:28: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": "1e535d9c67...
9164577e-5300-469a-a70d-f43259806b1f
philhoel/Computational-Physics
Project1/project1.cpp
#include <iostream> #include <cmath> #include <cstdlib> #include <fstream> #include <vector> #include "armadillo" #include "time.h" using namespace std; using namespace arma; class LinSys { private: /* Right hand side of equation */ double f(double z) { return 100*ex...
ALGO
0.999439
4.345472
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2020-08-20T12:34: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": "bed2a5cf...
ecadeb96-be34-46cc-8819-026721141399
corganhejijun/printer
ReadFile/stpReader/src/Expr/Expr_SquareRoot.cxx
// Created on: 1991-05-28 // Created by: <NAME> // Copyright (c) 1991-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
TOOL
0.988137
6.570615
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2019-09-21T08:20:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb8486b5...
0202eb07-9ae4-4c0d-986d-d0d96a3b397a
NDxKen1405/Basic-algorithms
primeSum.cpp
A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers For example 2 and 3 are prime numbers For n as an integer. Give the result of sum of prime numbers which are not greater than n. Because the result of sum of integers according to the requirement might ...
ALGO
0.99999
5.055512
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-10-30T08:04: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": "f48372c96...
3a5bfeb2-8638-4855-9eab-6e1d88a4ada5
patpro28/maketest
custom/kprod/sol/correct.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int T; cin >> T; while (T--) { int N, K, M; cin >> N >> K >> M; vector<int> A(N+1); for (int i = 1; i <= N; i++) cin >> A[i]; function<vector<pair<int, int>>(int)> DFS = [&](int K) { if (K == 1) ...
ALGO
0.999973
4.301101
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-19T07:22: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": "3b84813c78cf...
f41879e5-dd2a-4404-b572-59a5a08db619
LeoBrilliant/LeetCodeLib
P101~150/ConvertSortedListToBinarySearchTree.cpp
/* * ConvertSortedListToBinarySearchTree.cpp * * Created on: 2016年12月2日 * Author: user */ #include "ConvertSortedListToBinarySearchTree.h" ConvertSortedListToBinarySearchTree::ConvertSortedListToBinarySearchTree() { // TODO Auto-generated constructor stub } ConvertSortedListToBinarySearchTree::~ConvertS...
TEST
0.99759
5.081973
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2016-11-18T11:08: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": "0c43c5a0b...
a543e038-cabc-486e-978f-806823771e07
Anirudh257/Leetcode_Solutions
0022-generate-parentheses/0022-generate-parentheses.cpp
class Solution { public: // Time complexity: O(n*2^2n) 2n total subsets possible out of which only valid subsequences taken // Space complexity: O(n*2^2n) vector<string> generateParenthesis(int n) { vector<string> pars; genPar(n, "(", 1, 0, pars); return pars; }...
ALGO
0.99971
6.562534
{ "github_metadata": { "branch": "main", "commit_count": 834, "repo_created_at": "2022-08-22T05:59:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b94d40125...
f469d35a-27d0-4b0c-9059-56cd8f59f59e
Ahmad-AlDeeb/Problem-Solving
Codeforces/Friends and the Restaurant.cpp
#include<iostream> #include<string> #include<sstream> #include<algorithm> #include<cmath> #include<iomanip> #include<vector> #include<stack> #include<queue> #include<deque> #include<set> #include<unordered_set> #include<map> #include<bitset> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie...
ALGO
0.999982
4.115744
{ "github_metadata": { "branch": "main", "commit_count": 1500, "repo_created_at": "2023-01-11T08:37:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "412e06743...
b003fb4b-09ae-4118-899b-bfd23f563869
acts-project/covfie
benchmarks/openmp/patterns/lorentz.hpp
/* * SPDX-PackageName: "covfie, a part of the ACTS project" * SPDX-FileCopyrightText: 2022 CERN * SPDX-License-Identifier: MPL-2.0 */ #pragma once #include <random> #include <covfie/benchmark/lorentz.hpp> #include <covfie/benchmark/pattern.hpp> #include <covfie/benchmark/propagate.hpp> #include <covfie/core/fiel...
ALGO
0.966199
6.443801
{ "github_metadata": { "branch": "main", "commit_count": 445, "repo_created_at": "2021-11-06T11:54:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d98300a552...
1af12550-690b-4859-ac1a-ba7aedac161d
CppCon/CppCon2019
Presentations/path_tracing_three_ways_a_study_of_cpp_styles/code/pt-three-ways-master/src/dod/Scene.cpp
#include "Scene.h" #include "math/Epsilon.h" #include "math/OrthoNormalBasis.h" #include "math/Samples.h" #include "util/Progressifier.h" #include "util/Unpredictable.h" #include <future> using dod::IntersectionRecord; using dod::Scene; std::optional<IntersectionRecord> Scene::intersectSpheres(const Ray &ray, double...
ALGO
0.985751
7.483076
{ "github_metadata": { "branch": "master", "commit_count": 148, "repo_created_at": "2019-09-18T19:48:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1254, "forks": 164, "issues": 16, "pull_requests": 26 }, "file_meta": { "content_id": "dc...
045d8e13-e3ce-492b-a787-9812cfb98892
Anurag-Negi28/Leet-Code
1002-maximum-width-ramp/maximum-width-ramp.cpp
class Solution { public: int maxWidthRamp(vector<int>& nums) { int n = nums.size(); vector<int> rightMax(n); // Fill rightMax array with the maximum values from the right rightMax[n - 1] = nums[n - 1]; for (int i = n - 2; i >= 0; i--) { rightMax[i] = max(rightMax...
ALGO
0.99999
6.696317
{ "github_metadata": { "branch": "main", "commit_count": 264, "repo_created_at": "2024-08-29T17:12:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8891f048de...
818877bc-d200-4c8f-ad60-b0d0f1bc2517
kangqingyu/algorithmExercise
handleByVim/jzOffer/17jz_MergeSortedList/17jz_MergeSortedList.cc
#include <iostream> using namespace std; typedef struct ListNode { struct ListNode *next; int value; }ListNode; void displayList(ListNode *pHead) { ListNode *pMove = pHead; while(pMove) { cout << pMove -> value << " "; pMove = pMove -> next; } cout << endl; } ListNode *createList(ListNode...
ALGO
0.999948
4.36429
{ "github_metadata": { "branch": "master", "commit_count": 1577, "repo_created_at": "2017-05-14T13:16: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": "5f9c39a...
b28d4776-3cdb-4af8-8fc8-53655fe17911
gnosis23/algorithm-problems
Codeforces/GoodBye2020/C.cc
/** * author: BohaoWang (<EMAIL>) * id: https://codeforces.com/contest/1466/problem/C * tag: greedy | dp */ #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <string> #include <vector> #include <map> #include <unordered_map> #include <set> #incl...
ALGO
0.999965
4.660593
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2020-11-28T08:16: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": "06d241107...
ff94ac1c-e7c6-4510-b1b4-541cc226b405
ishandutta2007/codeforces-f
fdg/normal/643/C.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <vector> #include <queue> #include <set> #include <map> #include <memory.h> using namespace std; int arr[200005]; long long sa[200005]; long double s[200005]; long double dp[55][200005]; int wh[55][200005]; long double get(int l, int r) { long d...
ALGO
0.999794
3.904103
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "193bbb9de13b...
b21bb8eb-be03-4b84-ace3-4159922b042c
sudhanshu-t/DSA
HomePepCodes/Lec21/2_equisets.cpp
#include <iostream> #include <vector> #include <string> using namespace std; void equiset1(int arr[], int n, int sp, string s1, int sos1, string s2, int sos2){ if(sp == n){ if(sos1 == sos2){ cout << s1 << "& " << s2 << endl; } return; } equiset1(arr, n, sp+1, s1 + to_...
ALGO
0.998216
3.84815
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-07-09T11:48: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": "d7c48cbe5...
0921a00a-b24a-4aa6-a12e-cb2baee5b588
VKBRAWLER/Leetcode
2024 01/amount-of-time-for-binary-tree-to-be-infected.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), ...
ALGO
0.999996
4.765306
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2023-12-31T18:08:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "579db0b9...
5d285f06-04e3-49ca-818e-7babc20c0000
peteratebs/webcwebbrowser
webc/WebC/source/imgconvert/imgconv.cpp
// // IMGCONV.CPP - // // EBS - WebC // // Copyright EBS Inc. , 2006 // All rights reserved. // This code may not be redistributed in source or linkable object form // without the consent of its author. // // Module description: // /*****************************************************************************/ // Hea...
ALGO
0.906933
5.682809
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-10-13T10:53:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7eda0224b...
306c3f75-395e-40f9-bff6-f841c765630d
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/0_0_6734.cpp
#include <iostream> #include <vector> #include <stack> using namespace std; struct Edge { int to; bool visited; }; vector<int> generate_permutation(int n, vector<vector<int>>& edges) { vector<int> permutation(n, 0); vector<vector<Edge>> tree(n); vector<int> in_degree(n, 0); for (int i = ...
ALGO
0.999979
4.621629
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59: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": "f3763161ea0...
61bb2608-0c84-4306-bf4b-40fb2d1ee28c
NguyenNgocThanhPhuong/23521245_23521125_23521440_23521688_23521819_BT05
Bai203/Bai203.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; struct Diem { float x; float y; }; typedef struct Diem DIEM; struct DuongTron { DIEM I; float R; }; typedef struct DuongTron DUONGTRON; void Nhap(DIEM&); void Xuat(DIEM); void Nhap(DUONGTRON&); void Xuat(DUONGTRON); void Nhap(DUONGTRO...
ALGO
0.999456
3.954222
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2023-11-09T12:35: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": "eade5a39c...
7d615ad3-2fdd-43a5-b5a0-186135162951
WanDejun/vscode_cpp
Codeforces/EDU Round 163/C.cpp
#include <bits/stdc++.h> #define PII array<i64, 2> #define MII map<i64, i64> #define MSI map<string, i64> #define SI set<i64> #define VI vector<i64> #define i64 long long using namespace std; const i64 N = 2e5 + 5; const i64 MOD = 998244353; i64 a[2][N]; void solve() { i64 n = 0, m = 0, t = 0, ans = 0, cnt = 0;...
ALGO
0.999982
3.470249
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-10-10T15:01:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "308fbfb17...
24008949-c3bc-4818-a20a-4a2e34cde18b
theProtagonist09/DSA
C++/arrays/threeSumProb/threeSumProbOptimal.cpp
/* Given an array of N integers, your task is to find unique triplets that add up to give a sum of zero. In short, you need to return an array of all the unique triplets [arr[i], arr[j], arr[k]] such that i!=j, j!=k, k!=i, and their sum is equal to zero.*/ #include<bits/stdc++.h> using namespace std; vector<ve...
ALGO
0.999963
5.652475
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2024-06-04T10:02: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": "2dc5f5faae4...
d8de48e2-9d75-4d10-a595-a64484c2541d
studouglas/GEANT4-GPU
geant4.10.02/source/processes/hadronic/models/lend/src/ptwXY_interpolation.cc
/* # <<BEGIN-copyright>> # <<END-copyright>> */ #include <cmath> #include <float.h> #include "ptwXY.h" #if defined __cplusplus #include "G4Exp.hh" #include "G4Log.hh" #include "G4Pow.hh" namespace GIDI { using namespace GIDI; #endif typedef nfu_status (*interpolation_func)( ptwXYPoints *desc, double x1, double y1, ...
ALGO
0.989084
4.661046
{ "github_metadata": { "branch": "master", "commit_count": 518, "repo_created_at": "2015-09-13T23:36:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d4e6d...
e852f5b1-432d-4801-9994-dd74a59ab5c6
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/1_1350_14.cpp
#include <bits/stdc++.h> using namespace std; const int N = 100100, M = 1010, D = 32; int i, j, k, n, m, q, o, x, y, ch, Pn, En; int a[N], h[N], l[N], r[N], p[N], Cnt[65536]; struct Bitset { unsigned int a[D]; int count() { int i, cnt = 0; for (i = 0; i < D; i += 4) { cnt += Cnt[a[i] >> 16] + Cnt[a[i]...
ALGO
0.999943
4.372793
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59: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": "dbda4db4ecc...
0ae8c1af-1a18-4c1e-9c1a-f61392b5607c
Human-translation/code
LeetCode/16.最接近的三数之和/16.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int threeSumClosest(vector<int>& nums, int target) { sort(nums.begin(), nums.end()); int n = nums.size(); int best = 1e7; auto update = [&](int cur) { if (abs(cur - target) < abs(best - target)) { best = cur; } }; for (int i...
ALGO
0.999988
6.242747
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-07-05T01:37: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": "ce12a12c9...
d25724cc-1ae4-4df9-9fb6-42538e54ace8
chromium/chromium
base/process/kill.cc
// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/process/kill.h" #include "base/functional/bind.h" #include "base/process/process_iterator.h" #include "base/task/thread_pool.h" #include "base/time/time.h" #inc...
TOOL
0.906333
7.731455
{ "github_metadata": { "branch": "main", "commit_count": 1609541, "repo_created_at": "2018-02-05T20:55:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21189, "forks": 7786, "issues": 0, "pull_requests": 120 }, "file_meta": { "content_id":...
c53ede32-ed16-4aaa-a594-f7d5981a5a22
wilsonify/base-cpp-data-science
dspack/simple-linear-regression.cpp
#include "stats.h" double predict(double alpha, double beta, double x_i) { return beta * x_i + alpha; } double error(double alpha, double beta, double x_i, double y_i) { return y_i - predict(alpha, beta, x_i); } double sum_of_squared_errors(double alpha, double beta, std::vector<double> x, std::vector<double...
ALGO
0.985342
5.745417
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2022-12-11T21:48: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": "59f8146dd...
6e74883c-d491-499f-a277-8897351eb30a
kris96tian/dsa_cpp
RNA_Structure/nussinov.cpp
#include "nussinov.hpp" Nussinov::Nussinov(const std::string& sequence) : sequence(sequence), length(sequence.size()), score_matrix(length, std::vector<int>(length, 0)) {} void Nussinov...
ALGO
0.999599
4.033762
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2023-11-16T08:28:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "589e825ae50...
6100f460-e2d8-49cb-b6d1-0f2d092d5602
Vaa3D/vaa3d_tools
released_plugins/v3d_plugins/neurontracing_neutube/src_neutube/neurolabi/gui/z3dutils.h
#ifndef Z3DUTILS_H #define Z3DUTILS_H #include "z3dmesh.h" class Z3DUtils { public: template<typename Real> static bool isApproxEqual(const glm::detail::tvec3<Real,glm::highp> &vertex1, const glm::detail::tvec3<Real,glm::highp> &vertex2, Real epsilon = 1e-6); template<typename Real> static Real vertexPlaneDi...
ALGO
0.996159
5.020769
{ "github_metadata": { "branch": "master", "commit_count": 7983, "repo_created_at": "2016-01-27T18:19:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 110, "forks": 70, "issues": 11, "pull_requests": 12 }, "file_meta": { "content_id": "96e...
88ab29d7-b94a-4e34-a057-569b5836bf83
marioyc/Online-Judge-Solutions
COCI/2011-2012/Contest #6/KOSARE.cpp
#include <cstdio> #include <cstring> using namespace std; #define MAXM 20 #define MOD 1000000007 int cont[(1 << MAXM)],dp[2][(1 << MAXM)]; int mod_pow(long long a, int b){ long long ret = 1; while(b){ if(b & 1) ret = ret * a % MOD; a = a * a % MOD; b >>= 1; } return...
ALGO
0.999992
3.743494
{ "github_metadata": { "branch": "master", "commit_count": 364, "repo_created_at": "2010-09-24T16:07:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 603, "forks": 359, "issues": 1, "pull_requests": 9 }, "file_meta": { "content_id": "2c25...
3d2a5059-cce1-4ab7-ad1f-beb292380116
jeff082chen/c-cpp-practice
others/sorting/shearSort.cpp
#include <iostream> #include <vector> #include <random> #include <iomanip> #include <functional> #include <cmath> void shearSort(std::vector<std::vector<int>>&); void sortColumn(std::vector<std::vector<int>>&); std::vector<int> mergeSortHelper(const std::vector<int>&, const std::vector<int>&, std::function<bool(int, i...
ALGO
0.999687
5.586454
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-05T08:58: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": "e7ec2e07b9ee...
eeb9bf3f-5713-4e01-a265-aa2db6127984
roadteam/data-visualization
data/process_mean_std.cc
#include <iostream> #include <vector> #include <map> #include <cmath> #include <fstream> #include <iomanip> using namespace std; #define TRESHOLD 100 vector<double> split(const string& str, const string& delim) { vector<double> tokens; size_t prev = 0, pos = 0; do { pos = str.find(delim, prev)...
DATA
0.968116
4.039553
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-04-08T10:13:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd7e2bbc74d...
e0b076bc-4ca3-408e-bf62-db4d78a89d92
StarRocks/starrocks
be/src/types/hll.h
// Copyright 2021-present StarRocks, Inc. 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required ...
TOOL
0.924536
7.275724
{ "github_metadata": { "branch": "main", "commit_count": 21361, "repo_created_at": "2021-09-04T02:29:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10338, "forks": 2050, "issues": 499, "pull_requests": 376 }, "file_meta": { "content_id":...