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 |
|---|---|---|---|---|---|---|---|
6183b04e-5699-4873-bae5-2c8134a67d81 | CERN-PH-CMG/cmg-cmssw | L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2DemuxSumsAlgoFirmwareImp1.cc | ///
/// \class l1t::Stage2Layer2SumsAlgorithmFirmwareImp1
///
/// \author:
///
/// Description:
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxSumsAlgoFirmware.h"
#include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h"
#include <vector... | DATA | 0.930132 | 5.262894 | {
"github_metadata": {
"branch": "heppy_94X_dev",
"commit_count": 185721,
"repo_created_at": "2013-09-25T08:23:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 19,
"forks": 242,
"issues": 16,
"pull_requests": 1
},
"file_meta": {
"content_i... |
00b132e0-735f-45c7-a217-85d32b5a51a3 | pengsida/cm | cm_gj_elimination.h | //
// cm_gj_elimination.h
// opencv
//
// Created by pengsida on 2017/10/10.
// Copyright © 2017年 pengsida. All rights reserved.
//
#ifndef cm_gj_elimination_h
#define cm_gj_elimination_h
#include <cmath>
#include "cm_vec_mat.h"
#include "cm_manipulation.h"
namespace cm {
class gj_elimin {
private:
... | ALGO | 0.999796 | 4.568075 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-10-13T01:07: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": "6dcc33d22e... |
2afc5dde-7787-4a7b-8129-941a1a98288c | Amonsuzuki/atcoder | abc/abc289/d/main.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
ll n, m, x;
cin >> n;
vector<int> a(n);
for (auto &i : a)
cin >> i;
cin >> m;
vector<int> b(m);
for (auto &i : b)
cin >> i;
cin >> x;
vector<int> available(x + 1, 1);
for ... | ALGO | 0.999996 | 3.894483 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2024-11-25T08:18: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": "3e1a9e02128... |
9316b04e-a8d1-4714-8d79-f5be2fd3af84 | PG2001/Advent-of-Code | 2023/Day7.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <math.h>
#include <vector>
#include <set>
#include <algorithm>
#include <map>
#define FIVE 7
#define FOUR 6
#define FULL 5
#define THREE 4
#define TWO_PAIR 3
#define PAIR 2
#define HIGH 1
using namespace std;
class Hand {
public:
... | ALGO | 0.99934 | 4.765286 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-12-02T22:57: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": "e7ef2a64ad6... |
f338697d-21a4-4379-bfd6-2574bbde3d74 | opencv/opencv | modules/objdetect/src/aruco/charuco_detector.cpp | // This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
#include "../precomp.hpp"
#include <opencv2/calib3d.hpp>
#include <opencv2/core/utils/logger.hpp>
#include "opencv2/objdetect... | ALGO | 0.99263 | 6.690699 | {
"github_metadata": {
"branch": "4.x",
"commit_count": 35401,
"repo_created_at": "2012-07-19T09:40:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 83079,
"forks": 56217,
"issues": 2595,
"pull_requests": 138
},
"file_meta": {
"content_id"... |
ccee61a1-b998-49b3-8676-3801fe4f39aa | mearth99/Problem | 백준/Silver/4673. 셀프 넘버/셀프 넘버.cc | #include<stdio.h>
#include<string.h>
int main()
{
/*
목표: 셀프넘버는 number[] 배열에 0으로, 생성자가 있는 숫자는 1이상
*/
int number[10001] = { 0 }; //숫자의 총 집합. 1~10000
for (int i = 1; i < 10000; i++) //변수 i가 1~10000까지 탐색
{
if (number[i] == 0)
printf("%d\n", i);
if (i < 10) //i가 10보다 작은 경우 *한자리수
{
number[i + i % 10]++; /... | ALGO | 0.998507 | 3.784834 | {
"github_metadata": {
"branch": "main",
"commit_count": 554,
"repo_created_at": "2024-11-08T01:06: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": "d665f72d29... |
9072fad8-232f-4947-a932-8173ceb0fa25 | zrmacc/LiST | src/RcppExports.cpp | // Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: <PASSWORD>
#include <RcppEigen.h>
#include <Rcpp.h>
using namespace Rcpp;
// fitOLS
SEXP fitOLS(const Eigen::Map<Eigen::VectorXd> y, const Eigen::Map<Eigen::MatrixXd> X);
RcppExport SEXP _LiST_fitOLS(SEXP ySEXP, SEXP XSEXP) {
... | ALGO | 0.916656 | 5.982716 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2017-11-07T19:42: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": "7bb90633a... |
e2df45b6-f568-4b79-8440-510b3c5a54cf | rsln-s/aggregative-coarsening-for-multilevel-hypergraph-partitioning | packages/meshinggenie/src/standalone/mps/MeshingGenie_mps_nd.h |
//@HEADER
// ************************************************************************
//
// MeshingGenie: Fracture Meshing Services Package
// Copyright 2011 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains c... | ALGO | 0.998201 | 5.078378 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-04-04T20:05:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "967da92327... |
228f6136-70cb-44a8-bbe7-32e343189c36 | zqnnn/coding-note | practice/131_Searcha2DMatrixII.cpp | //
// Created by zqn on 2019/9/4.
//
#include <vector>
using namespace std;
//搜索一个二维矩阵之二
//如果我们观察题目中给的那个例子,我们可以发现有两个位置的数字很有特点,左下角和右上角的数。
// 左下角的18,往上所有的数变小,往右所有数增加,那么我们就可以和目标数相比较,
// 如果目标数大,就往右搜,如果目标数小,就往上搜。这样就可以判断目标数是否存在。
// 当然我们也可以把起始数放在右上角,往左和下搜,停止条件设置正确就行。
class Solution {
public:
bool searchMatrix(vector<ve... | ALGO | 0.999824 | 5.776932 | {
"github_metadata": {
"branch": "master",
"commit_count": 159,
"repo_created_at": "2019-03-06T06:20:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e02ce4e... |
137c8eb5-7b29-4557-b6fc-99a2b44ab823 | uetsu840/Study_ProgrammingContests | AtCoder/RegularContest/RegularContest084/Q_D_SmallMultiple/solver1.cpp | #pragma GCC optimize ("O3")
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <set>
#include <algorithm>
#include <numeric>
using namespace std;
using QWORD = uint6... | ALGO | 0.999726 | 3.888348 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2018-07-30T14:46:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "77937b26... |
79b5e9eb-26f4-4aed-9271-8b88b221d11b | ROCm/rpp | src/modules/tensor/hip/kernel/flip_voxel.cpp | /*
MIT License
Copyright (c) 2019 - 2025 Advanced Micro Devices, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mo... | ALGO | 0.946228 | 4.05152 | {
"github_metadata": {
"branch": "develop",
"commit_count": 1433,
"repo_created_at": "2019-08-28T23:59:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 66,
"forks": 45,
"issues": 0,
"pull_requests": 9
},
"file_meta": {
"content_id": "217d0... |
3f54ade5-c37d-4b59-9449-caa75eadfa0d | jwesgore/Parallel_Comp | activity-lcs/lcs/lcs.cpp | #include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <iostream>
#include <unistd.h>
#include "omploop.hpp"
#include <vector>
#include <thread>
#include <mutex>
#include <condition_variable>
#ifdef __cplusplus
extern "C" {
#endif
void generateLCS(char* X, int m, char* Y, int n... | ALGO | 0.999095 | 4.333017 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2021-09-08T06:38:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0fe9d3e2... |
b19e77b4-aa80-47c5-a9b0-60d790676e55 | dmcgougan/advent_of_code | 2022/18.cpp | /*
* Problem 18, Advent of Code 2022
* <NAME>
*/
#include <cassert>
#include <iostream>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
using ll = int64_t;
// Split a string into a vector of strings based on the specified separator
static vector<string> ... | ALGO | 0.987861 | 5.865807 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2022-12-18T10:17: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": "fd47fb515f4... |
23b0e84f-e999-4cf4-9a0e-dd9141cf5938 | Ahlyab/first-semester | functions.cpp | /*
function: a piece of code that performs a specific task
function types
1. Returnable function : a function that returns some value/object
2. Non returnable function: a function that returns nothing
3. parameterized function : a function that takes argument when it is called
4. non parameterized function : a functi... | TOOL | 0.991321 | 4.399375 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2024-12-14T17:09: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": "19705cf182... |
e8000b77-a5b7-4ab2-be4f-7725b83300a7 | 12Dong/acm | codeforce/123a.cpp | #include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#define MAX 1007
using namespace std;
char s[MAX];
int maxPrime[MAX];
int mark[MAX];
int num[30];
void init ()
{
memset ( maxPrime , -1 , sizeof ( maxPrime ) );
for ( int i = 2 ; i < MAX ; i++ )
{
if (~maxPrime[i]) conti... | ALGO | 0.999997 | 3.184208 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2017-05-11T03:36:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b1577cc3... |
573608c2-8f6c-46c9-988b-f1a2c419a5e6 | ShafayetSadi/C-plusplus-STL | Miscellaneous/string.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
string str = "geeksforgeeks";
cout << str << endl;
cout << str.length() << endl;
str += "GFG";
cout << str << endl;
// sub string
cout << str.substr(5)... | ALGO | 0.959617 | 3.051154 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-11-17T10:13: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": "d10c290ff74d... |
07768f6c-de27-426a-90df-11aabec66135 | ishandutta2007/codeforces-i | ivan100sic/normal/757/C.cpp | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
using namespace std;
int n, m;
int g[1000005], gg = 1;
long long f[1000005];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cerr.tie(nullptr);
cin >> n >> m;
for (int i=1; i<=m; i... | ALGO | 0.999927 | 3.68582 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:39:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4fda57368ef1... |
bc11a77e-1210-4ba5-a61b-99286a2ed8bd | kritikm/MazeSolver | CImg/GreedyBFS_v2.1.cpp | // Greedy Best First Search implementation - Graph based strategy
// Takes a graph (an adjacency matrix) along with the heuristic function, the start node and the end node as input
// Prints the GBFS path as an output
#include<iostream>
#include<vector>
#include<stdlib.h>
#define MAX 28
using namespace std;
typedef ... | ALGO | 0.99998 | 3.537851 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2017-03-05T15:36:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "34231f152... |
f2c53904-b05d-43c3-9470-f0e6509d6789 | jesuswr/cp-codes-and-problems | WF_TRAINING/10/test.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
int dasdas;
#define FOR(i,n,m) for(int i = n; i < (int)m; i++)
#define ROF(i,n,m) for(int i = n; i > (int)m; i--)
#define ms(obj,val) memset(obj,val,sizeof(obj))
#define ri(a)... | ALGO | 0.999818 | 3.371711 | {
"github_metadata": {
"branch": "master",
"commit_count": 389,
"repo_created_at": "2019-07-11T00:26:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb40a9d7... |
8bfda529-2c0b-4995-9a5c-99f2848baff1 | tanmay-pro/CompProg | codeforces/455A.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PI 3.14159265
#define br cout << endl
#define fo(i, n) for (int i = 0; i < n; i++)
#define Fo(i, k, n) for (int i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define amazing ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL... | ALGO | 0.999909 | 3.591163 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-03-09T17:11: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": "d6375e5ad9d7... |
09b1ce87-1c09-4a27-9b3a-a4e4f6f40271 | ghzuo/Collapse | src/collapse/main.cpp | /*
* Copyright (c) 2022 Wenzhou Institute, University of Chinese Academy of
* Sciences. See the accompanying Manual for the contributors and the way to
* cite this work. Comments and suggestions welcome. Please contact Dr.
* <NAME> <<EMAIL>>
*
* @Author: Dr. <NAME>
* @Date: 2022-03-16 12:10:27
* @Last Modified... | TOOL | 0.92346 | 3.944782 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2020-12-07T02:36:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d9cac6bdd... |
a9318c93-e74a-4507-9bf9-db2a278d7508 | wsyunine/ACM | 2023-2024/014 杭电/001/E.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<cstdlib>
#include<ctime>
#include<bitset>
#include<vector>
#include<climits>
#include<iomanip>
using namespace std;
#define N 100010
#define int long long
templa... | ALGO | 0.999987 | 4.165466 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2025-01-13T06:58: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": "2df24e1cc... |
f368d15c-9806-4e8d-8842-ce5b7401fb58 | tanb33r/cp-codes | 1927e.cpp | #include <bits/stdc++.h>
#define f(i,n) for(int i=0; i<(n); i++)
#define ff(i,j,n) for(int i=int(j);i<n;++i)
#define pb push_back
#define eb emplace_back
#define pr(x) cout<<x<<"\n"
#define ps(x) cout<<#x<<"\n"
#define vps(x) ret... | ALGO | 0.999961 | 3.523217 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2023-03-19T08:28: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": "f58beff98df... |
9c13e65b-6458-43bf-b65c-33780a7e4f51 | avinash23112/leetcode | 121-best-time-to-buy-and-sell-stock/best-time-to-buy-and-sell-stock.cpp | class Solution {
public:
int maxProfit(vector<int>& p) {
int minimum=p[0];
int max_profit=0;
for(int i=0;i<p.size();i++){
minimum=min(p[i],minimum);
int profit=p[i]-minimum;
max_profit=max(profit,max_profit);
}
return max_profit;
... | ALGO | 0.999946 | 5.373103 | {
"github_metadata": {
"branch": "main",
"commit_count": 322,
"repo_created_at": "2023-08-31T17:51: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": "6f749855a1... |
717f658b-ee4f-4459-91e5-63b1f5175cac | SungwookLE/Codingtest_Algorithm | softeer/test.cpp | #include<iostream>
#include<vector>
using namespace std;
void dfs(int iter, int n, int ex, vector<int> visited, vector<int> secret, vector<int> user){
if (iter == n){
cout << "secret" << endl;
exit(0);
}
else{
for(int i =0 ; i < user.size() ; ++i){
if(visited[i] == 0){
if (secret[iter]... | ALGO | 0.999941 | 3.433117 | {
"github_metadata": {
"branch": "master",
"commit_count": 180,
"repo_created_at": "2021-04-05T14:24: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": "50564a38... |
d022b93b-3024-43d1-92cf-f907ff5d3fae | ZEUSRPA/CompetitiveProgramming | Training/HackerEarth/CreateBST.cpp | #include <bits/stdc++.h>
#define ENDL '\n'
#define deb(u) cout << #u " : " << (u) << ENDL;
#define deba(alias, u) cout << alias << ": " << (u) << ENDL;
#define debp(u, v) cout << u << " : " << v << ENDL;
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define lli long long
#define ld long dou... | ALGO | 0.999988 | 4.550829 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-02-17T17:25: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": "f07ab1fae28a... |
6f8a488a-8677-40cb-9851-0ca0fadae1d0 | starlike6617/RecordingBOJ | 백준/Silver/15720. 카우버거/카우버거.cc | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int B, C, D;
cin >> B >> C >> D;
int b[B], c[C], d[D];
int sum = 0;
for (int i = 0; i < B; i++)
{
cin >> b[i];
sum += b[i];
}
for (int i = 0; i < C; i++)
{
cin >> c[i];
sum +... | ALGO | 0.999758 | 3.192115 | {
"github_metadata": {
"branch": "main",
"commit_count": 1337,
"repo_created_at": "2022-07-26T15:25:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "736a234dd... |
c7f5e1f8-947d-4d4e-a146-7f8ac55d3292 | LuciferWin/Level_0 | C++/logicaloperators.cpp | #include <iostream>
using namespace std ;
int main () {
bool result ;
int a = 5 ;
int b = 6 ;
result = ( a < 10 ) && ( b > 2 ) ; // 1 && 1 ;
cout << "Result is : " << result << endl ;
result = ( a < 10 ) && ( b > 20 ) ; // 1 && 0 ;
cout << "Result is : " << result << endl ;
result = (... | ALGO | 0.992022 | 3.218684 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-06-10T11:07: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": "003176c0d482... |
cdb5c427-f490-466e-9cc2-5f85d97e6a30 | cuppar/dsa_in_cpp | ch03/ex33/main.cpp | #include <iostream>
#include <algorithm>
#include <sstream>
#include <list>
#include <map>
#include "util.h"
template <typename T>
class CQueue
{
public:
CQueue(int capacity)
: theArray{std::vector<T>(capacity)},
front{0},
rear{0},
capacity{capacity} {}
bool empty()
{
... | TOOL | 0.983719 | 5.327929 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-06-23T15:43: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": "74eb6cdb889... |
4ba931f6-569e-4a6a-b298-df41dc1c1618 | Rudrakshyadav1/c-DSA | graph-dijkstras-algorithm.cpp | #include <iostream>
#include <set>
#include <vector>
#include <list>
#include <unordered_map>
#include <climits>
using namespace std;
int n, m, source;
class Graph{
public:
unordered_map<int, list<pair<int, int>>> adj;
void addEdge(int f, int s, int weight){
adj[f].push_back({s, weight});
adj[s]... | ALGO | 0.999984 | 4.16281 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2024-09-30T18:06:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38b153eeb76... |
a3545b05-0f70-4321-9595-40048c91612a | periclesroalves/runtime-pointer-disambiguation | llvm/tools/polly/lib/Transform/CloneRegion.cpp | //===- CloneRegion.cpp - Clone region nest ------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===---------------------------------------------------... | ALGO | 0.97243 | 7.035134 | {
"github_metadata": {
"branch": "master",
"commit_count": 237,
"repo_created_at": "2014-09-04T19:34:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "81e6d50e... |
0377136f-e68a-4ab0-b5ef-fd23a91a32b1 | gazebosim/gazebo-classic | deps/opende/src/step_bullet_pgs_wrapper.cpp | /*
* Copyright (C) 2015 Open Source Robotics Foundation
*
* 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 appl... | ALGO | 0.995338 | 5.536016 | {
"github_metadata": {
"branch": "gazebo11",
"commit_count": 32589,
"repo_created_at": "2020-04-19T04:26:21.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1271,
"forks": 503,
"issues": 1466,
"pull_requests": 11
},
"file_meta": {
"content_id... |
f5aa3248-58a5-42d8-b7a4-6980e536fe0d | barkolorious/cses-solutions | Graph_Algorithms/1193_labyrinth.cpp | // barkolorious - 01 December 2024
// in god, do we trust?
#include <bits/stdc++.h>
using namespace std;
#define FIN(x) freopen(x ".in", "r", stdin)
#define FOUT(x) freopen(x ".out", "w", stdout)
#define int long long
#define pb push_back
#define fr first
#define sc second
#define __ << " " <<
const int N = 1e3... | ALGO | 0.999987 | 4.042405 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-12-03T12:29:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8003a2d9e784... |
5ceba9a5-e813-4bff-8338-3b93ee11813d | krShubham2003/Coding-Questions | Binary Search/Single Element in a Sorted Array.cpp | // You are given a sorted array consisting of only integers
// where every element appears exactly twice,
// except for one element which appears exactly once.
// Return the single element that appears only once.
// Your solution must run in O(log n) time and O(1) space.
// Input 1 : nums = [3,3,7,7,10,11,11]
// O... | ALGO | 0.999985 | 5.726001 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2024-11-28T09:00:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "94a50aee577... |
38632f4e-a639-452f-bea6-e9d7cde0dedf | ekra024/XPSC | week 11/Day 6/Deadly Laser.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/__gcd(a,b)
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <... | ALGO | 0.999601 | 4.078132 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2023-06-16T14:57:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6f87cd1fd2... |
d4b22e45-9153-4998-bf42-0faccf788e77 | luqasc/edb_trab01 | exerc2/main.cpp | #include <iostream>
using namespace std;
int busca_bin_it (int n, int x, int* a)
{
int inf = 0;
int sup = n - 1;
int meio;
while (inf <= sup)
{
meio = (inf + sup)/2;
if (x == a[meio])
{
return meio;
}
if (x < a[meio])
{
sup = ... | ALGO | 0.999902 | 4.443884 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-24T01:33: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": "21e7a0dd91d4... |
4fb54f7d-b45d-49a0-8b34-3c2cfdfacaf9 | Chiki1601/Hackerearth-Solutions | Algorithms/Searching/Binary search/Smallest subarrays.cpp | #include <bits/stdc++.h>
using namespace std;
int A[1010101], B[1010101], F[1010101], Ans[1010101], N;
int count(int i)
{
int sum = 0;
while (i > 0)
sum += F[i], i -= ((i) & -(i));
return sum;
}
void add(int i)
{
while(i <= N)
F[i]++, i += ((i) & -(i));
}
int f(int t)
{
int l ... | ALGO | 0.999995 | 3.835456 | {
"github_metadata": {
"branch": "main",
"commit_count": 1808,
"repo_created_at": "2022-09-09T09:13:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "bbd02a7a... |
f9c02f0d-1642-4ac9-ada3-8edc54375fb1 | shobman17/ME766_project | FCM_intra.cpp | #include <iostream>
#include <vector>
#include <cmath>
// #include <Eigen/Dense>
#include <eigen3/Eigen/Dense>
#include <eigen3/unsupported/Eigen/MatrixFunctions>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <map>
#include <type_traits>
class CSVWriter {
private:
std::ofstream file;
public:
... | TOOL | 0.908775 | 7.210128 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2024-10-12T10:09: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": "8d6bc8c12ad... |
c55cd954-6710-40c8-9198-aa9ee955e700 | mnasser02/cp-notebook | CSES Problem Set/advanced-techniques/signal-processing.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef tuple<int, int, int> iii;
typedef pair<ll, ll> pll;
typedef ... | ALGO | 0.999993 | 3.794 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-03-18T13:46: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": "26fd6d20716... |
b102c4cc-74a1-4ea6-950d-4c7662005013 | Pruthviraj98/uta-2019-winsem | kthLargestElementin_nlogn.cpp | #include<iostream>
using namespace std;
void merge(int arr[], int l, int m, int r)
{
int i, j, k;
int n1 = m - l + 1;
int n2 = r - m;
int L[n1], R[n2];
for (i = 0; i < n1; i++)
L[i] = arr[l + i];
for (j = 0; j < n2; j++)
R[j] = arr[m + 1+ j];
i = 0; // Initial index o... | ALGO | 0.999994 | 3.930527 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-02-13T18:27: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": "06f3a7b870... |
2b7ff857-8715-489d-84d3-97d725ed1748 | bala219/DispatcherOpenCL | include/primitives/header/BitonicSorting.h | //
// Created by tompi on 5/26/18.
//
#ifndef OPENCLDISPATCHER_BITONICSORT_H
#define OPENCLDISPATCHER_BITONICSORT_H
#pragma once
#include "../../data_api.h"
#include "../../kernel_api.h"
#include "../../runtime_api.h"
#include "../../ImportKernelSource.h"
/*class BitonicSorting {
public:
void BitonicSo... | ALGO | 0.997715 | 5.937706 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-04-13T13:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb8f6591ac... |
109bd3b2-d8b8-4265-baff-e49b24ef504b | ryuspace/Algorithm | SWEA/4112.cpp | /*4112. 이상한 피라미드 탐험
백준의 과외맨과 문제가 비슷했다. 우선 피라미드를 전부 왼쪽으로 몰아 넣은다고
생각하면
ㅇ
ㅇㅇ
ㅇㅇㅇ
ㅇㅇㅇㅇ
이런 모양이 되는데 여기서 한 점을 기준으로 갈 수 있는 곳은
북쪽 동쪽 남동쪽 남쪽 서쪽 북서쪽 이렇게 6개의 방향이다.
1부터 10000까지 미리 배열에 모양대로 선언해 놓고 bfs를 돌린다.
*/
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int, int> pii;
int arr[181][181... | ALGO | 0.999833 | 4.419086 | {
"github_metadata": {
"branch": "master",
"commit_count": 637,
"repo_created_at": "2020-04-28T09:49: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": "9b2caca7... |
453b93eb-e634-4f8a-818b-7a0afcc5542c | codulluiandrei/pbinfo | pbinfo-514/main.cpp | #include <iostream>
using namespace std;
bool prim(int a, int b) {
while (b) {
int r = a % b;
a = b;
b = r;
} if (a == 1) return true;
return false;
}
int main() {
int n, v[1001];
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> v[i];
for (int i = 1; i < n - 1; +... | ALGO | 0.999966 | 3.367022 | {
"github_metadata": {
"branch": "main",
"commit_count": 88,
"repo_created_at": "2022-04-17T15:34:21.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 3,
"issues": 48,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef4ba70e36d... |
16034c68-fa6d-4fc6-b807-fec63033ef80 | goodbob123/Physical-Design | PD_final/src/Graph.cpp | #include <Router.h>
#include <Graph.h>
#include <assert.h>
// some useful function
void Graph::test() {
// V = vector<Node*> ();
// E = vector<Edge*> ();
// push_v(new Node(0, 1));
// push_v(new Node(2, 1));
// push_v(new Node(3, 0));
// push_v(new Node(4, 3));
// push_v(new Node(0, 0));
... | ALGO | 0.992399 | 3.7814 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-09-03T15:39: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": "758b3cb161d... |
03262a0a-56f3-4615-ac7e-7a7a943c17de | Madhavan0210/ProblemSolving-GFG | Difficulty: Easy/Selection Sort/selection-sort.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
class Array {
public:
template <class T>
static void input(vector<T> &A, int n) {
for (int i = 0; i < n; i++) {
scanf("%d ", &A[i]);
}
}
template <class T>
static void print(vector<T> &A) {
f... | ALGO | 0.999126 | 6.488827 | {
"github_metadata": {
"branch": "main",
"commit_count": 556,
"repo_created_at": "2024-07-04T03:02: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": "fdd9f73dbd... |
9e4149c2-0b6c-4185-b85b-c3028dd7449a | RahulreddyKaithapuram/eee598_TiltShift_Basani_Nallapaneni_Gangaraju_Kaithapuram | app/src/main/cpp/native-lib.cpp | #include <jni.h>
#include <string>
#include <cpu-features.h>
#include <android/log.h>
#include <arm_neon.h>
#include <chrono>
#include "Convolution_cpp.h"
#include "Convolution_neon.h"
using namespace std::chrono;
extern "C"
JNIEXPORT jint JNICALL
Java_edu_asu_ame_meteor_speedytiltshift2022_SpeedyTiltShift_tiltshiftc... | ALGO | 0.909537 | 5.118095 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-02-19T02:49: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": "2328f1b8f9... |
a173a297-6472-4998-a9b7-8bad4ccb143c | abhijeetadarsh/computer_graphics | BresenhamCircle.cc | #include <bits/stdc++.h>
using namespace std;
#define setPixel bug
#ifndef ONLINE_JUDGE
#include "/home/blqck6ird/lib/blqckdebug.h"
#endif
// move horizontally
void mh(int &x, int &y, int &Δ){
x = x + 1;
Δ = Δ + 2*x + 1;
}
// move diagonally
void md(int &x, int &y, int &Δ){
x = x + 1;
y = y - 1;
... | ALGO | 0.999571 | 4.129225 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-02-15T08:40:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "980901ad86... |
59debbf7-e26f-4732-b005-7315a68e0153 | dhs347/Dream | Team_Training/13、2019-nowcoder-multi-3/code/f.cpp | #include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define per(i, a, b) for(int i = (b) - 1; i >= (a) --i)
#define de(c) cout << #c << " = " << c << endl
#define dd(c) cout << #c << " = " << c << ... | ALGO | 0.999907 | 3.215189 | {
"github_metadata": {
"branch": "master",
"commit_count": 1232,
"repo_created_at": "2019-09-26T15:21:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "505556... |
aa1daf0f-1808-4e10-9a78-a6ccfe07f0ae | RadioShackCorp/2770168-MakeItRobotics-Starter-Kit | 2770168 Starter Kit/walk/walk.ino | //********************************************************************************
// * File Name : walk.ino
// * Author : RadioShack Corporation
// * Version : V1.0
// * Date : 2014/02/28
// * Description : Optical sensors on each leg send feedback to core PCB to en... | TOOL | 0.987898 | 4.254289 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2015-02-02T21:22:09.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 21,
"forks": 41,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "bbfbe4d96... |
8264cfac-38b4-424c-8c1b-7b2a9c36269d | ej2xu/LeetCode | 199binary-tree-right-side-view.cc | /**
* 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:
vector<int> rightSideView(TreeNode* root) {
vector<int> res;
dfs(root, res, 0);
retur... | ALGO | 0.999841 | 6.204961 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2016-08-31T02:24:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d92974ad1... |
3caea508-48d2-4e26-b26e-38833ecd66a8 | Polly-99/Homework | Array/Array.cpp | #include "Array.h"
#include <string>
int value(std::string line, int first, int last)
{
int data = 0;
int k = 1;
if (line[first] == 45) {
k = -1;
first++;
}
try {
for (int i = first; i < last; i++)
{
if (47 > line[i] || line[i] > 58)
throw "Wrong command";
data = data * 10 + (line[i] - 48);
}
... | TOOL | 0.962128 | 4.532569 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-12-11T20:55: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": "e47a5c8cb... |
30a07c99-81e4-4376-be66-2eedeb0f632b | imulan/procon | atcoder/abc165/f.cpp | // clang-format off
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostrea... | ALGO | 0.999945 | 4.318735 | {
"github_metadata": {
"branch": "master",
"commit_count": 2571,
"repo_created_at": "2015-11-25T03:18:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 27,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf4ea9... |
e8873094-f115-4241-82ee-f8dd88ce5523 | RootLEE2/problem-solving | codeforces/brute_force/cpp/1651C.cpp | #include <iostream>
#include <stdlib.h>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAX_N 2 * 100005
#define MAX_LENGTH 100005
#define NUM_OF_ALPHABET 26
#define INF 0x3f3f3f3f
#define SQUARE(x) ((x) * (x))
#define MOD(x) ((x) %... | ALGO | 0.999975 | 4.374845 | {
"github_metadata": {
"branch": "main",
"commit_count": 317,
"repo_created_at": "2021-08-04T09:24:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6e9b6b3b7... |
9684a599-9d18-4ab8-9f1a-4a62bcc5a41f | Saikrishna1504/DSA0151-OOPS | Day-5[03-06-2024]/2.Prime_number.cpp | #include <iostream>
#include <cmath>
bool is_prime(int n) {
if (n <= 1) {
return false;
}
if (n <= 3) {
return true;
}
if (n % 2 == 0 || n % 3 == 0) {
return false;
}
for (int i = 5; i * i <= n; i += 6) {
if (n % i == 0 || n % (i + 2) == 0) {
retur... | ALGO | 0.999889 | 5.093493 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2024-05-15T03:32:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b62e9cd5ccb... |
313a9421-9718-48c2-9845-a4c5458d4940 | ANCuber/Competitive_Programming | tioj/2267.cpp | #include <bits/stdc++.h>
using namespace std;
bool solve(string s, int n) {
vector<bool> a(n);
for (int i = 0; i < n; ++i) a[i] = s[i]-'0';
for (int i = 0; i < n-1; ++i) {
if (a[i]) {
a[i] = !a[i];
a[i+1] = !a[i+1];
if (i+2 <= n-1) a[i+2] = !a[i+2];
}
... | ALGO | 0.999993 | 3.526675 | {
"github_metadata": {
"branch": "main",
"commit_count": 542,
"repo_created_at": "2022-03-27T14:48:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "45d41ecd22... |
3565eaea-19f8-4edb-b457-dba905ca528d | sengupta-courses/CU-Courses | CSCI 2270/Exam 2/StarterCode/sengupta/Q2_starter_code/Graph.cpp | #include "Graph.hpp"
#include <vector>
#include <queue>
#include <iostream>
using namespace std;
void Graph::addEdge(string source, string target){
for(unsigned int i = 0; i < vertices.size(); i++){
if(vertices[i]->name == source){
for(unsigned int j = 0; j < vertices.size(); j++){
... | ALGO | 0.958711 | 3.00543 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-05-16T22:59:33.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "d061d668ede86... |
cf750f50-636c-48c8-9822-6138eda09b29 | damenhanter/Dragon | DragonIV2D/DragonEngine/Triangle2D.cpp | #include "StdAfx.h"
#include "Triangle2D.h"
extern RECT g_rRectClip;
CTriangle2D::CTriangle2D(void)
: state(0)
, x0(0)
, y0(0)
, Vx(0)
, Vy(0)
{
}
CTriangle2D::CTriangle2D(int state, int x0, int y0, int Vx, int Vy)
{
this->state=state;
this->x0=x0;
this->y0=y0;
this->Vx=Vx;
this->Vy=Vy;
}
CTriangle2D::~CTriangle... | ALGO | 0.930982 | 3.136855 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-12-31T12:26: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": "6a283fba1c... |
6b69ccbe-2276-41e4-82f1-2393dd170d07 | ronick-grammer/Algorithm | etc/어느코테_Lxxx_05.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
// 규칙 2 - 4
char rule2_4[9] = {'~', '!', '@', '#', '$', '%', '^', '&', '*'};
//1번 규칙
bool rule_1(const string& str){
return (str.size() >= 8 && str.size() <= 15);
}
//2 번 규칙
pair<bool, int> rule_2(const string& str)... | ALGO | 0.997507 | 3.819203 | {
"github_metadata": {
"branch": "main",
"commit_count": 435,
"repo_created_at": "2020-12-02T23:30:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "84f3562cd9... |
06805a2e-684d-478b-ac15-7588cdf8a5c2 | jayadevgh/Algorithms | Misc/HeidiAndTheTuringTest/HeidiAndTheTuringTest.cpp | #include <iostream>
#include <bits/stdc++.h>
#define ii pair<int, int>
using namespace std;
int main() {
//Console
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<ii> points;
vector<int> xmaxis(51);
vector<int> ymaxis(51);
int xcounter =0, ycounter =0;
vector<int> xlist, ylis... | ALGO | 0.999938 | 3.22646 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2022-11-25T04:05: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": "296b4222736... |
55d7afd9-c8a6-466b-b2cd-255b0d3462f5 | AbdelrahmanElhawary/CompetitiveProgramming | UVA/10920.cpp | #ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include<bits/stdc++.h>
#include<chrono>
#include<unordered_map>
#include<random>
#include<complex>
using namespace std;
#define ll long long
#define ld long double
#define ull unsigned ll
#define endl '\n'
#define mk make_pair
#ifndef ONLINE_JUDGE
int __builtin_... | ALGO | 0.999459 | 4.123765 | {
"github_metadata": {
"branch": "master",
"commit_count": 214,
"repo_created_at": "2018-01-28T20:33:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "4246fcbd... |
c0c81c1d-7eac-453d-962b-11b5c53a259e | RTS-SYSU/Timing-Analysis-Multicores | include/AnalysisFramework/GraphIterator.h | ////////////////////////////////////////////////////////////////////////////////
//
// LLVMTA - Timing Analyser performing worst-case execution time analysis
// using the LLVM backend intermediate representation
//
// Copyright (C) 2013-2022 Saarland University
// Copyright (C) 2016 <NAME>
//
// This file is ... | ALGO | 0.970638 | 7.180937 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2023-07-22T04:25:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 54,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5364404c8d... |
085c136f-c0d2-407b-b62c-29dde66f981f | AdityaPatil-AP/LeetCode-Questions-TopicWise | Leet_Code_Solutions/TreesAndBinaryTrees/102-Binary-Tree-Level-Order-Traversal.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999983 | 5.721975 | {
"github_metadata": {
"branch": "main",
"commit_count": 286,
"repo_created_at": "2022-07-24T12:59:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3716c9da6c... |
bde9cb65-851b-4ff8-a8f8-0039dde756d5 | md-qubais/Data_Structures_Algorithms_and_Competitive_Programming | vectordesign.cpp | #include<bits/stdc++.h>
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL)
#define int long long
#define endl "\n"
using namespace std;
template<class T>
class Vector{
int c=0;
int m=0;
T *arr;
public:
Vector(){
}
Vector(T i){
arr=new T[i];
m=i;
}
void operator()(string str){
cout<<"The name of the ... | TOOL | 0.937691 | 3.469683 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-04-05T08:32:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d8aa52aa553... |
9f7fbfc8-1d31-4bb9-8387-7fa0c1b1944b | yeshengm/USACO | section_2/maze1.cpp | /*
ID: mayeshe1
LANG: C++
PROG: maze1
*/
#include "iostream"
#include "fstream"
#include "queue"
using std::ifstream;
using std::ofstream;
using std::queue;
using std::cout;
using std::endl;
ifstream fin("maze1.in");
ofstream fout("maze1.out");
int H, W;
int step1[110][50];
int step2[110][50];
bool u[110][50], d[110][... | ALGO | 0.999937 | 3.632653 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2015-10-25T03:01:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ef0b25ce... |
92a1289b-2dcd-4b91-a831-acf093e4bf97 | SongHayoung/LeetCode | 1956-minimum-time-for-k-virus-variants-to-spread/1956-minimum-time-for-k-virus-variants-to-spread.cpp | #define topK(a,k) begin(a), begin(a) + k, end(a)
class Solution {
int manhattanDistance(int x1, int y1, int x2, int y2) {
return abs(x1-x2) + abs(y1-y2);
}
public:
int minDayskVariants(vector<vector<int>>& P, int k) {
int l = 100, r = 0, t = 0, b = 100;
for(auto& p : P) {
... | ALGO | 0.999977 | 6.25114 | {
"github_metadata": {
"branch": "master",
"commit_count": 13354,
"repo_created_at": "2021-01-06T12:46:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b95268... |
3dc007c6-5ec8-4e4b-bebe-fa57c44aa009 | liwenwei/algorithm | cplusplus/gcd.cpp | #include <stdio.h>
// Greatest Common Divisor
/* Stardand Function*/
int gcd(int a, int b)
{
int temp = 0;
while (a != 0){
temp = a; a = b%a; b = temp;
}
return b;
}
/* Recursive Function */
int gcdr(int a, int b)
{
if (a == 0) return b;
return gcdr(b%a, a);
}
int main()
{
int a,... | ALGO | 0.999792 | 4.379149 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2016-12-12T14:41:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c86251c... |
e7084bfe-e586-4ca0-9067-c8ace8c517c9 | prajnamayeesahu/Assignments-Group-10-ITP | Week-2-Assignment/Vidyoshah_Behera/problem5.cpp | /*Write a C++ program to find the second smallest elements in a given array of integers(all elements of array distinct).*/
#include <iostream>
#include <climits>
using namespace std;
int find2nd_smallest(int arr[], int a)
{
if (a < 2)
{
cout << "Array having 2 elements" << endl;
return -1;
}... | ALGO | 0.999913 | 5.413415 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2025-03-29T17:31:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1183e1fa89a... |
5d3b8e5a-4103-4459-948b-62cb49745aaf | keenu01/Tic-Tac-Toe | tictactoe.cpp | #include <iostream>
using namespace std;
void drawBoard(char board[3][3])
{
cout << "-------------------" << endl;
for (int i = 0; i < 3; i++)
{
cout << "| ";
for (int j = 0; j < 3; j++)
{
cout << board[i][j] << " | ";
}
cout << "\n----------------\n" << endl;
}
}
bool CheckWinner(char board[3][... | ALGO | 0.997305 | 4.590814 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-03-18T17:59: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": "aa4fccaa6711... |
1149eca0-1d57-4523-a6c4-3b60f3a5240b | rdforte/competitive-programming | LeetCode/Easy/102-binary-tree-order-level-traversal/index.cpp | // https://leetcode.com/problems/binary-tree-level-order-traversal/?envType=study-plan&id=level-1
#include <bits/stdc++.h>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nul... | ALGO | 0.999984 | 6.27241 | {
"github_metadata": {
"branch": "main",
"commit_count": 562,
"repo_created_at": "2021-07-11T08:21: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": "7e58862f4c... |
7897ffbc-8e25-4d6a-945b-bf67830d8284 | kskhori/line_detection14_test | heapsort.cpp | //
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
//
// heapsort.cpp
//
// Code generation for function 'heapsort'
//
// Include files
#include "heapsort.h"
#include ... | ALGO | 0.999941 | 5.284554 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-04-02T01:42: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": "3f7594e79364... |
44c9a7cc-99f2-4ca7-ab75-acfaac20bf2b | samuelgerber/ITKOptimalTransport | include/Kmeans.h | //#define VERBOSE
#ifndef KMEANS_H
#define KMEANS_H
#include <Eigen/Dense>
#include <vector>
#include "Random.h"
#include <cmath>
#include <limits>
template <typename TPrecision>
class KmeansData{
public:
typedef typename Eigen::Matrix<TPrecision, Eigen::Dynamic, 1> VectorXp;
virtual ~KmeansData(){};
... | ALGO | 0.999722 | 6.007285 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2019-06-17T14:09:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "48626f9af... |
56a69adc-31ef-47b4-a645-fe2eccafdb69 | Cegax123/Competitive-Programming | online judges/codeforces/random/1626E.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(), (c).end()
#define rall(A) A.rbegin(),A.rend()
#define pb push_back
#define dbg(x) do {cerr << #x <<" = " << (x) << endl; } while (false)
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
//cout << s... | ALGO | 0.99994 | 4.187044 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-09-15T13:50: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": "1e2f4260d51... |
7cf44bba-bb20-4347-8da7-808a0228dee0 | plasma712/D2D_Zelda | Client/AstarMgr.cpp | #include "stdafx.h"
#include "AstarMgr.h"
#include "Terrain.h"
IMPLEMENT_SINGLETON(CAstarMgr)
CAstarMgr::CAstarMgr()
: m_pTerrain(nullptr), m_iStartIndex(0)
{
}
CAstarMgr::~CAstarMgr()
{
}
list<TILE_INFO*>& CAstarMgr::GetBestPath()
{
// TODO: 여기에 반환 구문을 삽입합니다.
return m_BestPath;
}
void CAstarMgr::StartAstar(co... | ALGO | 0.974094 | 4.521283 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2019-10-08T06:15: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": "3ea5884b3... |
e178a2f6-32e5-4fa7-973a-3ff1e93d2cc5 | rishabhjohar24/CPP | CSES/Graph/Road_Reparation.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
struct Edge
{
int a;
int b;
ll c;
};
vector<Edge> arr;
int par[200001];
bool comp(Edge a, Edge b)
{
return a.c < b.c;
}
int find(int a)
{
if (par[a] == -1)
{
return a;
}
return par[a] = find(par[a]);
}
int main()
{
ios::sync_with_s... | ALGO | 0.999971 | 4.750031 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-09-24T11:13: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": "e848a0e45a24... |
9881972b-4bd1-4d60-80da-91698ebb8db8 | SuperYe1/LearnCpp | leetcode/105.cpp | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNo... | ALGO | 0.999988 | 5.502058 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2021-06-20T13:11: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": "c3cb77485... |
14a120be-11aa-4213-bfda-b2814afff33e | kulych/fruit-fever | primitives.cpp | #include <cmath>
#include <utility>
#include <memory>
#include <SFML/Graphics.hpp>
#include "primitives.hpp"
//SMAZAT INCLUDE
#include <iostream>
//#OTAZKA, chtel bych mit v "knihovne" funkci, kterou pouziva vice funkci v ruznych tridach (napr _rotate_point, _distance)
//Zaroven asi nechci, aby se vtirala vsude, kam... | ALGO | 0.923988 | 4.723213 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2018-12-09T17:56: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": "4107831ed... |
e1b908f9-16dd-4c97-876a-5f61a9d1fe22 | raincross7/code-similarity | codes/train_code/problem086/problem086_265.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
long long mo = 1e9 + 7;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
template<class T, class S> void cmin(T &a, const S &b) { if (... | ALGO | 0.999986 | 3.10356 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0523285ad02c... |
b9389622-5333-4ed6-8589-d6e35df2ee5a | Leapense/problems | 15419번: Frosting on the Cake/main.cpp | //=====================================================================
// 15419번: Frosting on the Cake
// @date: 2024-10-12
// @link: https://www.acmicpc.net/problem/15419
// @Motd: 폴더 내부에 있는 파일을 삭제하거나 변경하지 말아주세요.
// @Test: 코드를 작성 후 "BOJ: 테스트"통해서 테스트를 해보세요.
//===... | ALGO | 0.999975 | 5.052489 | {
"github_metadata": {
"branch": "master",
"commit_count": 2661,
"repo_created_at": "2024-10-12T10:53:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4248e3d... |
5ae2324a-e669-4167-af72-e200fcfe8521 | kodsnack/advent_of_code_2020 | kjelloh-c++/day11_1/main.cpp | // Watch live coding of this on youtube https://youtu.be/NxYvdCCU72g
// main.cpp
// AdventOfCode201211_1
//
// Created by <NAME> on 2020-12-11.
//
#include <iostream>
#include <map>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <vector>
extern char const* pExample1[];
exter... | ALGO | 0.99944 | 5.257866 | {
"github_metadata": {
"branch": "main",
"commit_count": 1633,
"repo_created_at": "2020-11-21T10:06:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 28,
"forks": 64,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e54a48c... |
688cad6c-8526-4c3d-9eaa-af6666ec5b7c | BlazuLyda/cppCompetetiveCoding | Indywidualny/Maks licz seg (mls)/maksliczseg.cpp | #include <bits/stdc++.h>
using namespace std;
struct point
{
long long x, y;
void read()
{
scanf("%lld %lld", &x, &y);
}
};
bool cmp(point a, point b)
{
return (long long)(a.x * b.y) > (long long)(b.x * a.y);
}
int n;
vector<point> v;
void printSlopes()
{
printf("Slopes:\n");
for (auto i : v)
{
pr... | ALGO | 0.99969 | 4.203588 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-10-25T18:00:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0725e0a9a... |
0faa2ed8-7f7f-4e24-8871-9c73b7a3529b | NikolajBjorner/z3 | src/smt/theory_str.cpp | /*++
Module Name:
theory_str.cpp
Abstract:
String Theory Plugin
Author:
<NAME> and <NAME>
Revision History:
--*/
#include "ast/ast_smt2_pp.h"
#include "smt/smt_context.h"
#include "smt/theory_str.h"
#include "smt/smt_model_generator.h"
#include "ast/ast_pp.h"
#include "ast/ast_ll_pp.h"
#include<l... | ALGO | 0.938677 | 5.723373 | {
"github_metadata": {
"branch": "master",
"commit_count": 18486,
"repo_created_at": "2015-05-14T21:45:35.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "Z3Prover/z3",
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id":... |
fb61eb2b-eb93-4479-b6c3-eecfeb191e7c | itsnotTalha/CPP | Test1.cpp | #include<iostream>
#include<math.h>
#include<vector>
using namespace std;
int sumDigit(int n) {
int sum = 0;
while (n != 0) {
int t = n % 10;
sum += (t * t);
n /= 10;
}
return sum;
}
void Merge(vector<int>& A, int l, int m, int h) {
int size = h - l + 1;
vector<int> B(s... | ALGO | 0.999961 | 5.332028 | {
"github_metadata": {
"branch": "main",
"commit_count": 435,
"repo_created_at": "2025-01-27T09:39:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "85cc805115... |
0ecd6918-3614-44e0-9abd-892a469f28b5 | gustevito/alest1 | codigoexemplo/main.cpp | #include <iostream>
#include <math.h>
#include <sstream>
using namespace std;
// ******************************************
// Classe Funcoes
// ******************************************
class Funcoes {
public:
int f1(int n);
int f2aux(int n);
int f2(int n);
int f4(int n);
... | ALGO | 0.998643 | 4.139007 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-02-27T13:18:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5c44fc48749... |
50e98bdd-0429-4a7e-b6c8-8ceb14bb498c | danial-hossain/Numericals | Online8.cpp | #include <bits/stdc++.h>
using namespace std;
double horners(int arr[], int degree, double x)
{
double sum = arr[0];
for (int i = 1; i <= degree; i++)
{
sum = sum * x + arr[i];
}
return sum;
}
double equation(double h)
{
double y = (2 * h * h * h) - (7 * h * h) + (4 * h) + 1;
int d... | ALGO | 0.999984 | 4.02028 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-06-29T01:54: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": "7a24161719e... |
7c7400f7-085b-4712-b79e-b0fbac77c1fd | LPares01/P1RV | coordScene.cpp | #include "coordScene.h"
bool loadCameraCalib(string name, Mat& cameraMatrix, Mat& distCoefs) {
ifstream instream(name);
if (instream) {
uint16_t rows, cols;
instream >> rows;
instream >> cols;
cameraMatrix = Mat(Size(cols, rows), CV_64F);
for (int r = 0; r < rows; r++) {
for (int c = 0; c < cols; c+... | TOOL | 0.961166 | 4.304633 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-12-15T15:34:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d7583d18765... |
6e65a15c-7561-4a0b-b6f2-142bce1cafa4 | ValveSoftware/source-sdk-2013 | src/game/server/ai_network.h | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef AI_NETWORK_H
#define AI_NETWORK_H
#ifdef _WIN32
#pragma once
#endif
#include "ispatialpartition.h"
#include "utlp... | ALGO | 0.961806 | 5.45461 | {
"github_metadata": {
"branch": "master",
"commit_count": 131,
"repo_created_at": "2013-06-26T22:21:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9165,
"forks": 2667,
"issues": 352,
"pull_requests": 507
},
"file_meta": {
"content_id": ... |
585504ae-799b-49d3-860a-a4d73be84ba3 | thalals/Algorithm_Study | Taewoo/problem_solving/2021.05/2021.05.06/20437.cpp | #include <iostream>
#include <vector>
using namespace std;
int main() {
int T;
cin >> T;
for(int i = 0; i < T; i++) {
string str;
cin >> str;
vector<int> dict[26];
int min_value = 1e9, max_value = -1e9;
int K; cin >> K;
for(int j = 0; j < str.size(); j++)
... | ALGO | 0.999762 | 3.66135 | {
"github_metadata": {
"branch": "main",
"commit_count": 1277,
"repo_created_at": "2021-01-19T15:10:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50e21dc54... |
280caacb-01f9-42e0-93d4-e014fd780691 | everydaymorning/Algorithm-Practice-with-C-plus-plus | TestProject/TestProject/hyundai3.cpp | #include <bits/stdc++.h>
using namespace std;
vector<string> register_id;
string id;
string check(int idx, vector<string> registered_list, string new_id) {
if (idx >= registered_list.size()) {
return new_id;
}
string S, N;
for (int i = idx; i < registered_list.size(); i++) {
if (registered_list[i] == new_id) {
... | ALGO | 0.998779 | 4.316425 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2019-09-23T04:08:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ffa6947... |
7dd347df-742e-4425-88ef-44cc15de0745 | ericljx2020-gmail/Leetcode_exercise | 101-symmetric-tree/symmetric-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99991 | 5.946376 | {
"github_metadata": {
"branch": "master",
"commit_count": 1685,
"repo_created_at": "2023-08-21T15:17: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": "f1c825a... |
68e770b1-81d7-43b0-bd21-b5ff6044825b | vanthaita/Lap-Trinh | LAP02/Bai04/bai4-LAp02.cpp | #include <iostream>
#include <math.h>
using namespace std;
const float PI = 3.14;
class Diem
{
float x;
float y;
public:
Diem(float tungdo = 0, float hoanhdo = 0) // Khoi tao 1 diem
{
this->x = tungdo;
this->y = hoanhdo;
}
void xuat() // xuat toa do mot diem
{
cout <... | ALGO | 0.993835 | 4.042071 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-28T16:39:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a504309105c7... |
4d71d0c3-9e5f-4f61-8ff6-e52fe306486d | kgoel9899/CF_Solutions | codeforces/1722/E.cpp | #include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define mod 998244353
#define int long long
#define setpres cout << fixed << setprecision(10)
#define all(x) (x).begin(), (x).end()
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
const int INF = 1e18;
#ifdef DEBUG
#de... | ALGO | 0.999632 | 4.470209 | {
"github_metadata": {
"branch": "master",
"commit_count": 1962,
"repo_created_at": "2020-12-21T08:58: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": "35b6bb7... |
d22bb256-6494-4a66-801c-fe12e2fa8b97 | Kritsatorn/Competitive-programming | C_year2/Prob_Solve_CPE/Fin62/fin62_doctor.cpp | #include<bits/stdc++.h>
using namespace std ;
struct vertex {
int shortest_path;
int name_vertex ;
int pre = 0 ;
bool operator<(const vertex& a) const{
return shortest_path > a.shortest_path;
}
} ;
struct edge {
int to;
int weight;
};
priority_queue<vertex> q;
vector<struct edge> edges[100010];
int N ... | ALGO | 0.99999 | 3.696277 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-02-17T06:55: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": "89fe8863f6c4... |
afbbf00a-c8b7-4dbe-aec7-24538bc61f2b | yz1019117968/FSE-24-UniTrans | cleaned_data/transcoder_evaluation_gfg/cpp/SUM_SERIES_12_32_52_2N_12.cpp | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include... | ALGO | 0.997891 | 5.287654 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-04-06T11:00:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa33d252d21... |
24518cde-7c29-4bce-a5cd-41695a592389 | LuisAlbertoVasquezVargas/CP | VOC/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define sc( x ) scanf( "%d" , &x )
#define REP( i , n ) for( int i = 0 ; i < n ; i++ )
#define clr( t , val ) memset( t , val , sizeof(t) )
#define all(v) v.begin() , v.end()
#define pb push_back
#define SZ( v ) ((int)(v).size())
#define mp make_pair
#define fi first
#d... | ALGO | 0.999971 | 4.039462 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-02-12T20:18:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ae3577e3a... |
04687738-2a9e-4f68-83f3-faeae1e3da62 | willsonz/DS_Code | chapter3/stack.cpp | typedef int SElemType;
#include "./header/stack.h"
Status InitStack(SqStack &S)
{
// 构造一个空栈S
S.base = (SElemType *)malloc(STACK_INIT_SIZE * sizeof(SElemType));
if( !S.base )
exit(OVERFLOW); // 存储失败
S.top = S.base;
S.stacksize = STACK_INIT_SIZE;
return OK;
}
Status DestroyStack(... | ALGO | 0.953245 | 4.044471 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2014-04-11T15:48: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": "d32282f41... |
f91ca4f0-ee39-4956-b3c2-ae62f407b945 | ft-ayush/p | rai/AI/coloring.cpp | #include <iostream>
#include <vector>
using namespace std;
bool isSafe(int v, const vector<vector<int>>& graph, vector<int>& color, int c) {
for (int i = 0; i < graph.size(); i++) {
if (graph[v][i] && color[i] == c)
return false;
}
return true;
}
bool graphColoringUtil(const vector<vec... | ALGO | 0.999967 | 5.985146 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-07T23:39: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": "cec1c6408817... |
c27caf33-7a4d-4e11-b8bf-dade39c739c7 | ishandutta2007/codeforces-n | nishant403/normal/1472/G.cpp | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int getRand(int l, int r)
{
uniform_int_distribution<int> uid(l, r);
return uid(rng);... | ALGO | 0.999971 | 5.20484 | {
"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": "b7c20f048ce8... |
96d522c8-ee4c-4468-8906-31ac3ec1fbeb | DNA-B/Problem-Solving | 백준/Gold/2174. 로봇 시뮬레이션/로봇 시뮬레이션.cc | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
int A, B, N, M;
int board[101][101];
vector<tuple<int, int, char>> robot(101); // {x, y, dir}
void change_dir(int n_robot, char order)
{
if (order == 'L')
{
if (get<2>(robot[n_robot]) == 'N')
get<2>(robot[n_robot]) = 'W';
else if ... | ALGO | 0.999953 | 4.177469 | {
"github_metadata": {
"branch": "main",
"commit_count": 1767,
"repo_created_at": "2022-09-22T10:06: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": "ef2b3aa16... |
47f22ca8-047d-4fc4-abb1-1db39109ae30 | wisdompeak/LeetCode | Divide_Conquer/1649.Create-Sorted-Array-through-Instructions/1649.Create-Sorted-Array-through-Instructions_SegmentTree.cpp | class Solution {
class SegTreeNode
{
public:
SegTreeNode* left;
SegTreeNode* right;
int start, end;
int info;
SegTreeNode(int a, int b):start(a),end(b),info(0),left(NULL),right(NULL){}
};
void init(SegTreeNode* node, int a, int b) // init for... | ALGO | 0.999992 | 5.459285 | {
"github_metadata": {
"branch": "master",
"commit_count": 8912,
"repo_created_at": "2017-03-01T10:30:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6018,
"forks": 1314,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "e... |
67585713-6c75-49b9-8c6a-f0907656ccc3 | I-love-Meat-Fr/doubly-linked-list | test4.cpp | #include <bits/stdc++.h>
#include <string>
#include <Windows.h>
#include <cstdlib>
using namespace std;
struct Diem
{
float diem;
string masinhvien;
string mamonhoc;
};
struct monhoc
{
string tenmon;
float tinchi;
Diem diem;
};
struct node
{
string tensinhvien;
string tenlop;
flo... | TOOL | 0.993193 | 3.06432 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-06-25T14:33: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": "767d596347ea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.