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 |
|---|---|---|---|---|---|---|---|
2e096135-d8db-46f0-a28e-cb86726075d0 | MarkusMathiasen/xprog | cses/graph_algorithms/building_roads.cpp | #include <bits/stdc++.h>
using namespace std;
#define ii pair<int, int>
int n, m, uf[100000], r[100000];
int find(int i){
if (uf[i] == i) return i;
return uf[i] = find(uf[i]);
}
void merge(int i, int j){
int x = find(i);
int y = find(j);
if (x == y) return;
if (r[x] > r[y])
{uf[y] = ... | ALGO | 0.99998 | 3.574886 | {
"github_metadata": {
"branch": "master",
"commit_count": 216,
"repo_created_at": "2021-10-10T06:17:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7920936c... |
2ee011ac-a15f-400b-8f9d-16e09ff134aa | ArunKarthik05/DSA | string/no of words.cpp | #include <bits/stdc++.h>
using namespace std;
void freq(string str, map<string, int>& m){
// Used for breaking words.
stringstream new_str(str);
// To store individual words.
string Word;
// Reading individual words.
while (new_str >> Word) {
m[Word]++;
}
}
int main() {
... | ALGO | 0.999762 | 4.222739 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2023-08-12T15:53:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6045285b48e9... |
dbcdac84-5a7c-4b6e-ba30-e32243ad8408 | ydb-platform/ydb | contrib/libs/apache/arrow/cpp/src/arrow/compute/exec/key_map.cc | // 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 under the Apache License, Version 2.0 (the
// "License"); you may... | ALGO | 0.998571 | 6.412207 | {
"github_metadata": {
"branch": "main",
"commit_count": 35208,
"repo_created_at": "2022-02-07T14:52:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4512,
"forks": 701,
"issues": 2263,
"pull_requests": 682
},
"file_meta": {
"content_id": ... |
bd584c0e-99c6-4d63-b69c-32f3d6189091 | shawndavidson/ecc-cs-30-project-4 | IceMan/ShortestPathFinder.cpp | #include <queue>
#include <iomanip>
#include "StudentWorld.h"
#include "ShortestPathFinder.h"
// Constructor
ShortestPathFinder::ShortestPathFinder(const StudentWorld* pStudentWorld)
: m_pStudentWorld(pStudentWorld),
m_originX(0),
m_originY(0),
m_distances{UCHAR_MAX}
{
}
// Compute distances from all units to... | ALGO | 0.996674 | 5.865986 | {
"github_metadata": {
"branch": "main",
"commit_count": 138,
"repo_created_at": "2022-05-13T17:07:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "3425f7f074... |
b2f64860-dcd9-4ec4-a811-694e68781c4f | ThoseBygones/ACM_Code | CodeForces/CodeForces 1426C.cpp | /*
********************************************************************************
* Author: ThoseBygones
* Version: V1.0
* Date: 2021-05-11
* Subject: ACM-ICPC
* Language: C/C++14
* OJ: CodeForces
* Algorithm:
********************************************************************************
* Algo-De... | ALGO | 0.999942 | 4.468435 | {
"github_metadata": {
"branch": "master",
"commit_count": 324,
"repo_created_at": "2017-05-12T16:58: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": "c5bd93d3... |
54fbfc21-55f1-4947-aa57-922fd7350825 | Abdallah-elkarmouty/abdallah | SecurePasswordManager.cpp | #include <iostream>
#include <vector>
#include<time.h>
#include <sstream>
#include <string>
#include<fstream>
#include <cstdlib>
using namespace std;
int p = 11, q = 13, n, e, d;
const string filePath = "allPasswords.txt";
struct PasswordInfo{
string owner;
string secureNumber;
string encryptedPassword;
};
vector... | TOOL | 0.94504 | 5.389861 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-23T14:19: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": "3d9639cbf4f8... |
c48cc43a-17d1-48bc-b0bd-7de5d5fe94cc | k7official/data-structures | Midterm practice/array.cpp | #include<iostream>
using namespace std;
int *PostfixPrefixSum(int A[], int B[], int m, int n)
{
int biggest = (m > n ? m : n);
int *C = new int[biggest];
int i, j, k;
i = k = 0;
j = n-1;
while(i<m && j >= 0)
{
C[k++] = A[i++] + B[j--];
}
for(;i<m;i++)
C[k++] = A... | ALGO | 0.999971 | 4.438969 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-11-19T07:37:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f33f1a61df84... |
3a1af69a-0a2b-4ce4-a669-60556ec9f8c0 | SolveGuys/AlgorithmStudy | Problems_Archives/95week/JongWoo/BOJ_16236.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
#include <memory.h>
using namespace std;
struct Shark
{
int x;
int y;
int size;
int cnt;
};
int n;
int board[22][22];
int dx[] = { -1, 1, 0, 0 };
int dy[] = { 0, 0, -1, 1 };
int BFS(Shark& shark);
int main()
{
ios::... | ALGO | 0.999776 | 3.808479 | {
"github_metadata": {
"branch": "master",
"commit_count": 2184,
"repo_created_at": "2021-11-06T03:55:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e57af39d... |
25098d3e-17a5-438b-b938-bc8850c31bf2 | mohammedjasam/Technical-Interview-Guide | LeetCode/leetcode_binary-tree-longest-consecutive-sequence-ii.cpp | /*
*
* Tag: DP
* Time: O(n)
* Space: O(n)
*/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int longestConsecutive(TreeNode* root) {
i... | ALGO | 0.999988 | 5.42035 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2017-04-01T19:15:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 110,
"forks": 34,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "c4f492... |
a39725fb-d305-4bc8-ab6c-cfe186d1f288 | KathLevi/SPOJ_Farida2 | Farida2/Source.cpp | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;
//RECURSIVE
long long recurs(long long, int);
vector<long long> coins;
vector<long long> dp;
int main() {
long long t, m, coin;
//vector<long long> coins;
cin >> t; //t - number of test cases
cin.... | ALGO | 0.999911 | 4.138501 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-11-18T18:34:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "31e3e4e037... |
d632b291-8df3-47e6-b050-78ba8b5b4fc6 | JaidenTGreen/348-Lab-8 | EECS348Lab8/GreenJaidenLab8.cpp | #include <iostream>
#include <fstream>
#include <vector>
using namespace std;
// Function to read matrices A and B from a file and store the size in N
void readMatrixFromFile(const string& filename, vector< vector<int> >& A, vector< vector<int> >& B, int& N) {
ifstream file(filename); // Opens the file using input... | ALGO | 0.99957 | 5.651833 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-04-03T00:01: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": "8407b785cd02... |
9baa6d89-e274-49e6-9bc9-29c0e849d6e4 | ishandutta2007/codeforces-w | weakesttopology/normal/1525/D.cpp | #include "bits/stdc++.h"
using namespace std;
#define endl '\n'
#define debug(x) cerr << #x << " == " << (x) << '\n';
#define all(x) begin(x), end(x)
using ll = long long;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;
template<typename T>
bool chmin(T& x, T y) { return y < x ? (x = y, true) : f... | ALGO | 0.999933 | 4.103144 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:34:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2923b3188568... |
7a556307-03de-4d22-a79f-bfbc6199f368 | ClementChretien/androide-project | androide-project/roborobo3-master/roborobo3/prj/MyOwnProject/src/MyOwnProjectWorldObserver.cpp | /**
* @author <NAME> <<EMAIL>>
*/
#define _USE_MATH_DEFINES
//Variables globales
//Zone de jeu
int zoneCollectMin = 50;
int depotMin = 400;
int depotMax = 450;
int rampeYMin=450;
int rampeYMax=700;
int nestYMin=950;
int nestYMax=1000;
#include <vector>
using namespace std;
#include "MyOwnProject/include/MyOwnProject... | ALGO | 0.964274 | 3.188711 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2019-02-14T12:41: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": "0878bf4e8... |
60af5643-c802-45a0-9e2a-2eace9f1b4fd | TimoBolkart/RobustMultilinearModel | RMM/KDTree3.h | /*************************************************************************************************************************/
// This source is provided for NON-COMMERCIAL RESEARCH PURPOSES only, and is provided “as is” WITHOUT ANY WARRANTY;
// without even the implied warranty of fitness for a particular purpose. The r... | ALGO | 0.994429 | 6.355062 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2020-09-30T12:06:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5497737f7... |
61a14a6f-3c36-4793-bba3-026edb47bbf6 | eat-swap/LeetCodeDaily | cpp/2205/220513-CN.cpp | #include <string>
#include <cstdio>
/**
* 面试题 01.05. One Away LCCI
* There are three types of edits that can be performed on strings: insert a character, remove a character, or replace a character. Given two strings, write a function to check if they are one edit (or zero edits) away.
*/
class Solution {
public:
... | ALGO | 0.998828 | 5.862455 | {
"github_metadata": {
"branch": "master",
"commit_count": 613,
"repo_created_at": "2021-12-25T04:02: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": "f1fe124f... |
cf14faf1-4fa7-4304-969d-4784cc68f195 | betterafter/problem-solving | baekjoon/Greedy/MeetingRoomAssignment.cpp | //
// MeetingRoomAssignment.cpp
// test
//
// Created by 신기열 on 24/05/2019.
// Copyright © 2019 신기열. All rights reserved.
//
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <vector>
#include <iostream>
using namespace std;
bool compare(const pair<int, int>& a, const pair<int, int>& b){
... | ALGO | 0.999977 | 4.16669 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2021-03-09T07:24: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": "f3ff8da9d1... |
8fafff87-396d-46d8-860c-b22a8f459ddd | habiburrahmantalha/UVA-online-Judge | 10791_Minimum_Sum_LCM.cpp | //Problem Type :
//Time : 0.008
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<iostream>
#include<queue>
#include<set>
using namespace std;
#define PI 2 * acos (0.0)
#define N 47000
bool Prime[N+10];
vector <long long> prime;
void... | ALGO | 0.999617 | 3.633781 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-10-08T20:02:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "564befd76e... |
03e47077-eb66-49eb-8369-4b4755c39d8d | whquddn55/Algorithm_BojSolves | 1000/1977.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<typename a, typename b>
ostream& operator<<(ostream& os, const pair<a, b>& pai) {
os << pai.first << ' ' << pai.second;
return os;
}
template<typename a, typename b>
istream& operator>>... | ALGO | 0.999962 | 4.37327 | {
"github_metadata": {
"branch": "master",
"commit_count": 1298,
"repo_created_at": "2021-03-10T14:27: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": "8e45e1f... |
9f0d425d-3747-4a55-9b3b-1089c86c0e88 | dainioska/Laser-Tag-v01 | LASER_TAG_L298_servo_array/LASER_TAG_L298_servo_array.ino | //LASER_TAG_project
//L298_servo_button_array_versija
//2021-10-21 test on board OK
#include <Servo.h>
Servo myservoH;
Servo myservoV;
int positionH = 90; //state variable(servoH)
int positionV = 90; //state variable(servoV)
boolean forward = false; //state variab(servo)
//-------------***Time delay... | TOOL | 0.952353 | 3.590427 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-10-13T06:08: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": "21611476df62... |
00194356-4ed4-4dcd-82d9-3097842d8997 | 13351612331/slam_in_autonomous_driving | src/ch5/kdtree.h | //
// Created by kangyu on 2024/1/13.
//
#ifndef SLAM_IN_AUTONOMOUS_DRIVING_KDTREE_H
#define SLAM_IN_AUTONOMOUS_DRIVING_KDTREE_H
#include "common/eigen_types.h"
#include "common/math_utils.h"
#include "common/point_types.h"
#include <glog/logging.h>
#include <map>
#include <memory>
#include <queue>
#include <vector>
... | ALGO | 0.998116 | 6.464719 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-08-10T13:47: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": "a8be30f0434... |
6c5d0e79-0d74-4940-8fa4-61e88f46ee44 | shihyu/C_and_CPP | CPP/data/深度學習C++/transparency/ch17/stl_example.cc | #include <iostream>
#include <vector> // 使用向量陣列容器與迭代器
#include <algorithm> // 使用排序演算函式
using namespace std ;
// (4) 定義一函式物件類別 : 用以比較兩筆資料的個位數字大小
template <class T>
struct Remainder {
bool operator() ( const T& a , const T& b ) const {
return a%10 > b%10 ;
}
} ;
// (5) 列印容器
te... | ALGO | 0.997322 | 5.288287 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2013-12-04T07:26:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cc6ace1... |
120f71a7-3d66-41c5-b400-7073b9d882ca | lento234/advent-of-code-2020 | day04/src/main.cpp | // Advent of Code: Day 4
// <NAME>
#include <vector>
#include <string>
#include <fmt/ranges.h>
#include "util.h"
uint32_t problem1(People& people)
{
uint32_t n_valid = 0;
for (auto& ipassport: people.passports)
if ( !( ipassport.byr == "" ||
ipassport.iyr == "" ||
ipa... | ALGO | 0.978802 | 5.466557 | {
"github_metadata": {
"branch": "main",
"commit_count": 65,
"repo_created_at": "2020-12-01T20:09:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30a964b3f0f... |
52815f39-e04d-47a1-9e33-591bcb32b2ad | ishandutta2007/codeforces-h | hitonanode/normal/375/E.cpp | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios { fast_ios(){ cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(20); }; } fast_ios_;
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, begin, e... | ALGO | 0.99985 | 4.326974 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T02:01:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ad80730ae6c2... |
d916435a-b511-46fd-9cad-f84c6866eb7c | DucaRii/csgo_weaponid_dumper | csgo_weaponid_dumper/csgo_weaponid_dumper.cpp | #include <Windows.h>
#include <fstream>
#include <iostream>
#include "external/vdf_parser/vdf_parser.h"
using namespace tyti;
#include "external/android_strings/android_strings.h"
int main()
{
std::cout << "Hey! I hope you are having a great day!" << std::endl <<
"I will now try dump the weapon ids for you!" << s... | TOOL | 0.952539 | 3.994642 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2019-05-04T01:22:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 8,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "4b6e4064... |
097cc828-10b3-4864-9952-41948cc119b7 | shiyangdaisy23/tensor-contraction | code/btas/tucker_decomp_btas.cpp | //#include "Eigen/Eigen"
#include "eigensource/eigen-eigen-07105f7124f9/Eigen/Eigen"
#include "btas/tensor.h"
#include "btas/tensor_func.h"
#include "btas/generic/contract.h"
#include <random>
#include <chrono>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <sys/time.h>
using namespace Eigen;
using ... | ALGO | 0.982745 | 3.875299 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-08-11T20:45:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d28bb2560... |
797f3909-3834-4756-b1ce-36873f08994c | ishandutta2007/codeforces-d | duality/normal/1540/C2.cpp | #define DEBUG 0
#include <bits/stdc++.h>
using namespace std;
#if DEBUG
// basic debugging macros
int __i__,__j__;
#define printLine(l) for(__i__=0;__i__<l;__i__++){cout<<"-";}cout<<endl
#define printLine2(l,c) for(__i__=0;__i__<l;__i__++){cout<<c;}cout<<endl
#define printVar(n) cout<<#n<<": "<<n<<endl
#define printA... | ALGO | 0.999923 | 3.939174 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "49c2464e1bcc... |
75a62e7d-a5f5-48d9-947b-0b1536cb6618 | VinInn/ctest | cuda/VertexFinder.cpp | #include<random>
#include<vector>
#include<cstdint>
#include<cmath>
#include "cudaCompat.h"
#include "HistoContainer.h"
#include "VertexFinder.h"
#include<memory>
#include<iostream>
int main() {
auto zt_d = std::make_unique<float[]>(64000);
auto ezt2_d = std::make_unique<float[]>(64000);
auto zv_d = std::m... | ALGO | 0.961736 | 4.414422 | {
"github_metadata": {
"branch": "master",
"commit_count": 1135,
"repo_created_at": "2014-07-06T04:56:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4db1f9... |
b76e84f9-06e5-4414-bfd4-d1f6b3f0ffd9 | AlgoAbrar/Data-Structures-Journey | Z_Binary_Search.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,q;
cin >> n >> q;
int a[n];
for(int i=0;i<n;i++)
{
cin >> a[i];
}
sort(a,a+n);
for(int i=0;i<q;i++)
{
int val;
cin >> val;
int flag = 0;
int l=0;
int r=n-1;
while(... | ALGO | 0.999983 | 4.629171 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2025-01-11T06:00: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": "8721f95c617... |
c6f14261-76a0-400c-8400-d68a8567e6d6 | alexsoll/Queue | Queue/queue.h | //using namespace System::Drawing;
#include <cstdlib>
template <class T>
class TQueue {
int first, last, maxsize, size;
T* arr;
public:
TQueue(int _maxsize = 200) {
maxsize = _maxsize;
arr = new T[maxsize];
first = 1;
last = 0;
size = 0;
}
~TQueue() {
delete[] arr;
}
TQueue(const TQueue& tq) {
... | TOOL | 0.980478 | 3.918472 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2017-11-29T06:47:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8394fae37... |
355d56a9-b7ba-4ebe-b7f2-ad19680a7196 | warelle/RTM-list-based-set | list1.hpp | #include <limits>
#include <immintrin.h>
namespace test{
struct Node{
int value;
Node* next;
Node(int val):value(val),next(nullptr){}
};
struct Window{
Node *prev;
Node *curr;
Node *succ;
bool found;
};
class TSXlist{
private:
Node* head;
Node* tail;
void search(int val, Window* &win);... | TOOL | 0.941745 | 4.131546 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-01-01T14:32:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc938337a9... |
a341db74-c7fe-47cf-a48f-4e8e04e295b1 | IgorPBorja/competitive-programming | problems/Codeforces/Edu160/C.cpp | // #define TESTCASES
// #define DEBUG
#include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>
#define vvi vector<vector<int>>
#define vvb vector<vector<bool>>
#define vvc vector<vector<char>>
#define vvpi vector<vector<pair<int, int>>>
#define pii pair<int,... | ALGO | 0.999731 | 4.335827 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2022-10-21T17:25: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": "1def511e5b5... |
c546397f-d939-4948-abbf-63e13525ab22 | j-nary/my_BOJ | 1541.cpp | //BOJ_1541 잃어버린 괄호 [실버 2]
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
vector<string> v;
bool chk[100];
string cal(string a, string op, string b) {
int aa = stoi(a);
int bb = stoi(b);
if (op == "+") return to_string(aa + bb);
else if (op == "-") return to_string(aa - bb);
}
int m... | ALGO | 0.999995 | 4.365201 | {
"github_metadata": {
"branch": "main",
"commit_count": 291,
"repo_created_at": "2022-07-10T14:46: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": "e60acb17a1... |
0574de29-e049-4e70-8170-8bc2e39183cd | root-project/root | roofit/roofitcore/src/RooRombergIntegrator.cxx | /// \cond ROOFIT_INTERNAL
/*****************************************************************************
* Project: RooFit *
* Package: RooFitCore *
* @(#)root/roofitcore:$Id$
* Authors: ... | ALGO | 0.9997 | 6.46949 | {
"github_metadata": {
"branch": "master",
"commit_count": 93033,
"repo_created_at": "2013-06-27T10:46:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2899,
"forks": 1363,
"issues": 467,
"pull_requests": 269
},
"file_meta": {
"content_id"... |
ac99da29-0e2a-49a7-8c6d-7ec02ff8a0da | ShucunZhao/Leetcode | C++/20Company/13Microsoft_CN/354RussianDollEnvelopes/MemeorizationDFS(TLE).cpp | class Solution {
public:
int ans = 1;
unordered_map<int, int> ms;
class myCmp{
public:
bool const operator()(const vector<int> & a, const vector<int> & b){
if(a[0]==b[0]){
return a[1]<b[1];
}
return a[0]<b[0];
}
};
int backtrack... | ALGO | 0.999989 | 5.546664 | {
"github_metadata": {
"branch": "main",
"commit_count": 1047,
"repo_created_at": "2022-09-27T05:51:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0779d6b6... |
43176ed8-853e-4b63-8e8c-c284580f986d | huynguy97/IP-Week11 | main.2494613792623479310.cpp | #include <iostream>
#include <cassert>
using namespace std;
//
//
//
double power (double x, int n)
{//
assert(n >= 0) ;
//
if (n == 0)
return 1 ;
else
retur... | TEST | 0.999525 | 3.274753 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-05-12T17: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": "9a1c09863c... |
96a69838-adc5-4336-a746-80a133772517 | anshmendpara-13/Competitive_Programming | Searching/sqrt_in_point.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll ct = 0;
ll squareroot(ll n)
{
ll s = 0;
ll e = n;
ll mid = s + (e - s) / 2;
ll ans = -1;
while (s <= e)
{
ll sq = mid * mid;
if (sq == n)
{
return mid;
}
else if (sq < n)... | ALGO | 0.999894 | 4.300021 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-01-03T09:05: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": "9fef27ed01cd... |
1df1a50f-f682-4fb9-8e51-ef7597e0bde3 | abikhameem/lab5_cs142 | quicksort.cpp | //Program to implement quick sort using C++
#include<iostream>
using namespace std;
//function that swaps 2 integers
void swap(int &a,int &b)
{ int temp;
temp = a;
a = b;
b = temp;}
//returns the position of the pivot after placing it in the place it's required to be
//this function puts the pivot where it's suppose... | ALGO | 0.999981 | 5.553414 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-02-10T16:20:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "efeff793b4... |
02e59648-1c04-4aff-bf45-256043c85c73 | zzz332choi/BOJ | 4963.cpp | #include <iostream>
#include <queue>
#define endl '\n'
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
struct POS {
int col, row;
};
int w, h;
cin >> w >> h;
int dc[8] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dr[8] = { 1, -1, 0, 0, 1, -1, 1, -1 };
while (w && h) {
queue<P... | ALGO | 0.999725 | 3.988831 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2023-06-22T14:16:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3621ddcdd... |
f5492261-56a1-45f7-93c5-1de1d7287a19 | arangodb/arangodb | 3rdParty/boost/1.78.0/boost/geometry/algorithms/detail/disjoint/segment_box.hpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2014 <NAME>, Amsterdam, the Netherlands.
// Copyright (c) 2008-2014 <NAME>, Paris, France.
// Copyright (c) 2009-2014 <NAME>, London, UK.
// Copyright (c) 2013-2014 <NAME>, Lodz, Poland.
// This file was modified by Oracle on 2013-2020.
// Mo... | ALGO | 0.999798 | 6.844851 | {
"github_metadata": {
"branch": "devel",
"commit_count": 51986,
"repo_created_at": "2011-10-26T06:42:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13878,
"forks": 857,
"issues": 743,
"pull_requests": 38
},
"file_meta": {
"content_id": ... |
75f200a9-5d82-4549-abc0-b3bded472812 | liaowangh/LeetCode | 230-Kth Smallest Element in a BST.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.999998 | 6.432859 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2019-09-16T12:57: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": "bec3dd889... |
64b2ec75-ec7a-42bb-85a3-2e5e797b055b | Jungbin-Park/Algorithm | 프로그래머스/3/43163. 단어 변환/단어 변환.cpp | #include <string>
#include <vector>
#include <queue>
using namespace std;
bool IsNeighbor(const string& a, const string& b)
{
// 두 단어를 비교하여 하나만 단어가 다른 경우를 찾음
int diff = 0;
for (int i = 0; i < a.size(); ++i)
{
if (a[i] != b[i]) diff++;
if (diff > 1) return false;
}
return true;... | ALGO | 0.99999 | 5.342748 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2025-04-12T12:08: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": "49bc6b18529... |
9b936c38-e078-4e35-888e-411ff2091b17 | Ethan-MoBeau/hsd2019_group1 | v1_result/verify_int8/verify.cpp | #include <cstdio>
#include <cstdlib>
#include "fpga_api.h"
// g++ -I./include main.cpp ./src/fpga_api.cpp -o run.exe && sudo ./run.exe
int main(void)
{
// input vector size M
// output vector size N
// matix size M x N
int M = 16;
int N = 16;
int* flat = new int[M*(N+1)];
int* input = flat;
int* mat = flat +... | ALGO | 0.989029 | 4.712951 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2019-03-14T01:11: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": "ee70b3405... |
d75c92a2-1ee9-4a56-a107-17b9039e04e3 | NVIDIA/tensorflow | tensorflow/contrib/factorization/ops/factorization_ops.cc | // Copyright 2016 The TensorFlow Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required ... | ALGO | 0.995367 | 7.423923 | {
"github_metadata": {
"branch": "r1.15.5+nv23.03",
"commit_count": 64202,
"repo_created_at": "2020-05-13T21:34:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1146,
"forks": 178,
"issues": 41,
"pull_requests": 9
},
"file_meta": {
"conten... |
b3fadd52-a6b4-4a11-bbe6-c823a3c0e504 | MADEAPPS/newton-dynamics | newton-3.14/sdk/dgCore/dgConvexHull3d.cpp | /* Copyright (c) <2003-2019> <<NAME>, Newton Game Dynamics>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* i... | ALGO | 0.999039 | 4.359951 | {
"github_metadata": {
"branch": "master",
"commit_count": 15119,
"repo_created_at": "2014-07-09T11:21:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 991,
"forks": 192,
"issues": 34,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b... |
924c6591-3540-46b8-8e0d-715b77ed40ac | Glorf/morfeusz | morfeusz/fsa/cfsa2_impl.hpp | /*
* File: _vfsa_impl.hpp
* Author: lennyn
*
* Created on October 29, 2013, 9:57 PM
*/
#ifndef _VFSA_IMPL_HPP
#define _VFSA_IMPL_HPP
#include <algorithm>
#include <utility>
#include <iostream>
#include "fsa.hpp"
#include "../utils.hpp"
#include "../deserialization/endianness.hpp"
namespace morfeusz {
static... | ALGO | 0.924753 | 5.239091 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-03-23T10:24: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": "246af222bc... |
0b8f411e-78d7-45b0-b97d-b01599550ec1 | adityajamwal02/LeetcodeProblemSet2 | CombinationSumGFG.cpp | /*
Given an array of integers and a sum B, find all unique combinations in the array where the sum is equal to B. The same number may be chosen from the array any number of times to make B.
Note:
1. All numbers will be positive integers.
2. Elements in a combination (a1, a2, …, ak) must be in non-desce... | ALGO | 0.999995 | 5.436123 | {
"github_metadata": {
"branch": "main",
"commit_count": 335,
"repo_created_at": "2023-05-07T06:18: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": "60be94ac71... |
9fe77747-d120-417e-8ee5-60475433eeb0 | Hardik2972/2K22-CO-189_hardik_garg_DS | Exp48_lca_tree/code.cpp | #include <iostream>
// Definition for a binary tree node.
struct TreeNode {
int val;
TreeNode* left;
TreeNode* right;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
};
TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) {
if (root == nullptr) return nullptr;
... | ALGO | 0.999982 | 7.363066 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-10-25T16:39: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": "9d1b73d2c3... |
16690f98-46a0-463f-b898-3cfbf1278c65 | CompuCell3D/CompuCell3D | CompuCell3D/core/ViennaCL/viennacl/linalg/mixed_precision_cg.hpp | #ifndef VIENNACL_LINALG_MIXED_PRECISION_CG_HPP_
#define VIENNACL_LINALG_MIXED_PRECISION_CG_HPP_
/* =========================================================================
Copyright (c) 2010-2012, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
... | ALGO | 0.996691 | 6.174625 | {
"github_metadata": {
"branch": "master",
"commit_count": 3449,
"repo_created_at": "2013-08-20T20:53:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 70,
"forks": 44,
"issues": 202,
"pull_requests": 3
},
"file_meta": {
"content_id": "14c... |
1e8f6337-fd90-49d7-8386-f281d6f87f94 | rjenez/W266-final-project | data/programming-homework-dataset-plagiarism-detection/src/B2016/Z1/Z3/student3701.cpp | /*B 2016/2017, Zadaća 1, Zadatak 3
NAPOMENA: ulaz/izlaz za zadatke je specificiran
javnim autotestovima. Zalbe za ne analiziranje testova
se ne uvazavaju!
NAPOMENA: nece svi (javni) testovi sa zamgera biti
dostupni na c9.
*/
#include <iostream>
#include <vector>
typedef std::vector<std::vector<double>> Mat... | ALGO | 0.999371 | 4.94259 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2022-02-09T00:45:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5a3d05a6e6... |
3c190794-3ce2-42a0-92c8-f9650bfe56bb | XuhuaHuang/EmbeddedProgramming | Lambda/lambda_typed_min_max.cpp | /**
* @file lambda_typed_min_max.cpp
* @author <NAME>
* @brief
* @version 0.1
* @date 2023-06-11
*
* @copyright Copyright (c) 2023
*
*/
#include <iostream>
#include <stdfloat>
#include <type_traits>
template <auto Func, typename... Ts>
constexpr auto min_max(std::tuple<Ts...>&& tuple) -> std::tuple<size_t, s... | ALGO | 0.978782 | 6.598964 | {
"github_metadata": {
"branch": "develop",
"commit_count": 1832,
"repo_created_at": "2020-09-16T02:02:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f0715e... |
bdcf6d07-a621-4b8c-9ae4-a33ea62c5230 | cgogn/CGoGN | CGoGN/include/Topology/hypermap/hypermap2.hpp | /*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg ... | TOOL | 0.995971 | 4.993205 | {
"github_metadata": {
"branch": "master",
"commit_count": 3008,
"repo_created_at": "2012-03-09T11:43:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 48,
"forks": 20,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "36b6d6... |
31e94014-acb5-49d3-bbfb-51a2c25214c1 | chensongyu0402/GPE-training | Digit_Primes.cpp | /*
Keyword: None
source1(answer): https://knightzone.studio/2019/04/21/4319/uva%EF%BC%9A10533%EF%BC%8Ddigit-primes/
*/
#include<stdlib.h>
#include<iostream>
#include<vector>
using namespace std;
struct Number{
bool isComposite;
int total; // total Digit Prime Count to this number
};
int bitSum(int num... | ALGO | 0.999732 | 4.375359 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2022-09-23T05:13:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea0611de085... |
e358e006-025e-4d59-afa3-d4d815c4ec69 | dconeybe/llll | llll.cc | #include <atomic>
#include <iostream>
#include <latch>
#include <mutex>
#include <thread>
#include <vector>
// A node in the linked list.
struct node {
unsigned value;
std::atomic<node*> next;
};
// The head of the linked list.
constinit node head = { .next = nullptr };
// Append the given value to the linked li... | TOOL | 0.917123 | 6.159039 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-02-14T22:30: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": "5300aa484b7... |
c2b6dd85-0325-4428-b590-e7e7baa8006c | corner0530/atcoder | ABC/147/a.cpp | #include <iostream>
#include <vector>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep1(i, n) for (ll i = 1; i < n; i++)
#define rrep(i, n) for (ll i = n - 1; i >= 0; i--)
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define Yes cout << "Yes" << e... | ALGO | 0.99935 | 3.285493 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2022-08-16T22:02: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": "db22c980b92... |
cf066786-9d3d-45b1-830b-a768ddaec546 | Denver44/CP-and-DSA-in-CPP | CPP_Tutorials/5Array/2DynamicArray.cpp | #include <iostream>
using namespace std;
void creatingDynamic2DArray(int n)
{
int **arr = new int *[n];
for (int i = 0; i < n; i++)
{
arr[i] = new int[n];
for (int j = 0; j < n; j++)
{
arr[i][j] = input[i][j];
}
}
for (int i = 0; i < n; i++)
{
... | TOOL | 0.976979 | 3.638322 | {
"github_metadata": {
"branch": "master",
"commit_count": 329,
"repo_created_at": "2020-09-19T19:53:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65385c01... |
13139152-75dc-442a-aa92-7cec2d646714 | melanie1512/bd-proyecto-1 | tecnicas/AVL/main.cpp |
#include "AVL.h"
#include "Record.h"
#include <fstream>
#include <iostream>
#include <vector>
#include <nlohmann/json.hpp>
#include "httplib.h"
using namespace std;
using json = nlohmann::json;
using namespace httplib;
//cambiar direccion al ejecutar!!!
const string DIR = "/Users/paolamaguinaaranda/Documents/2024-I/B... | DATA | 0.969226 | 4.398207 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2024-05-03T22:41:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "b7eb903581f... |
4ea81bcb-69fa-4895-9032-3c9905e465ae | RenovationIGuess/Algorithm | TRR/QuayluiDequy/Bai6.cpp | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int t;
int a[100][100];
vector<string> res;
int visit[100][100];
bool check;
void Cin()
{
cin >> t;
for(int i = 0; i < t; ++i) {
for(int j = 0; j < t; ++j) {
cin >> a[i][j];
visit[i][j] = 0;
}
}
res.clear();
... | ALGO | 0.999923 | 4.568982 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-12-28T06:01:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c8f6bf21ef... |
5eabd7b3-d3ce-4a55-a11a-127a32a17e29 | MaleekNoob/PF | PF-Assignments/TA-Assign-2_Sol/q6.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
int month, day;
string season;
cout<<"Enter the month : ";
cin>>month;
cout<<"Enter the day : ";
cin>>day;
if (month <= 3 || month == 12) {
if (month == 12) {
if (day >= 16) {
season = "Winter";
}
else {
season =... | ALGO | 0.99878 | 4.399647 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-05-19T07:26: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": "a069ade6abcf... |
46c09834-e007-4fd5-a924-3e6bad5a4cec | RainerKuemmerle/g2o | g2o/types/slam3d/isometry3d_mappings.cpp | // g2o - General Graph Optimization
// Copyright (C) 2011 <NAME>, <NAME>, <NAME>, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain t... | ALGO | 0.900137 | 5.95032 | {
"github_metadata": {
"branch": "master",
"commit_count": 1617,
"repo_created_at": "2012-01-12T10:18:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3276,
"forks": 1126,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "3... |
61e1ee7a-d0b0-4db9-8484-4f8d4098f250 | baojinchang/PAT | Stack.cpp | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
int n;
cin >> n;
int *stack = new int[n];
int top = 0;
for (int i = 0; i < n; i++)
{
string temp;
cin >> temp;
if (temp=="Pop")
{
... | ALGO | 0.9998 | 4.154584 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-04-20T05:32: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": "b3077ec205... |
2cdef914-bc9f-41dc-a0d5-535db7b9b9eb | zzzz955/Algorithm_Solved | C++/SWEA/D4/1494. 사랑의 카운슬러/사랑의 카운슬러.cpp | #include<iostream>
#define ll long long
using namespace std;
int tc, n, Move, Stay;
ll ans;
struct Pos {
int x, y;
};
Pos pos[21];
void init() {
ans = 9e15;
Move = 0;
Stay = 0;
}
void input() {
cin >> n;
for (int i = 0; i < n; i++) cin >> pos[i].x >> pos[i].y;
}
void dfs(int level, ll sumX, ll sumY) {
if (... | ALGO | 0.99975 | 4.416421 | {
"github_metadata": {
"branch": "main",
"commit_count": 1236,
"repo_created_at": "2024-07-11T13:55:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a50f5dc35... |
9a5f8fbc-f306-4b61-b0a8-2bff91b52241 | MegEngine/MegEngine | dnn/src/fallback/conv_bias/gi/fp32/strategy_f23_mk4_nchw44.cpp | #include "src/common/unroll_macro.h"
#include "src/common/utils.h"
#include "src/fallback/conv_bias/gi/fp32/strategy.h"
#include "src/fallback/conv_bias/winograd/winograd.h"
#include "src/fallback/conv_bias/gi/fp32/helper.h"
#include "src/fallback/elemwise_helper/op_unary.h"
#include "src/naive/matrix_mul/matrix_mul_h... | ALGO | 0.960433 | 5.475419 | {
"github_metadata": {
"branch": "master",
"commit_count": 3305,
"repo_created_at": "2020-03-18T08:21:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4802,
"forks": 546,
"issues": 169,
"pull_requests": 1
},
"file_meta": {
"content_id": "5... |
4ce780ea-a14d-4829-9af5-ff28e78ce9a2 | The-SP/IOE-Lab-Programs | Numerical Methods/Lab 6/polynomial_curve_fitting.cpp | // Least square method of curve fitting: Polynomial Equation
#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n, d;
cout << "Enter no of data and degree of polynomial? ";
cin >> n >> d;
if (n < d) {
cout << "Insufficient no of data";
exit(1);... | ALGO | 0.999517 | 3.8803 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2021-12-02T17:49:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "279923d3f7... |
11294513-767f-48b1-9898-936d313d9ffc | choijaewon323/PS | 백준/Silver/1149. RGB거리/RGB거리.cc | #include <iostream>
#include <algorithm>
using namespace std;
#define RED 0
#define GREEN 1
#define BLUE 2
#define HOUSE_MAX 1000
#define NUMBER_OF_COLOR 3
#define INF 1000000000
int N;
int cost[HOUSE_MAX][NUMBER_OF_COLOR];
int dp[NUMBER_OF_COLOR][HOUSE_MAX];
void input() {
cin >> N;
for (int i = 0; i < N; i++)... | ALGO | 0.999376 | 4.225362 | {
"github_metadata": {
"branch": "master",
"commit_count": 829,
"repo_created_at": "2021-09-04T02:57: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": "a160c768... |
c8d5f580-26c6-4ba8-8769-f728d7f97ca0 | NgTienHungg/PTIT-Source | CodePTIT - DSA/DSA06032 - BỘ BA SỐ CÓ TỔNG NHỎ HƠN K.cpp | // https://code.ptit.edu.vn/student/question/DSA06032
// BỘ BA SỐ CÓ TỔNG NHỎ HƠN K
#include <bits/stdc++.h>
using namespace std;
void testCase() {
int n, k;
cin >> n >> k;
long long a[5000], ans = 0;
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
sort(a, a + n);
for (int i = 0; i < ... | ALGO | 0.999937 | 5.155401 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2021-07-04T02:14:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 130,
"forks": 36,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4db04f... |
bbd64f6f-b50f-491a-890b-6cfc1c42c9f7 | tars0x9752/atcoder | b/arc80.cpp | #include <bits/stdc++.h>
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(false);
int h, w;
cin >> h >> w;
int n;
cin >> n;
priority_queue<P> pq;
... | ALGO | 0.999997 | 3.967621 | {
"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": "28aa87f1... |
8e107c62-a489-4bd1-ab24-14b5e8f5e16c | Nethajioslo/Recusrion | stack.cpp | #include <iostream>
#define STACK_SIZE 4096
#define SIZE sizeof(int)
class stack
{
private:
int *ptr;
int size;
public:
stack();
~stack();
void fill_stack(int data);
bool is_stack_full();
void empty_stack();
void display_stack();
bool is_empty();
};
stack::stack()
{
ptr = new ... | ALGO | 0.963781 | 4.479276 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-07-06T17:52: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": "f2a7032e761a... |
95392b18-72ed-4328-b61a-a3b84cee4307 | ry3s/atcoder | abc148/e.cpp | #include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <iterator>
#define loop(i, a, b) for(int i = (int)(a); i < (int)(b); i++)
#define... | ALGO | 0.999983 | 3.757338 | {
"github_metadata": {
"branch": "master",
"commit_count": 158,
"repo_created_at": "2019-05-09T15:41:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d0e667f1... |
83d74fb5-d2c4-428c-9a2b-e921f1ea0090 | zackmarks/ClassAssignments | kittenInTree.cpp | #include <vector>
#include <iostream>
#include <unordered_map>
using namespace std;
struct branch{
int id;
vector<int> neighbors;
};
// bool contains(int n, vector<int>& v){
// for(int i : v){
// if(i == n)
// return true;
// }
// return false;
// }
bool branchContains(int n, branch b){
for(int i : b.ne... | ALGO | 0.999922 | 3.840986 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-11-25T08:04: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": "6d806b02dea7... |
78e59d96-2e91-4d69-ab37-8a0d32816e97 | nachiketkanore/Codeforces-Solved-Problems | 1353_D.cpp | #include <bits/stdc++.h>
using namespace std;
#define sz(x) (int)(x.size())
#define int long long
const int N = 2e5 + 5, inf = 1e18, mod = 1e9 + 7;
int val[N + 2];
int n;
void solve();
set<array<int,3>> chk;
void go(int l, int r){
if(l > r)
return;
chk.insert({r - l + 1, l, r});
int mid = (l ... | ALGO | 0.999816 | 3.725134 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-06-03T14:49: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": "fd8b2878b5... |
b94d03ef-08e4-4ac4-880d-305ec77aadda | Victor-Gabriel-Barbosa/Beecrowd | Paradigmas/2246.cpp | #include <bits/stdc++.h>
using namespace std;
// Verifica se é possível formar o valor exato com as moedas disponíveis
bool trocoEhPreciso(vector<long>& moedas, long valor) {
vector<bool> mPD((valor + 1), false);
mPD[0] = true;
// Preenche o vetor mPD com as combinações possíveis de moedas
for (auto moeda : m... | ALGO | 0.999664 | 4.105756 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-04-05T18:03:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec8451aca0b... |
9d574803-5caf-4922-9fbd-ad333ecc9243 | f4alt/TAMU-Classes | CSCE430/LAB06/F.cpp | #include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
// F
int main() {
int players, queries, player1, player2;
string move1, move2;
while (true) {
cin >> players;
int wins[players] = {0};
int losses[players] = {0};
... | ALGO | 0.999144 | 4.381625 | {
"github_metadata": {
"branch": "main",
"commit_count": 405,
"repo_created_at": "2022-08-13T18:40: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": "ab4ce13fef... |
9a1ff9fc-2ccd-4b9c-963c-845176bacca8 | waleed2812/CUI | Assembly/Cache-Simulator-master/C++/c++.cpp | #include <iostream>
using namespace std;
#include <string>
int power(int x,int y){
int ans = 1;
for(int i = 0 ; i<y ;i++){
ans *= x;
}
return ans;
}
class Block {
private: bool validBit;
private: int tag;
private: string data;
public:
Block(){}
Block(bool validB... | ALGO | 0.952524 | 3.905367 | {
"github_metadata": {
"branch": "main",
"commit_count": 151,
"repo_created_at": "2021-03-27T09:54:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9bf897f881... |
0f652e90-486b-4bd9-bf5b-abe9bc94ef65 | hossaintaufiq/DSA-With-Cpp | sorting_array.cpp | // #include<bits/stdc++.h>
// // #include<vector>
// using namespace std;
// int main(){
// int n;
// cin>>n;
// vector<int>a(n);
// int a[n];
// for(int i=0;i<n; i++){
// cin>>a[i];
// }
// sort(a,a+n);
// for(int i=0;i<n; i++){
// cout<<a[i]<<" ";
// }
// cout<<endl;
// sort(a,a+n,greater<int... | ALGO | 0.999902 | 4.538829 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2023-10-18T05:48:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "41737d37cab... |
3a07c0dc-cd34-467f-b204-f82deb3c4a44 | ICraZZyBoY/Algorithms-Trainings | LYCEUM (contests, homework, etc.)/homeworks/10.03QUEUE/virus.cp.cpp | #include <bits/stdc++.h>
using namespace std;
pair <int, int> p[4]= { {1,0}, {-1,0}, {0,1}, {0,-1} };
queue <pair <int, int> > q;
int a[105][105];
pair <int, int> v[10000];
int main()
{
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
int n, m, k, kk=1, x1, y1, x2, y2, xx, yy, maxx=0;... | ALGO | 0.999942 | 3.332706 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-01-13T11:40:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4df813abd4ec... |
4a179d17-dcb1-49fd-8ad7-9bbb984ab2c3 | neilvillamizar/CPcodes | LineSweep.cpp | #include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
using namespace std;
#define pb push_back
#define ri(x) scanf("%d",&x)
#define rii(x,y) ri(x),ri(y)
#define ms(obj,val) memset(obj,val,sizeof(obj))
#define ms2(obj,val,sz) mem... | ALGO | 0.999889 | 3.653802 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2018-07-21T21:47:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d4105a8b... |
62fed3d4-e16f-407f-80b1-5d2ad68e0c77 | ishandutta2007/codeforces-s | sky3141/normal/1764/D.cpp | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 5000 + 9;
// #define int LL
int mod;
LL fac[N];
LL facinv[N];
LL qpow(LL a, LL b)
{
LL res = 1;
while (b)
{
if (b & 1)
res = res * a % mod;
a = a * a % mod;
b >>= 1;
}
retu... | ALGO | 0.999932 | 4.640961 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07: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": "43908ae2e6f8... |
27a7a790-8987-4edc-bf8c-06f0cc5f3b64 | claytonjwong/leetcode | 1604_alert_same_name_3_times_per_hour/main.cpp | /*
* 1604. Alert Using Same Key-Card Three or More Times in a One Hour Period
*
* Q: https://leetcode.com/problems/alert-using-same-key-card-three-or-more-times-in-a-one-hour-period/
* A: https://leetcode.com/problems/alert-using-same-key-card-three-or-more-times-in-a-one-hour-period/discuss/876799/Javascript-Pytho... | ALGO | 0.996892 | 4.849507 | {
"github_metadata": {
"branch": "master",
"commit_count": 892,
"repo_created_at": "2018-12-28T22:57:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "26a84df3... |
15482726-7478-4aa0-b353-3ad34e9c110f | Ttigone/StuCpp | src/likou/66.cpp | #include "../../include/likou/66.h"
#define FITST
#define SECOND
#ifdef FITST
#include <cmath>
#include <iostream>
#include <utility>
#endif
#ifdef SECOND
#endif
std::vector<int> Solution::plusOne(std::vector<int> &digits) {
#ifdef FIRST
// Extract the number from each position of vec, increment it,
// the... | ALGO | 0.999584 | 5.844507 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2023-01-06T02:58:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "05ea08459... |
b0f86a97-cd70-47c4-8519-5ea638c7c686 | shaidmeheraj/Competitive-Programming-Topics | Data Structure/Sorting/MergeSort.cpp | #include <bits/stdc++.h>
using namespace std;
void merge(int arr[], int left, int mid, int right)
{
int n1 = mid - left + 1;
int n2 = right - mid;
int leftArr[n1], rightArr[n2];
for (int i = 0; i < n1; i++)
{
leftArr[i] = arr[left + i];
}
for (int i = 0; i < n2; i++)
{
... | ALGO | 0.999963 | 5.913385 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-09-08T20:14:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e92347b13d9... |
33435acd-8c3a-4158-848a-6f793302467b | Woog222/BOJ-PS | 백준/Silver/16945. 매직 스퀘어로 변경하기/매직 스퀘어로 변경하기.cc | #include <iostream>
#include <vector>
#include <algorithm>
#include <tuple>
#include <queue>
#include <cstring>
#include <cmath>
#include <iomanip>
#include <list>
#include <stack>
#include <assert.h>
#include <string>
#include <map>
#include <set>
#include <iterator>
#include <cstdlib>
#include <ctime>
#include <climi... | ALGO | 0.999983 | 4.007345 | {
"github_metadata": {
"branch": "main",
"commit_count": 373,
"repo_created_at": "2022-06-11T11:41: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": "29ee8e9be8... |
34b84179-ac66-455d-84df-ffb1a121e46e | tupieurods/SportProgramming | CR173/CR173E/main.cpp | #include <stdio.h>
using namespace std;
__int64 max(__int64 a, __int64 b)
{
return a > b ? a : b;
}
int main()
{
int n;
scanf("%d", &n);
__int64* data = new __int64[n];
__int64* a = new __int64[n];
__int64* b = new __int64[n];
b[n - 1] = 0;
scanf("%I64d", &data[0]);
a[0] = data[0];
for(int i = 1;... | ALGO | 0.999997 | 3.692262 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2014-01-10T11:56:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1bd7699a0... |
3223e2df-3f96-483b-8b71-f80fa2590f64 | 3DPIT/algorithmTest | Algorithm(2020.07.13)/swTestFinal/swTestFinal/swTestFinal/15685 드래곤 커브.cpp | #include<stdio.h>
#include<iostream>
#include<string>
#include<string.h>
#include<vector>
using namespace std;
#define MAP_SIZE 101
int N;
int map[MAP_SIZE+4][MAP_SIZE+4];
int dy[] = { 0,-1,0,1 };
int dx[] = { 1,0,-1,0 };
struct Data {
int y, x, dir, age;
};
void print(string name, int idx, vector<int> &dragonDir) {
... | ALGO | 0.999568 | 4.04771 | {
"github_metadata": {
"branch": "master",
"commit_count": 219,
"repo_created_at": "2019-11-07T10:44: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": "2d9db50a... |
e8f5539b-d621-4fa5-b787-9e1fc0151e64 | yueyangw/UMANS-with-SPH | src/Engine/core/worldInfinite.cpp | /* UMANS: Unified Microscopic Agent Navigation Simulator
** MIT License
** Copyright (C) 2018-2020 Inria Rennes Bretagne Atlantique - Rainbow - <NAME>
**
** Permission is hereby granted, free of charge, to any person obtaining
** a copy of this software and associated documentation files (the
** "Software"), to deal i... | ALGO | 0.972752 | 5.959396 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-11-01T09:31: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": "0645c1b1ed89... |
6e924db8-e867-452a-855b-dd9fc695d3bc | imuncle/TSCM_Calib | TS.cpp | #include "TS.h"
TripleSphereCamera::TripleSphereCamera()
{
has_init_guess_ = false;
cx_ = 0;
cy_ = 0;
fx_ = 0;
fy_ = 0;
xi_ = 0;
alpha_ = 0;
lamda_ = 0;
b_ = c_ = 0;
intrinsic_.resize(9);
}
TripleSphereCamera::TripleSphereCamera(double fx, double fy, double cx, double cy, doubl... | ALGO | 0.996046 | 4.91685 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2021-09-12T01:53:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 36,
"forks": 7,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "62bf6e44d5... |
9adb8e21-5e1e-4b0a-b03f-289949f89803 | milliax/oop | lab8/BinarySearchTree.cpp | #include "BinarySearchTree.h"
TreeNode* BinarySearchTree::getRoot() { return this->root; }
void BinarySearchTree::insert(TreeNode* node) {
// Insert the node to the binary search tree
// if the tree is empty, the node will be the root
if (root == nullptr) {
root = node;
return;
}
... | ALGO | 0.999089 | 4.214495 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2024-02-29T11:26:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3128de35... |
c3d772b4-95f6-42a8-812e-aac024c8cbd1 | yanovsk/data-abstraction-and-structures | doubly linked list/main.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cctype> // toupper()
#include "LinkedListADT.h"
#include "College.h"
using namespace std;
void buildList(const string &filename, LinkedList<College> &list);
void deleteManager(LinkedList<College> &list);
void searchManager(const... | TOOL | 0.977399 | 3.643917 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-05-09T22:41:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa2c8ee850b2... |
692e8178-e0d6-4712-8b71-bb3f5cf4b214 | NitinMadhukar/competitive-programming | CF_716_Div2/A.cpp | /* <NAME> */
#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define big(x) greater<x>()
#define sp fix... | ALGO | 0.999651 | 4.148107 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2021-06-10T05:02: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": "ab3e16b9e12... |
10d8f100-ff48-4f89-96a3-237cf346348e | ishandutta2007/codeforces-s | sergeyrogulenko/normal/429/E.cpp | #pragma comment(linker, "/STACK:60000000")
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <ctime>
#include <cstring>
#include <cassert>
#include <sstream>
#include <iomanip>
#include ... | ALGO | 0.999797 | 3.671901 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07: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": "88f7dc91d800... |
c4960d54-c41a-484c-90f1-003a958399ce | rampalyadav0001/Dsa-Question | dp/longest_increasing_subsequence.cpp | https://leetcode.com/problems/longest-increasing-subsequence/description/
300. Longest Increasing Subsequence
Medium
18.8K
355
Companies
Given an integer array nums, return the length of the longest strictly increasing
subsequence
.
Example 1:
Input: nums = [10,9,2,5,3,7,101,18]
Output: 4
Explanation: The longe... | ALGO | 0.999988 | 6.239387 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2023-08-01T10:29: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": "3b16b79a1... |
19ea662e-ae36-4fbb-bc96-c700727938ef | anishgajera/CPlusPlus | Print_Prime_Numbers.cpp | /*
* Author: <NAME>
* Course: CS 1336.010
* Date: 11/11/2020
* Assignment: Lecture Homework 8, Excercise 1
* Compiler: Xcode
*/
/*
* Description: This program asks the user to enter in a number which ranges from 1 to 100,
* and after the user inputs the number, prime numbers are printed out bas... | ALGO | 0.990009 | 4.527501 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2022-04-19T20:04: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": "a11b124c5eb... |
1cc40cdd-02bb-46a8-852b-5b16d8a93a6f | mohduzaif/Data-Structure-Daily-Challenge | reverseKGroup.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 {
void reverse(ListNode*& ... | ALGO | 0.999989 | 5.789678 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2022-10-14T17:57: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": "cc45a4c0c7d... |
36d5bd41-ead2-4451-a96f-8e8a5710e946 | fura2/competitive-programming-codes | atcoder/abc/157/f.cpp | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
using Real=double;
constexpr Real EPS=1e-8;
constexpr Real PI=acos(Real(-1));
int sgn(const Real& x){ return x>EPS?1:x<-EPS?-1:0; }
class point{
public:
Real x,y;
point(){}
point(const Real& x,const Real& y):x(x),y(y){}
poin... | ALGO | 0.999853 | 4.096969 | {
"github_metadata": {
"branch": "main",
"commit_count": 225,
"repo_created_at": "2021-05-05T15:14: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": "3ea1a81832... |
84b941d8-05ff-4002-9674-8b0e5d508f89 | MingRuey/leetcode-practice | questions-tree/124.binary-tree-maximum-path-sum_byDFS.cpp | /*
* @lc app=leetcode id=124 lang=cpp
*
* [124] Binary Tree Maximum Path Sum
*
* https://leetcode.com/problems/binary-tree-maximum-path-sum/description/
*
* algorithms
* Hard (35.11%)
* Likes: 5515
* Dislikes: 385
* Total Accepted: 495.4K
* Total Submissions: 1.4M
* Testcase Example: '[1,2,3]'
*
*... | ALGO | 0.999972 | 6.586787 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-06-19T20:48: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": "9059eab3916a... |
ccb7b7bb-8d9f-4fa0-8832-467af4ea61e9 | lld2006/my-c---practice-project | 166/166.old.cpp | #include "../lib/tools.h"
#include <cassert>
#include <cstdio>
int gsize = 4;
int searchGrid(const int total, const vector<int> grid, const vector<int> vflag, const int nset){
if(nset == 16) {
for(int row = 0; row < gsize; ++row){
int gs = 0;
for(int col = 0; col < gsize; ++col){
... | ALGO | 0.998993 | 4.083992 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2011-11-04T04:05: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": "df4031c27... |
1dedd0c9-535b-456b-8963-6a4ba3b96894 | StevenL2017/Codeforces | problem/archive/1614/1614D2.cpp | #include <iostream>
#include <cstdio>
#include <climits>
#include <cmath>
#include <cstring>
#include <string>
#include <array>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <algorithm>
#include <functional>
using namesp... | ALGO | 0.999926 | 4.322787 | {
"github_metadata": {
"branch": "master",
"commit_count": 1534,
"repo_created_at": "2022-09-26T06:10:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a265b1d... |
792ae213-6c11-4072-95ac-78ab6c00c884 | AIkikaze/Cplusplus-playground | DataStructure/project_tree/demo3.cpp | /*
* author: wenwenziy
* last edited: 2021-11-12
* title: 类封装的平衡树实现
*/
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <stack>
using namespace std;
template <typename T> class Tree;
#define TNode Treenode<T>
template <typename T>
class Treenode {
private:
int _height;
T key;
TNode *lson, *... | ALGO | 0.999942 | 4.590437 | {
"github_metadata": {
"branch": "main",
"commit_count": 97,
"repo_created_at": "2021-06-22T12:09:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "148cc9f9031... |
091a63ad-b451-4249-b09e-61c1e5d1ab58 | ishandutta2007/codeforces-f | frame233/normal/1280/C.cpp | // Author -- Frame
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<iostream>
#define lowbit(x) ((x)&(-x))
#define Finline __inline__ __attribute__ ((always_inline))
#define DEBUG printf("Running on Line %d in Function %s\n",__LINE__,__FUNCTION__)
... | ALGO | 0.999614 | 3.435365 | {
"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": "052c73cb8e60... |
85758271-b057-4583-b178-4919c0c52fb2 | wyrover/book-code | The C++ Standard Library - A Tutorial and Reference/algo/bounds1.cpp | /* The following code example is taken from the book
* "The C++ Standard Library - A Tutorial and Reference"
* by <NAME>, Addison-Wesley, 1999
*
* (C) Copyright <NAME> 1999.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* T... | ALGO | 0.999849 | 5.251635 | {
"github_metadata": {
"branch": "master",
"commit_count": 192,
"repo_created_at": "2016-07-24T07:29:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 388,
"forks": 248,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0bef... |
3925ae1c-08b3-47ae-9868-953ce41bf7ec | MegEngine/MegEngine | dnn/src/arm_common/conv_bias/f16/strategy_4x5.cpp | #include "src/arm_common/conv_bias/f16/helper.h"
#include "src/arm_common/conv_bias/f16/strategy.h"
#include "src/arm_common/elemwise_helper/op_unary.h"
#include "src/arm_common/simd_macro/marm_neon.h"
#include "src/arm_common/utils.h"
#include "src/common/unroll_macro.h"
#include "src/common/utils.h"
#include "src/fal... | ALGO | 0.999578 | 5.239455 | {
"github_metadata": {
"branch": "master",
"commit_count": 3305,
"repo_created_at": "2020-03-18T08:21:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4802,
"forks": 546,
"issues": 169,
"pull_requests": 1
},
"file_meta": {
"content_id": "c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.