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 |
|---|---|---|---|---|---|---|---|
0c6eeb87-6f1e-4809-83a5-f85d082484e5 | sehan2709-cmis/2022-3PPSWinterCamp | 김형진_2023108/A128김형진_20230107.c++ | #include <iostream>
#include <string.h>
#include <string>
#include <stack>
using namespace std;
int main() {
string line;
bool isGood = true;
stack<int> s;
while (true)
{
//fgets(line, sizeof(line), stdin);
getline(cin, line);
if (line[0] == '.') {
break;
... | ALGO | 0.999648 | 4.16362 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2023-01-08T02:57:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f29e9c67a8... |
eae76bce-25d1-4f64-ae8e-7bd596d8e1e3 | nilmadhab/BTP | 3D SoC/aditya/3d_soc_basic1/3D/SIC3/pareto_optimal.cpp | #include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <string.h>
# include <time.h>
void pareto_optimal(int TAM_WIDTH_MIN, int TAM_WIDTH_MAX, int NO_OF_MODULE)
{
long int tam_width, testtime, longest_wrapper;
long int tam_width_prev =0;
long int testtime_prev = 0;
long int longest_wrapper_prev=0... | ALGO | 0.969192 | 3.334486 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2016-02-10T05:20: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": "0f48c04e8... |
ce808e64-ad66-4afb-96bc-1077a5ccc95e | kironbot/AtCoder | ABC/ABC098/D/main.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <deque>
#include <cmath>
#include <map>
using ll = long long;
using namespace std;
int main() {
int N;
cin >> N;
ll A[N];
for (int i = 0; i < N; i++) cin >> A[i];
/* しゃくとり法 */
... | ALGO | 0.999971 | 4.342531 | {
"github_metadata": {
"branch": "master",
"commit_count": 743,
"repo_created_at": "2018-06-24T09:41: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": "adeb4002... |
bf8bf514-c6a5-4777-8e4a-6c882dc460f2 | piyushrawat369/LeetCode | Practice/Tree/Even Odd Tree/code.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999936 | 6.104526 | {
"github_metadata": {
"branch": "main",
"commit_count": 576,
"repo_created_at": "2022-06-26T15:15:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5111cee8cb... |
0b92c994-b913-4df9-80d7-de77adce1730 | crimson000000/OIcode | luogu/5396.cpp | #define LOCAL
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
inline ll read()
{
ll x = 0, f = 1;
char ch = getchar();
while(ch < '0' || ch > '9')
{
if(ch == '-') f = -1;
ch = getchar();
}
while(ch >= '0' && ch <= '9')
{
x = x * 10 + ch - '0';
... | ALGO | 0.999987 | 3.86762 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-07-06T06:03:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d852786204b... |
a3e003bc-5d5b-42bf-8b66-64c9fe7c4417 | Camithilwen/Code-Cloning-Analysis | src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03251/s603280100.cpp | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int N, M, X, Y;
cin >> N >> M >> X >> Y;
int max_x;
cin >> max_x;
rep(i, N - 1){
int x;
cin >> x;
max_x = max(max_x, x);
}
int min_... | ALGO | 0.999975 | 3.257651 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2025-06-06T16:57:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "08902fffd9... |
8361a6e5-0e86-4f8e-992c-0328569dbb16 | ishandutta2007/codeforces-k | kostia244/normal/1427/E.cpp | #define SolutionToA 8bd96cf2dcad0ec7e9afce582c4bd1390179f4dec00841d13edc4420ce7de42b
#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
using ll = __int128;
using namespace std;
const int maxn = 1e5 + 33, mod = 998244353;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
vector<array<ll, 3>> op... | ALGO | 0.999747 | 4.351975 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72d8c7efe65b... |
643e3d85-0f97-44bc-bc85-580bd8c07aac | srishtiprasadmanit12/Data-Structure-Algorithm | Sliding Window Technique/permutationInString.cpp | /*
Brute force Approach
Finding all permutation of S1, and then comparing it with s2 wheather
any of the permutation is present or not.
*/
class Solution {
public:
bool checkInclusion(string s1, string s2) {
sort(s1.begin(),s1.end());
//check permutation of s1 in while loop
while(true){
... | ALGO | 0.999982 | 6.414495 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2024-05-18T06:12:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c541801... |
9c2082bb-351b-4a1e-be95-c6cb93c773bd | rituraut05/DistributedAFS | src/afs_client.cc | #include <chrono>
#include <iostream>
#include <memory>
#include <random>
#include <string>
#include <thread>
#include <vector>
#include <unordered_map>
#include <grpcpp/grpcpp.h>
#include <string>
#include <chrono>
#include <ctime>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <utime.h>
#includ... | TOOL | 0.939727 | 3.420162 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2023-05-23T01:05:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5c20ff8df7... |
a88bb8e7-cc50-4251-94cd-c0f967a0cbac | shafaaf/ECE454-Computer-Systems-Programming | lab4/reduce/randtrack.cc |
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include "defs.h"
#include "hash.h"
#define SAMPLES_TO_COLLECT 10000000
#define RAND_NUM_UPPER_BOUND 100000
#define NUM_SEED_STREAMS 4
/*
* ECE454 Students:
* Please fill in the following team struct
*/
team_t team = {
"Team Name",... | ALGO | 0.988287 | 4.145806 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2016-09-23T04:03:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d8f4e713... |
5346a007-e162-42cc-830f-80b9bcb40105 | f-zyj/ACM | 按 OJ 分类/51Nod/f-51Nod-1246-罐子和硬币/f-51Nod-1246-罐子和硬币/main.cpp | //
// main.cpp
// f-51Nod-1246-罐子和硬币
//
// Created by ZYJ on 16/8/8.
// Copyright ? 2016年 ZYJ. All rights reserved.
//
#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
int main(int argc, const char * argv[])
{
int n, k, c;
while (cin >> n >> k >> c)
{
// 这... | ALGO | 0.999857 | 3.263783 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2018-05-18T16:14:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 199,
"forks": 55,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1971e... |
308442d4-77f5-4c39-9416-173ced8eb233 | gsunit/Competitive-Programming-Journey-for-Interviews | sorting/merge-sort.cpp | #include <bits/stdc++.h>
using namespace std;
void merge(vector<int>& A, int l, int m, int r) {
int n1 = m-l+1;
int n2 = r-m;
vector<int> L, R;
L.assign(A.begin()+l, A.begin()+l+n1);
R.assign(A.begin()+m+1, A.begin()+m+1+n2);
int i=0, j=0, k=l;
while(i<n1 && j<n2) {
if(L[i] <= R[j... | ALGO | 0.999994 | 5.307182 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2020-06-24T19:30:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d413842ce... |
0d781a56-0e92-42f9-8483-ad3e350c7898 | zhangchunbao515/leetcode | leetcode-01/cpp/leetcode/381. insert-delete-getrandom-o1-duplicates-allowed.cpp | #include "public.h"
//164ms, 19.42%
//一个unordered_multimap, 一个vector, 这个vector仅仅在尾部进行操作/随机访问
//using std::default_random_engine;
//using std::uniform_int_distribution;
class RandomizedCollection {
private:
unordered_multimap<int, int> um;
vector<int> v;
public:
/** Initialize your data structure here. */
Random... | ALGO | 0.97354 | 5.364097 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-09-28T14:39: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": "0926f136cf... |
35a89e31-e0f6-4c27-8929-d3855d400dda | ZhengRui/cardea | androidapp/jnisrc/fdlib/facedet.cpp | /**
* @Author: <NAME> <zerry>
* @Date: 2016-03-29T16:31:59+08:00
* @Email: <EMAIL>
* @Project: Face Detection JNI Lib
* @Last modified by: zerry
* @Last modified time: 2016-04-03T07:10:30+08:00
*/
#include "facedet.hpp"
using namespace std;
using namespace cv;
FaceDetector::FaceDetector(string cascadePath, int... | ALGO | 0.937087 | 5.613717 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2016-08-02T08:44: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": "bf45236d0... |
c7f60d3c-9601-4a3f-8e20-43dc1e691a45 | ishandutta2007/codeforces-x | xyz2606/normal/1359/D.cpp | #include<vector>
#include<set>
#include<map>
#include<queue>
#include<string>
#include<algorithm>
#include<iostream>
#include<bitset>
#include<functional>
#include<numeric>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cassert>
#include<cmath>
#include<random>
#include<ctime>
#include<complex>
using nam... | ALGO | 0.999936 | 3.468156 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:38: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": "369df0e1bc8d... |
79f818c7-b29f-4fc6-b0ea-feb4f33c25ed | briel0/cp-utilities | data-structures/geometria/geometria.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define tipo double
#define vetor ponto
struct ponto{
tipo x, y;
ponto() : x(0), y(0) {}
ponto(tipo _x, tipo _y) : x(_x), y(_y) {}
vetor operator + (vetor o){
return vetor(x + o.x, y + o.y);
}
vetor operator - (vetor o... | ALGO | 0.999021 | 3.793829 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2023-09-12T15:01: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": "1416ee9b18c... |
e0a27ea1-5a7b-42f2-bc6d-b42bc9ce6028 | nami4mo/competitive-programming | 2_kakomon/arc/arc074_d.cpp | #include <bits/stdc++.h>
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif
using namespace std;
namespace defines{
typedef long long ll;
typedef pair<ll,ll> P;
#define FOR(i,a,b) for(ll i = a ; i < b ; i++) // for i in range(a,b)
#define REP(i,n) for(ll i = ... | ALGO | 0.999884 | 4.222006 | {
"github_metadata": {
"branch": "master",
"commit_count": 239,
"repo_created_at": "2020-08-08T04: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": "e23b184e... |
99dde142-6309-4d11-8a75-f9092e3329fe | frank20a/cv-tracker-libs | bead_tracker/include/detector.hpp | #pragma once
#define _USE_MATH_DEFINES
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/videoio.hpp>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
struct Bead {
cv::Point2f center;
std::vector<float> scores;
std::ve... | ALGO | 0.96901 | 6.90908 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2024-03-07T15:02: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": "c56cd1150e... |
adc38968-39d3-44b7-9a8d-75dbe89988ae | ShibutElizabeth/BSU-4-sem-Theory-of-Algorithms | IndividualTasks/Алгоритмы_на_графах/Проезд_с_посещением_города_С/City C(Graph).cpp | #include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <queue>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
const int MAX = 1000000000;
int n, m;
int A, B, C;
struct Edge {
int from;
int where;
int capacity;
int flow;
int inverseIndex;
Edge(int _from... | ALGO | 0.999992 | 4.064831 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-06-04T10:44: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": "d92c999a51... |
3f83c098-86eb-4e16-b4dc-8fef6a695a00 | tars0x9752/atcoder | a/agc18.cpp | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(fals... | ALGO | 0.999979 | 4.253414 | {
"github_metadata": {
"branch": "master",
"commit_count": 271,
"repo_created_at": "2019-04-22T05:04: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": "c99fb674... |
4c9b3034-3cb0-4e4a-b015-072a2283568c | shubhrajyotidey305/Leetcode | 820-short-encoding-of-words/820-short-encoding-of-words.cpp | class node
{
public:
char data;
unordered_map<char,node*>children;
bool terminal;
int index;
node(char d)
{
data=d;
terminal=false;
}
};
class Trie
{
public:
node* root;
int cnt;
Trie()
{
root=new node('\0');
cnt=0;
}
bool in... | ALGO | 0.999977 | 5.248318 | {
"github_metadata": {
"branch": "main",
"commit_count": 1761,
"repo_created_at": "2022-01-03T10:24: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": "6630e1ca3... |
ccf9cf7f-bfec-492c-ae4a-993bbc8b4f02 | Jnanashish/Leetcode | Minimum swaps and K together - GFG/minimum-swaps-and-k-together.cpp | //{ Driver Code Starts
// C++ program to find minimum swaps required
// to club all elements less than or equals
// to k together
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
int minSwap(int arr[], int n, int k) {
int size = 0;
for(int i = 0; i<n; ... | ALGO | 0.999901 | 6.008107 | {
"github_metadata": {
"branch": "main",
"commit_count": 226,
"repo_created_at": "2022-01-29T10:35: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": "6262e82468... |
0aeabfe3-8c10-4c89-952f-44bcb02032f6 | Tolga-dev/LeetCodeSolutions | Dynamic/123BestTimetoBuyandSellStockIII.cpp | #include <bits/stdc++.h>
#include <iostream>
#include <cmath>
//https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/description/
using namespace std;
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define qii vector<int>
#define qpii queue<pii>
#define umipii unordered_map<int,p... | ALGO | 0.999969 | 5.113356 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2022-11-20T06:27: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": "f9a49ede5bf... |
c874ad4a-5d62-4732-b13b-3cdbc890ca9f | yeolife/Algorithm | 백준/Gold/15486. 퇴사 2/퇴사 2.cc | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
#define x first
#define y second
const int MOD = 1e9+7;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;}
ll mp(ll a, ll b) {ll ret = 1; while(b) {if(b & 1) ret = ret * a % MOD; a = a * a ... | ALGO | 0.999971 | 3.600225 | {
"github_metadata": {
"branch": "main",
"commit_count": 143,
"repo_created_at": "2023-08-29T18:24: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": "f37adf3072... |
f1e404b1-cb35-4e5f-b26d-6509d7c2c2b9 | gimmewhitewings/SIAOD-7-Encoding | SIAOD-7-Encoding/ShannonFano.cpp | #include "ShannonFano.h"
void ShannonFano::add(Node node) {
if (root == nullptr) {
root = new Node;
root->symbol = node.symbol;
root->frequency = node.frequency;
root->code = node.code;
root->left = node.left;
root->right = node.right;
}
else {
Node* current = root;
while (true) {
if (node.freque... | ALGO | 0.999826 | 4.396911 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2022-12-07T18:06: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": "47a48fbdec... |
293440be-e295-4843-8d1e-e83d3829acd2 | google-research/google-research | scann/scann/projection/pca_projection.cc | // Copyright 2025 The Google Research Authors.
//
// 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... | ALGO | 0.988409 | 7.754424 | {
"github_metadata": {
"branch": "master",
"commit_count": 4832,
"repo_created_at": "2018-10-04T18:42:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 36026,
"forks": 8143,
"issues": 1061,
"pull_requests": 576
},
"file_meta": {
"content_id... |
daf2c913-298e-4cd6-8254-41b7a4996397 | littlebearsama/3D-ObjectDetection-and-Pose-Estimation | 8.其他/机器人抓取/重构/NCC/squirrel_perception_backup-hydro_dev/v4r/v4r/SurfaceRelations/BoundaryRelationsBase.cpp | /**
* Copyright (C) 2012
* <NAME>, <NAME>, <NAME>, <NAME>, <NAME>
* Automation and Control Institute
* Vienna University of Technology
* Gusshausstraße 25-29
* 1170 Vienna, Austria
* ari(at)acin.tuwien.ac.at
*
* This program is free software: you can redistribute it and/or modify
* it u... | ALGO | 0.947937 | 4.417721 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2019-05-06T08:03:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 290,
"forks": 77,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "987dfb... |
19b24de7-aa3a-47f2-93ca-31fb68db376e | sergeneren/BubbleH | source/fmmtl/kernel/Util/GradedPolynomial.hpp | #include <iterator>
#include <numeric>
#include "fmmtl/meta/integer_sequence.hpp"
#include "fmmtl/meta/for_each.hpp"
#include "fmmtl/meta/math.hpp"
#include "fmmtl/meta/functional.hpp"
namespace fmmtl {
constexpr std::size_t
monomial_index_impl(std::size_t d, std::size_t i) {
return combination(i+d-1, d);
}
templa... | ALGO | 0.985033 | 6.238553 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2019-09-30T09:02:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 62,
"forks": 10,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "4479c0b... |
a74ebe42-6167-49aa-b211-2d66e56d7e29 | ssuurrffaaccee/rendering_05_raytracing_using_CUDA | 02-raytracing_using_CUDA/src/cuda_raytracing_the_next_week/CUDARayTracingSystem/triangle.hpp | #ifndef TRIANGLE_H
#define TRIANGLE_H
#include "aabb.hpp"
#include "hittable.hpp"
#include "util.hpp"
#include "vec3.hpp"
class Triangle : public Hittable {
public:
__device__ Triangle(const Point3 &a, const Vec3 &b, const Vec3 &c,
Material* mat)
: plane_origin_{a}, u_{b - a}, v_{c - a}, a_{a}, b_{b}... | ALGO | 0.919533 | 7.367521 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-06-05T03:44:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a045bad8f7... |
1f645504-be5e-458f-a489-1a8f6a3d8e7f | Laceprndpm/ACM | src/cf/edu/edu152d2/D.cpp | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using PII = pair<int, int>;
// 可以明显观察到,如果一个连续
// 非零子序列含有2,则填那一个2
// ,其他不管则最优
// 否则,如果这个字段左面已经没
// 有可变红的,优先让左变红,反
// 之让右
void solve()
{
int n;
cin >> n;
vector<int> arr(n);
for (int& i : arr) {
cin >> i;
}
int ans = 0;
... | ALGO | 0.999941 | 3.978609 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2025-01-27T06:41: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": "db741c89a00... |
11142358-537c-43b4-acbb-2e6377cba3c4 | harryhu009/dingjiehu.github.com | gorillas 6.51.27 PM.cpp | #include <iostream>
#include <cmath>
double height = 10, launch_velocity = 600;
double gravity();
double gravity()
{
return 9.80665;
}
double horizontal_velocity(double launch_velocity , double launch_angle);
double horizontal_velocity(double launch_velocity , double launch_angle)
{
return launch_velocity ... | TOOL | 0.992877 | 4.671029 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-09-24T17:53: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": "76cd263a78... |
f89cffbe-3882-437a-9d62-9d52a6837322 | jaredhoberock/distribution2d | distribution2d/cosine_weighted_unit_hemisphere_distribution.hpp | #pragma once
#include "concentric_unit_disk_distribution.hpp"
#include <tuple>
#include <utility>
#include <algorithm>
#include <cmath>
#include <type_traits>
namespace dist2d
{
// a cosine-weighted distribution of points on the unit hemisphere
template<class Point = std::tuple<float,float,float>>
class cosine_weig... | ALGO | 0.998073 | 6.72393 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2016-10-28T04:32: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": "42a00df36... |
86bc3884-3fb2-495a-9997-4e56b0f53272 | SimonPuchas/PathFinderRL | thesis_ws/src/turtlebot3/open_manipulator/Arduino/OpenManipulator/src/OPMMath.cpp | /*******************************************************************************
* Copyright 2016 ROBOTIS CO., LTD.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | ALGO | 0.996622 | 6.372832 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2025-03-30T05:41:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c33b777eb06... |
ad2d053e-1382-4902-802b-3757ba98c163 | rajesh-1920/Competitive_Programming_Problem_Solving | Codeforces/C_Have_Your_Cake_and_Eat_It_Too.cpp | // Author: <NAME>
// CF : rajesh-1920
// Date : 12.01.2025
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
//----------------------------(definition section)-----------------------------------------
#define dbg(x) cout << #x << " = " << x << '\n'
#define fi first
#define sc second
#defi... | ALGO | 0.99978 | 4.348739 | {
"github_metadata": {
"branch": "main",
"commit_count": 263,
"repo_created_at": "2024-10-21T13:58: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": "646558d404... |
07cd9e69-a479-4e85-9f83-b3faa4071f82 | Runarok/GeeksForGeeks-solutions | Difficulty: Easy/Transpose of Matrix/transpose-of-matrix.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to find transpose of a matrix.
void transpose(int mat[4][4]) {
// Iterate over the matrix to swap elements across the diagonal
for(int i = 0; i < 4; i++) {
... | ALGO | 0.999493 | 6.085756 | {
"github_metadata": {
"branch": "main",
"commit_count": 6962,
"repo_created_at": "2025-01-14T04:19:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4794c4e8... |
a43c58f2-3d04-4488-92b4-d1f8e9091649 | ishandutta2007/codeforces-nonalphabetic | _menhera/normal/1641/C.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node
{
const Node *l, *r;
bool ch;
int cn;
Node(const Node *l, const Node *r, bool ch, int cn) : l(l), r(r), ch(ch), cn(cn) {}
const Node *setv(int f, int t, int s, int e) const
{
if (t < s || e < f || ch)
return this;
... | ALGO | 0.999777 | 4.70105 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:49:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2ad998d4f7c... |
61d198f0-ff18-4ded-a7fe-5acd3e12e5af | bonfa/ACTR_Cpp_VisualModule | BaseClass/src/extractorUtils.cpp |
#include "extractorUtils.h"
double angle( cv::Point pt1, cv::Point pt2, cv::Point pt0 ) {
double dx1 = pt1.x - pt0.x;
double dy1 = pt1.y - pt0.y;
double dx2 = pt2.x - pt0.x;
double dy2 = pt2.y - pt0.y;
return (dx1*dx2 + dy1*dy2)/sqrt((dx1*dx1 + dy1*dy1)*(dx2*dx2 + dy2*dy2) + 1e-10);
}
double m... | ALGO | 0.997385 | 3.969543 | {
"github_metadata": {
"branch": "master",
"commit_count": 392,
"repo_created_at": "2012-10-30T13:55:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "060af3d6... |
9e5900e1-49d8-44b3-bf9d-e9f5a5f1e84e | JaiSehgal007/ContestArchives | Codeforces/Round916/g1.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long
#define pii pair<int,int>
#define vii vector<pii>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define ff first
#define ss second
#define setBits(x) __builtin_popcount(x)
#define om... | ALGO | 0.999962 | 4.021945 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2024-01-13T17:57: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": "ae903af3dee... |
714ac027-d2e6-452c-92f7-a88271a39f0d | youxxxx/Competitive_Programming | Codeforces/regular_rounds/690/F/F/source.cpp | #include<cstdio>
#include<cmath>
#include<vector>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<functional>
#include<cstring>
using namespace std;
#define N 200000
/*
void addl(int idx, int val)
{
for (; idx <= N * 2; idx += (-idx)&idx)
{
lefta[idx] += ... | ALGO | 0.999899 | 3.830975 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2019-11-05T04:42: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": "4705b3dae... |
6f534602-07a0-4046-8927-28958693c679 | rodea0952/competitive-programming | AOJ/0121.cpp | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>... | ALGO | 0.999892 | 4.217811 | {
"github_metadata": {
"branch": "master",
"commit_count": 408,
"repo_created_at": "2019-08-15T06:22: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": "a88d035c... |
88d6d060-7222-449e-a0af-4ddc3a005e28 | florian-world/high-performance-computing | 2020-hpc-ii/hw3/wave.cpp | #include "wave.h"
//********************************************************
//YOU ONLY NEED TO MODIFY THIS FILE TO COMPLETE HOMEWORK 3
//********************************************************
void WaveEquation::pack_all() {
// ********************************************************************************
// ... | ALGO | 0.999761 | 4.022552 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2020-07-04T09:43: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": "3f4f79fc... |
65db4b53-210d-4e8e-bf67-e41a0a8843e4 | JulianThijssen/GDT | Source/Matrix4f.cpp | #include "Matrix4f.h"
#include "Vector3f.h"
#include "Vector4f.h"
#include "Maths.h"
#include <cmath>
#include <iomanip>
#include <sstream>
#ifdef GDT_NAMESPACE
namespace GDT
{
#endif
const Matrix4f Matrix4f::IDENTITY = Matrix4f();
const Matrix4f Matrix4f::BIAS = Matrix4f(0.5f, 0.0f, 0.0f, 0.0f,
0.0f... | TOOL | 0.963046 | 4.846643 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2018-07-17T21:48:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "91eb38ca9... |
013ce7c3-329d-4420-a0d2-146e2105f0ce | whztt1989/MeshEditor | MeshEditor/polysim.cpp | #include "stdafx.h"
#include <assert.h>
#include <cmath>
#include <vector>
using namespace std;
#include "polysim.h"
/************************************************************************/
/* Based on the paper: Qualitative Polyline Similarity Testing with
Applications to Query-by-Sketch, Indexing and Cla... | ALGO | 0.996176 | 4.453158 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2016-10-22T06:58:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "89abc747eb... |
0dba9e48-23e5-4e15-878a-bcf33a61de63 | Nehal99/Biology | Sequence.cpp | #include "Sequence.h"
#include"DNA.h"
#include <iostream>
#include"Global.h"
#include<cstring>
#include<algorithm>
using namespace std ;
Sequence::Sequence() //Default Constructor
{
seq = new char ;
}
Sequence:: Sequence(int length) //Parameterized Constructor
{
sizee = length ;
seq = new char[sizee+1];
... | TOOL | 0.930288 | 3.223874 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-12-14T18:54:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2a99e9892... |
e8e3c377-2012-434a-b548-7dd3eb3234a9 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/05/0504/personal_submission/cf1175c_ranzhi.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using PII = pair<int, int>;
using PDI = pair<double, int>;
using PLI = pair<ll, int>;
using PLL = pair<ll, ll>;
using PSI = pair<string, int>;
using PSS = pair<string, string>;
using PDD = pair<do... | ALGO | 0.999869 | 5.130278 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "e1c1... |
4e4f4b54-1a5e-4862-90c4-fb1a1c5ba926 | PointCloudLibrary/pcl | gpu/surface/src/convex_hull.cpp | /*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2011, <NAME>, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are ... | ALGO | 0.905781 | 6.158148 | {
"github_metadata": {
"branch": "master",
"commit_count": 14566,
"repo_created_at": "2013-02-12T16:40:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10495,
"forks": 4656,
"issues": 432,
"pull_requests": 147
},
"file_meta": {
"content_id... |
c8ab90e5-ce97-4fc6-be22-24acfce81fc5 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/05/0511/personal_submission/cf1028c_WanderOvO.cpp | /*
枚举删掉哪个矩形,然后算横坐标和纵坐标的交集
*/
int T;
LL n;
PLL horizontal_lines[N], vertical_lines[N];
PLL pre_horizontal[N], suf_horizontal[N], pre_vertical[N], suf_vertical[N];
void solve1() {
cin >> n;
for (int i = 1; i <= n; i++) {
LL x1, y1, x2, y2;
cin >> x1 >> y1 >> x2 >> y2;
horizontal_lines[i]... | ALGO | 0.999845 | 3.503313 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "8250... |
25dfbbd4-382f-4312-91a5-b920d8b78b67 | karanchawla/100DaysofCode | Backtracking/uniquePaths.cpp | #include <iostream>
#include <vector>
using namespace std;
#define N 4
bool isValid(const int i, const int j)
{
if(i<0 || i>=N || j<0 || j>=N)
return false;
return true;
}
void findUniquePaths(int mat[N][N], int i, int j, int &freq, int visited[N][N])
{
if(i==N-1 && j==N-1)
{
freq++;
return;
}
visit... | ALGO | 0.999913 | 5.122447 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2017-09-13T14:49:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c4a719462... |
b646b171-8969-4cec-be69-2b1931ea3593 | eugene536/soft_design | 5_bridge_pattern/AdjacencyMatrixGraph.h | #ifndef ADJACENCY_MATRIX_GRAPH_H
#define ADJACENCY_MATRIX_GRAPH_H
#include <QDebug>
#include "Graph.h"
struct AdjacencyMatrixGraph
: Graph
{
AdjacencyMatrixGraph(DrawingApi * api)
: Graph(api)
{}
void drawImpl() const override {
qDebug() << "adjacency_matrix_graph::draw() const";
... | ALGO | 0.907079 | 6.078106 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2016-10-01T12:00: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": "c607817709... |
3788a6a5-bebd-4729-9be2-88b09a62ff62 | gratus907/Gratus_PS | BOJ Originals/01723 점 나누기.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define all(x) ((x).begin()),((x).end())
#define usecppio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
vector <double> v;
int n, k;
int min_gap = 1e9;
double ang;
void solve(int start)
{
int M = 0, m = 1e9;
double st = v[star... | ALGO | 0.999901 | 4.55853 | {
"github_metadata": {
"branch": "master",
"commit_count": 93,
"repo_created_at": "2020-01-20T15:19:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6840de62d... |
642ecab5-e00e-40f6-b1ae-ef1c4a3a56df | Kooji707/c_plus_programming | fib.cpp | #include <iostream>
using std::cout;
using std::cin;
using std::endl;
//0 1 1 2 3 5 8 13
int fibonacci (int choice) {
int seriesOutput;
int currentInt = 0;
int tempInt = 0;
int nextInt = 1;
for (int i = 0; i <= choice; i++) {
seriesOutput = currentInt;
tempInt = currentInt + nextIn... | ALGO | 0.999831 | 3.884268 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-09-02T19:46:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f7e4996b4e... |
b3e8a1c1-a436-4e09-863f-b87bcbe59f33 | aashutoshtaikar/practice | cpp/romanToDec/romanToDecBad.cpp | #include<iostream>
#include<map>
using namespace std;
/*
*/
int romanToDec(string str){
map<char,int> roman;
roman['I']= 1;
roman['V'] = 5;
roman['X'] = 10;
roman['L'] = 50;
roman['C'] = 100;
roman['D'] = 500;
roman['M']= 1000;
int num{0};
int i = str.size() - 1;
... | ALGO | 0.99982 | 4.770475 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-01-08T02:13: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": "b2462ddd9... |
b397447b-f0d4-421b-9739-93c887dfa0f8 | xxioachou/ACM | cf_problems/CF1371D.cpp | #include <bits/stdc++.h>
#define x first
#define y second
#define sz(x) ((int)x.size())
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
const int inf = 0x3f3f3f3f;
const ll INF = 1e18;
void solve() {
int n, k;
cin >> n >> k;
vector<vector<int>> a(n, vector<int>(n));
vector<int> r(n), c(n);
... | ALGO | 0.999914 | 3.832829 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2023-08-01T12:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea40e56ec55... |
11489503-4c04-472b-9173-912e8777c079 | kimgibaam/Algorithm | Baekjoon Online Judge/SW역량테스트/19238. 스타트택시.cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define INF 987654321
struct custom {
int sr, sc, er, ec;
};
struct point {
int r, c, d;
};
int N, M, power;
int Map[20][20];
int dist[20][20];
vector<custom> customs;
queue<point> q;
int dr[] = {-1,1,0,0};
int dc[] = {0,... | ALGO | 0.999877 | 4.900842 | {
"github_metadata": {
"branch": "master",
"commit_count": 160,
"repo_created_at": "2020-09-11T02:45: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": "497c6a4c... |
a5fe899b-1ec0-4bd3-9396-7de52898bf37 | HuangYe12/past_lab_projects | OpenCL_Lab/OpenCLExercise3_Sobel/src/OpenCLExercise3_Sobel.cpp | //////////////////////////////////////////////////////////////////////////////
// OpenCL exercise 3: Sobel filter
//////////////////////////////////////////////////////////////////////////////
// includes
#include <stdio.h>
#include <Core/Assert.hpp>
#include <Core/Time.hpp>
#include <Core/Image.hpp>
#include <OpenCL... | ALGO | 0.998987 | 5.998305 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-07-31T22:20: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": "b9a4e65e05... |
b37afa8c-44aa-4fe9-bf67-88563a6d32fe | skoriop/competitive-programming | template.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef vector<string> vst;
typedef vector<pll> vpll;
typ... | ALGO | 0.999422 | 3.513463 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-01-03T13:45: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": "2d0ddb36278... |
1454eca4-138c-4cbd-95a7-10eb93147a7d | kylearbuthnot/Linear-Structure-Reviews | Linear Structure/array.cpp | #include <iostream>
using namespace std;
int main(int argc, char* argv[]){
//Array traversal
int arrTraversal[] {1, 2, 3, 4, 5};
int n = sizeof(arrTraversal) / sizeof(arrTraversal[0]);
for(int i = 0; i < n; i++){
cout << arrTraversal[i] << " ";
}
//finding max value of an array
... | ALGO | 0.989663 | 4.1057 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-01-21T22:59:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2099fed94098... |
5c83cbd5-8e00-46c7-aa63-dd9ecd1a11f0 | Maserhe/Algorithm_practise | 杂题/方格取数.cpp | #include<iostream>
#include<algorithm>
using namespace std;
const int N =15;
int w[N][N];
int f[N*2][N][N];
int a , b , c;
int main(){
int n;
cin>>n;
while (cin>>a>>b>>c && a||b||c) cin>>w[a][b];
for( int k =2 ; k <= n*2 ; k++ ){
for( int i1= 1; i1 <= k ; i1++)
for(int i2 = 1 ; ... | ALGO | 0.999977 | 3.781166 | {
"github_metadata": {
"branch": "master",
"commit_count": 127,
"repo_created_at": "2019-12-28T13:53:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80b131c8... |
8a90fb70-cb77-4de0-92ff-1b57fcb093da | ckdlscjs/AlgorithmRepo | 백준/Gold/18114. 블랙 프라이데이/블랙 프라이데이.cc | #include <bits/stdc++.h>
long long int N, C, W[5005];
int main()
{
std::ios::sync_with_stdio(false);
std::cin.tie(0);
std::cout.tie(0);
std::cin >> N >> C;
for(int n = 0; n < N; n++)
{
std::cin >> W[n];
if(W[n] == C)
{
std::cout << 1;
return 0;
}
}
std::sort(W, W + N, std::le... | ALGO | 0.999999 | 3.785407 | {
"github_metadata": {
"branch": "main",
"commit_count": 1272,
"repo_created_at": "2024-01-10T13:32: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": "11182867f... |
f67b1e4f-4cc0-47ff-937f-8250b73fde0f | HKUST-Aerial-Robotics/EPSILON | core/common/src/common/solver/ooqp_interface.cc | #include "common/solver/ooqp_interface.h"
#include <stdexcept>
#include "GondzioSolver.h"
#include "QpGenData.h"
#include "QpGenResiduals.h"
#include "QpGenSparseMa27.h"
#include "QpGenVars.h"
#include "Status.h"
namespace common {
using namespace Eigen;
using namespace std;
bool OoQpItf::solve(const Eigen::Sparse... | ALGO | 0.998049 | 5.780853 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-09-20T08:27:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 718,
"forks": 252,
"issues": 13,
"pull_requests": 0
},
"file_meta": {
"content_id": "bcf7e... |
887e5400-1d7c-4692-bb4b-1927e1550615 | ehnryx/acm | sppc-2016-cf101177/e.cpp | #include <bits/stdc++.h>
using namespace std;
#define _USE_MATH_DEFINES
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef complex<ld> pt;
typedef vector<pt> pol;
const char nl = '\n';
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const ll MOD = 1e9+7;
const ld EPS = 1... | ALGO | 0.999909 | 4.613298 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2018-05-03T04:18:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "81b507528... |
46fcf350-69aa-41b7-84aa-57f3e85ab330 | uniliufeng/ComDA | include/gausshermitefilter.h | #ifndef __LDAS_GAUSSHERMITEFILTER_H
#define __LDAS_GAUSSHERMITEFILTER_H
#include "filter.h"
namespace ldas
{
class GaussHermiteFilter : public Filter
{
public:
/** Default constructor */
GaussHermiteFilter();
/** Default destructor */
virtual ~GaussHermiteFilter();
/** Copy constructor
* \pa... | ALGO | 0.906883 | 6.533718 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-05-16T03:49:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 19,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76dfaeee5... |
b54f1270-a568-496e-8f09-a9c6466eca0e | nachiketkanore/CP-Trash | cf/SPC/G.cpp | /**
* Author: <NAME>
* Created: Wednesday 04 August 2021 02:20:04 PM IST
**/
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define int int64_t
#define sz(x) (int)(x.size(... | ALGO | 0.999719 | 3.878155 | {
"github_metadata": {
"branch": "main",
"commit_count": 370,
"repo_created_at": "2021-08-04T18:15:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d0ec565476... |
d4fb048c-d585-47c4-b2e3-9a574c33ac4f | shahnk19/data-structures | src/queue.cpp | #include <iostream>
using namespace::std;
struct Node {
Node *next;
int value;
public:
Node(int val) {
value = val;
next = NULL;
}
};
class Queue {
public:
Node *head, *tail;
Queue() {
head = NULL;
tail = NULL;
}
bool IsEmpty() {
if(head == NULL)
... | ALGO | 0.973171 | 4.951374 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2021-04-28T22:59:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f931f447... |
efc048fa-beff-4812-a6c3-daa50a481d44 | kangyeop/algorithm | level3/43164.cpp | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
map<string, vector<pair<string, bool>>> arr;
vector<vector<string>> answers;
int citySize;
void dfs(string start, vector<string> answer, int depth) {
answer.push_back(start);
if (depth == citySize... | ALGO | 0.999986 | 5.682822 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2020-10-30T02:11:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "603d5924... |
36bf78cd-bff5-49f6-9f34-02dfc0a2b794 | ermolaevv/ppc-2024-autumn | tasks/mpi/petrov_a_nearest_neighbor_elements/src/ops_mpi.cpp | // Copyright 2023 <NAME>
#include "mpi/petrov_a_nearest_neighbor_elements/include/ops_mpi.hpp"
#include <algorithm>
#include <functional>
#include <random>
#include <string>
#include <thread>
#include <vector>
using namespace std::chrono_literals;
bool petrov_a_nearest_neighbor_elements_mpi::TestMPITaskSequential::p... | ALGO | 0.999411 | 6.378511 | {
"github_metadata": {
"branch": "master",
"commit_count": 440,
"repo_created_at": "2024-10-04T18:18:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 157,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3c4112... |
a0e3780d-5594-449a-8891-4151d916113d | xiansongz/repos1 | MultiThread1cpp.cpp |
#include <Windows.h>
#include <iostream>
#include <sstream>
#include <string>
#include <chrono>
using std::istringstream;
using std::string;
using std::cout;
// Driver Code
float sub1(int n)
{
int i;
float sum = 0;
for (i = 0; i < n; i++) {
sum += i * i;
}
return sum;
}
int main22()
{
auto start = std::ch... | TOOL | 0.972852 | 4.325106 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-06-09T18:03: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": "bbd9b6fe6dc2... |
f4c7a674-ff21-4651-b65c-7a334252b266 | Gorachand-Senapati/Gora-s-DSA-Sheet | Binary Search/book maxAllocation pages problem.cpp | class Solution {
public:
bool isValid(vector<int> &arr, int k, int maxAllocatePage) {
int student = 1;
long long pageStudent = 0;
for (int i = 0; i < arr.size(); i++) {
if (arr[i] > maxAllocatePage) return false;
if (pageStudent + arr[i] <= maxAllocatePage) {
... | ALGO | 0.999992 | 5.818379 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2025-06-14T15:01:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14a7b60f33e... |
944fb319-3742-459b-928d-d41a44ec8b1a | TzuChieh/Photon-v2 | Engine/Engine/Source/Core/SampleGenerator/Halton/halton.h | #pragma once
#include "Core/SampleGenerator/Halton/halton_fwd.h"
#include "Math/math.h"
#include "Math/math_table.h"
#include "Math/Random/Quasi/radical_inverse.h"
#include "Math/Random/shuffle.h"
#include "Math/hash.h"
#include <Common/assertion.h>
#include <Common/primitive_type.h>
#include <Common/logging.h>
#inc... | ALGO | 0.997402 | 6.799035 | {
"github_metadata": {
"branch": "master",
"commit_count": 2617,
"repo_created_at": "2016-10-12T18:07:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 94,
"forks": 6,
"issues": 84,
"pull_requests": 3
},
"file_meta": {
"content_id": "74be7... |
75674a3c-a474-4dc8-b5ba-70e425f0c70a | Li-Iven/DA | Lab5/SuffixTree.h | #pragma once
#include <vector>
#include <map>
#include <string>
#include <memory>
typedef long long ll;
struct TSuffixTreeNode {
std::map <char, TSuffixTreeNode* > Edges;
TSuffixTreeNode* SuffixLink;
ll Start;
std::shared_ptr<ll> End;
ll SuffixIndex = -1;
~TSuffixTreeNode();
};
typedef struct... | ALGO | 0.997245 | 4.6311 | {
"github_metadata": {
"branch": "main",
"commit_count": 87,
"repo_created_at": "2021-05-05T21:11: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": "c2717a18058... |
ec0fdcf3-8e9a-45fe-8342-b761f30a69fd | cy-org/docs-samples | snippets/cpp/VS_Snippets_CLR_Classic/classic Array.CreateInstance Example/CPP/source.cpp |
// <Snippet1>
using namespace System;
void PrintValues( Array^ myArr );
void main()
{
// Creates and initializes a one-dimensional Array instance of type Int32.
Array^ my1DArray = Array::CreateInstance( Int32::typeid, 5 );
for ( int i = my1DArray->GetLowerBound( 0 ); i <= my1DArray->GetUpperBound( 0 ); i++ )
... | TOOL | 0.904078 | 4.176482 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-11-24T08:49:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b9b4d1407bf... |
03499280-efbc-42f6-9c45-ac345cf5fa76 | kuhaku-space/algo | test/aoj/challenge/2426.test.cpp | // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/problems/2426
#include <iostream>
#include <vector>
#include "binary_tree/range_tree.hpp"
int main(void) {
int n, m;
std::cin >> n >> m;
std::vector<int> x(n), y(n);
for (int i = 0; i < n; ++i) std::cin >> x[i] >> y[i];
range_tree<Ad... | ALGO | 0.999401 | 5.698116 | {
"github_metadata": {
"branch": "main",
"commit_count": 2935,
"repo_created_at": "2021-01-02T10:23:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "b98d8a70... |
1d6b7dfa-720f-449e-805c-6211fb2e971c | MV-02/20BCS7751_KRG_DSA_winter-training | Heap/heapSort.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void max_heapify(vector<int> &arr, int i, int size_)
{
int largest, l = (2 * i) + 1, r = l + 1;
if (l < size_ && arr[l] > arr[i])
largest = l;
else
largest = i;
if (r < size_ && arr[r] > arr[largest])
... | ALGO | 0.999851 | 5.133526 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2022-12-20T09:52: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": "2299e205b... |
0762f9e5-4a0d-4370-b2f0-23d2cdc54239 | X3n0nP0w3r3d/InputOutput | cses/intro/Coin_Piles.cpp | #include <bits/stdc++.h>
using namespace std;
//#ifdef LOCAL
#ifndef ONLINE_JUDGE
//template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
//template<typename T_container, typename T = typename enable_if<!is_same<T_container, ... | ALGO | 0.999019 | 4.419224 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-10-18T06:34: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": "83105753b5c... |
e9747f05-119c-4fe6-8af6-79d0907cf36c | ferconde87/elements-of-programming-interviews | cpp/introduction/epi.cpp | #include <bits/stdc++.h>
using namespace std;
int count_bits(int number){
int result = 0;
while(number){
result += number & 1;
number >>= 1;
}
return result;
}
// pre: number > 0
string print_bits(int number){
string result;
while(number > 0){
result += (number & 1) ? "1" : "0";
number >>... | ALGO | 0.994242 | 4.628936 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-08-10T16: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": "ddcf21a787... |
543419fe-6e87-46f8-841d-7fa556b12369 | StefanGies/PBiIDR-OpenFOAM | biidrsSolver.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For ... | ALGO | 0.998854 | 5.483109 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-03-20T20:47:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6565be13b... |
46f63896-ffa4-4a61-8657-bae69d0f5939 | ishandutta2007/codeforces-n | nutella3000/normal/1654/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define mp make_pair
#define siz(a) (int)a.size()
#define all(a) a.begin(), a.end()
#define pb emplace_back
#define pii pair<int, int>
#define chmax(a, b) a = max(a, b)
const int N = 1e5 + 3, mod = 998244353, inf = ... | ALGO | 0.999926 | 4.48115 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "fe369e7d2fb6... |
5a9b576e-5a39-4bf7-96ac-a1938d397ec9 | Mango-Juice/Algo-Study | Baekjoon/Graph/MST/17472_다리_만들기_2.cpp | // https://www.acmicpc.net/problem/17472
#include <stdio.h>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
const int dx[4] = { -1, 1, 0, 0 };
const int dy[4] = { 0, 0, -1, 1 };
struct edge {
int node1, node2, weight;
edge(int a, int b, int c) : node1(a), node2(b), weight(c) {}
boo... | ALGO | 0.999878 | 4.094551 | {
"github_metadata": {
"branch": "main",
"commit_count": 533,
"repo_created_at": "2021-03-25T15:42:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14bd1a95dc... |
98a82f95-167b-4485-abb0-ea98bd345fe0 | cppascalinux/bzoj | 4771/tree2.cpp | //2019.05.05
//bzoj4771 七彩树 可持久化线段树合并(第一棵:颜色->最小深度 第二棵:深度->颜色数量和)
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define gc() (p1==p2&&(p2=(p1=buffer)+fread(buffer,1,10000000,stdin),p1==p2)?EOF:*p1++)
#define inf 0x7F7F7F7F
using namespace std;
char *p1,*p2,buffer[10000009];
int n,m,tot,cnt1,... | ALGO | 0.999967 | 4.089472 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2019-04-01T09:39:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83e5db171... |
ddf69590-255e-4224-ab07-e5fbffb45fb5 | wushirenhk/RM-Engineer-Robot-First-Generation | robo-control-template-main/Libraries/PID/PID_Controller.h | #ifndef PID_CONTROLLER_H
#define PID_CONTROLLER_H
#include "main.h"
#include "arm_math.h"
#include "Task.h"
#include "CommonMath.h"
typedef enum
{
PID_DELTA = 0,//增量式
PID_ABSOLUTE = 1//位置式(绝对式)
} PID_Type;
//PID运算时的系数
typedef struct _PID_Params_t
{
PID_Type type_selection; // 类别设置
float ki_able_... | TOOL | 0.953624 | 5.647058 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-07-13T12:29: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": "ffde29ca54aa... |
22b0446c-6bc6-46ea-9c9f-5fd297059c4e | yamate11/compprog | zCodeForces/r853_2/d/cans.cc | #include <bits/stdc++.h>
#include <cassert>
using namespace std;
using ll = long long int;
using pll = pair<ll, ll>;
// #include <atcoder/all>
// using namespace atcoder;
#define REP(i, a, b) for (ll i = (a); i < (b); i++)
#define REPrev(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(coll) (coll).begin(), (coll).... | ALGO | 0.999957 | 4.397869 | {
"github_metadata": {
"branch": "main",
"commit_count": 219,
"repo_created_at": "2021-03-11T06:12: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": "8c9e9405b1... |
96de130c-1827-4bde-ae42-2ea5cdebdb87 | Shreya-Mahajan/30daysofCPP | manipulators.cpp | #include <iostream>
#include <iomanip> //header file for manipulators i.e "endl" and setw(width in number)
using namespace std;
int main()
{
int a = 3, b = 78, c = 1233;
cout << "The value of a without setw is: " << a << endl;
cout << "The value of b without setw is: " << b << endl;
cout << "The val... | TOOL | 0.95626 | 3.45115 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-06-01T15:05: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": "d65b18d026f3... |
763a31c6-9597-47e7-ad8e-940ab8e7e3f6 | ishandutta2007/codeforces-z | zlt1117/normal/827/D.cpp | //#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define FOR(i,a,b) for(int i=a;i<=b;++i)
#define PII pair<int,int>
#define ll long long
#define pb push_back
#define sz(x) (int)(x.size())
#define rd (rand()<<16^rand())
#define db double
#define gc getchar()
#define mk make_pair
#define iter set<int>::iterator
//... | ALGO | 0.999965 | 3.839761 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:43:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3be3af38cdc5... |
2371408a-a361-41cd-b98b-e547f90ef4e6 | ishandutta2007/codeforces-z | zhouyuyang/normal/1060/G.cpp | #include<bits/stdc++.h>
#define ll long long
#define ull unsigned ll
#define uint unsigned
#define db long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define IT iterator
#define PB push_back
#define MK make_pair
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define For(i... | ALGO | 0.999867 | 3.577996 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:43:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0bd104e0c9fb... |
b299b1f2-9c4e-4ddf-886c-9a6efd75f300 | samkitshah1262/CMCP | BS/B_Power_Walking.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define pb push_b... | ALGO | 0.999928 | 4.243401 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-11-11T04:22: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": "4b5b2333826... |
26b62f95-ae41-466d-bfaf-0929fbe74eca | ishaanjav/Codeforces-Solutions | 476B_DreamoonAndWifi.cpp | /*
* Created by ishaanjav
* github.com/ishaanjav
* Codeforces Solutions: https://github.com/ishaanjav/Codeforces-Solutions
*/
#include <iostream>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#include <string>
#include <vector>
typedef vector<int> vi;
//#include <algorithm>
... | ALGO | 0.999922 | 3.666204 | {
"github_metadata": {
"branch": "main",
"commit_count": 122,
"repo_created_at": "2020-11-01T15:41:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fab6c9e90b... |
e3731741-659e-413e-8c91-31f680b5d523 | kamyu104/LintCode | C++/sort-list.cpp | // Time: O(nlogn)
// Space: O(logn)
/**
* Definition of ListNode
* class ListNode {
* public:
* int val;
* ListNode *next;
* ListNode(int val) {
* this->val = val;
* this->next = NULL;
* }
* }
*/
class Solution {
public:
/**
* @param head: The first node of linked l... | ALGO | 1 | 6.053271 | {
"github_metadata": {
"branch": "master",
"commit_count": 1293,
"repo_created_at": "2015-02-16T16:25:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 631,
"forks": 261,
"issues": 1,
"pull_requests": 3
},
"file_meta": {
"content_id": "656... |
07fbb873-c15c-47f8-bb73-59a554f5114c | sicojuy/leetcode | problems/52.cpp | #include <vector>
#include <string>
#include <iostream>
using namespace std;
class Solution {
public:
void nQueues(int *result, vector<int> &col, vector<int> &h1, vector<int> &h2, int m, int n) {
int i;
if (m == n) {
*result += 1;
return;
}
for (i = 0; i < n;... | ALGO | 0.999914 | 5.084462 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2018-08-01T02:43: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": "2a40a21cd... |
74646bbb-57bb-4e64-a24a-b2159eaca3d4 | westrope/Evo-Comp | Assignment_2/func.cpp | #include "func.h"
inline double sq(double x)
{
return x*x;
}
double f0(double x, double y)
{
return 1.0/(sq(x-1.0) + sq(y-3.0)) + 1.0;
}
double fa(double x, double y)
{
return sq(sin(3*x + 2)) + sin(2*y + 1) + 10/(3 + sq(y - (sq(x - .5) - 3)));
}
double fb(double x, double y)
{
return sq(sin(5*x +... | ALGO | 0.975809 | 3.676852 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2015-01-27T22:00: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": "e50c5045d... |
2697df06-5dc8-47af-a16d-ad2e37ffba1c | maemual/ACMcode | zoj/16/zoj1671/zoj1671.cpp | #include <cstdio>
#include <cstring>
const int MAX_SIZE = 8;
int map[MAX_SIZE+5][MAX_SIZE+5];
int vis[MAX_SIZE+5][MAX_SIZE+5];
int dx[]={-1,0,1, 0};
int dy[]={ 0,1,0,-1};
int row,col;
int head,tail;
int sx,sy,ex,ey;
struct node{
int x,y,step,hp;
}queue[1000000];
void push(int x,int y,int step,int hp)
{
queue[tail].x... | ALGO | 0.999839 | 3.933626 | {
"github_metadata": {
"branch": "master",
"commit_count": 317,
"repo_created_at": "2012-11-16T13:55:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f64ac269... |
394613fc-6319-48e2-aad1-ad10e3456111 | koba-e964/contest | atcoder/abc061/d.cpp | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | ALGO | 0.999954 | 3.573691 | {
"github_metadata": {
"branch": "master",
"commit_count": 2836,
"repo_created_at": "2013-09-13T04:48:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 25,
"forks": 5,
"issues": 20,
"pull_requests": 0
},
"file_meta": {
"content_id": "06d1e... |
c262adc5-6197-4df3-a79f-dd4a6d259620 | NathanCidal/AdventOfCode---2022 | Day 09 - 02/Day09-02.cpp | #include <iostream>
#include <string>
using namespace std;
int main(){
int jaVisitados = 0;
char direction;
int numMov;
int sizeX = 1000;
int sizeY = 1000;
char ** map = new char*[sizeY];
for(int i = 0; i < sizeY; i++){
map[i] = new char[sizeX];
}
for(int i = 0; i < sizeY; i++){
for(int j = 0; j < ... | ALGO | 0.999832 | 3.482269 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2023-10-11T17:56:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6de5f09e43f... |
a1448545-7d33-445a-940a-c6d78b2215ed | Deepraj-chawda/Data_Structure | Array/Insertion_in__array.cpp | #include<iostream>
using namespace std;
int a[50],size;
void display(int size){
cout<<"\n Elements are : ";
for (int i=0;i<size;i++)
cout<<a[i]<<" ";
}
void end(int data){
if(size-1==50-1)
cout<<"Array is overflow";
else
{
a[size]=data;
size++;
}
}
void beg(int dat... | ALGO | 0.997033 | 3.628044 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2021-05-05T20:08:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c1a19e237... |
af803569-feb9-47d0-bbc9-56291373502a | StephenQiu30/leetcode | C++/六月版/221.最大正方形-[动态规划(空间优化)].cpp | /*
* @lc app=leetcode.cn id=221 lang=cpp
*
* [221] 最大正方形 [动态规划(空间优化)]
*/
// @lc code=start
class Solution
{
public:
int maximalSquare(vector<vector<char>> &matrix)
{
if (matrix.empty() || matrix[0].empty())
{
return 0;
}
int rows = matrix.size(), cols = matrix[0]... | ALGO | 0.999906 | 6.035213 | {
"github_metadata": {
"branch": "main",
"commit_count": 149,
"repo_created_at": "2025-02-20T04:40:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edea97ccf3... |
505fa2e2-9340-4bdd-b18e-b465fb5f25cc | CPSdrone/CPS | prototypes/CPS [standard]/PID tests drone/programs/first_IMU___PID_tests/PID.ino | //Define Variables we'll be connecting to
double Setpoint[6];//ghost thrust [prob 0]
double Input[6];//error
double Output[6];//thrust
double Stick[6];
//Define the aggressive and conservative Tuning Parameters
double aggKp=0.7, aggKi=0, aggKd=0;
double consKp=0.3, consKi=0, consKd=0;
PID motorPID[]={
PID(&Input[0], &... | ALGO | 0.972881 | 4.325045 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2020-01-14T20:27:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 17,
"forks": 7,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "03dfc4622... |
0e257391-1aa6-452a-bfe9-ce0cc930fa39 | ChachanNaman/DSA | HEAP/3heapify.cpp | #include <iostream>
using namespace std;
class heap
{
public:
int arr[100];
int size;
heap()
{
arr[0] = -1;
size = 0;
}
void insert(int val)
{
size = size + 1;
int index = size;
arr[index] = val;
while (index > 1)
{
int pa... | ALGO | 0.999851 | 4.05778 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2025-02-19T15:51: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": "51a0f9bb8e5... |
375a58d7-e90f-4bfd-aff0-7db040473f19 | Adversarr/ssim | ssim/include/ssim/finite_elements/global_composer.hpp | #pragma once
#include <map>
#include <mathprim/sparse/gather.hpp>
#include "ssim/defines.hpp"
#include "ssim/mesh/basic_mesh.hpp"
namespace ssim::fem {
// Logically, it converts bcoo to csr, by defining a gather operation.
template <typename Scalar, typename Device, index_t PhysicalDim, index_t TopologyDim, index_t D... | ALGO | 0.985792 | 5.954771 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2025-03-12T06:10: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": "4d98444cf8a... |
ef7c655a-07e7-4a9c-bdec-9a137f761aaf | YuTony/coursera_cpp | 3_red_belt/week-6/starter_files2/search_server.cpp | #include "search_server.h"
#include "iterator_range.h"
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
vector<string> SplitIntoWords(const string& line) {
istringstream words_input(line);
return {istream_iterator<string>(words_input), istream_iterator<string>... | WEB | 0.973326 | 5.146783 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-02-29T19:17: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": "2e9a2a8f6a... |
ae7a657f-960f-4fc3-9a42-9efde700f8a6 | prabhxjottsingh/leetcode-practise-problems | Contests/Biweekly Contest 96/2541. Minimum Operations to Make Array Equal II.cpp | // tc: O(n)
// sc: O(n)
class Solution
{
public:
long long minOperations(vector<int> &nums1, vector<int> &nums2, int k)
{
vector<int> newVec;
if (k == 0)
{
if (nums1 == nums2)
return 0;
return -1;
}
int n = nums1.size();
fo... | ALGO | 0.999837 | 5.150792 | {
"github_metadata": {
"branch": "master",
"commit_count": 300,
"repo_created_at": "2021-11-27T09:11:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e6f63da... |
8f0593bb-0982-4593-9200-26ed5e961bab | rcn-ee/ti-opencl | docs/sphinx-doc/source/listings/matmul_arm.cpp | #include <cassert>
#include <cstdlib>
const int DIM = 16;
const int mat_N = DIM;
const int mat_K = DIM;
const int mat_M = DIM;
void mat_mpy(const float *A, const float *B, float *C, int mat_N,
int mat_K, int mat_M)
{
for (int col = 0; col < mat_M; ++col)
for (int row = 0; ro... | ALGO | 0.997421 | 4.788723 | {
"github_metadata": {
"branch": "master",
"commit_count": 955,
"repo_created_at": "2015-06-09T16:47:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a337acb7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.