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 |
|---|---|---|---|---|---|---|---|
8bfb6fcb-46d0-4d7b-b758-bf0734dee860 | jennxsierra/cmps1232 | practice/code-step-by-step/max-value/main.cpp | #include <iostream>
const int arrSize = 6;
int arr[arrSize] = {17, 7, -1, 26, 3, 9};
void printArray(int [], int);
int maxValue(const int [], int);
int main() {
std::cout << "The array currently contains these values:" << std::endl;
printArray(arr, arrSize);
std::cout << std::endl;
std::cout << "\nT... | ALGO | 0.999082 | 4.898085 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-08-23T21:04:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "047b3b8241cd... |
fb5597ca-483f-4374-82a2-ab02f197c0a0 | JBennett46/Computer-Science | M17/P5.cpp | #include<iostream>
#include<fstream>
using namespace std;
void readArrays(int arrayA[10], int arrayB[10], string fileName) {
ifstream f(fileName);
for (int i = 0; i < 10; i++) {
f >> arrayA[i];
}
for (int i = 0; i < 10; i++) {
f >> arrayB[i];
}
f.close();
}
void mergeArrays(int... | ALGO | 0.988516 | 4.335673 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-08-30T01:52: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": "9ca776661156... |
cf669a16-dbb1-4946-b3de-09cc648f03d4 | ishandutta2007/codeforces-t | timsei/normal/1030/G.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const int M = 2e6 + 5;
const int mod = 1e9 + 7;
typedef pair <int, int> pii;
vector <pii> Div[M];
int n, pr[M], cnt, A[N], S[M], K[M];
bitset <M> isp;
namespace {
int add(int x) {return (x >= mod) ? x - mod : x;}
int sub(int x) {return (x < 0... | ALGO | 0.999931 | 4.808588 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27: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": "cae463187d0d... |
65ebffcd-0f0b-4b77-8202-4a77fcbe2534 | hitonanode/cplib-cpp | linear_algebra_matrix/determinant_of_first_degree_poly_mat.hpp | #pragma once
#include "characteristic_poly.hpp"
#include "hessenberg_reduction.hpp"
#include "matrix.hpp"
#include <utility>
#include <vector>
// det(M_0 + M_1 x), M0 , M1: n x n matrix of F_p
// Complexity: O(n^3)
// Verified: https://yukicoder.me/problems/no/1907
template <class T>
std::vector<T> determinant_of_firs... | ALGO | 0.999421 | 5.364919 | {
"github_metadata": {
"branch": "master",
"commit_count": 1134,
"repo_created_at": "2019-08-10T00:24:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 81,
"forks": 11,
"issues": 62,
"pull_requests": 7
},
"file_meta": {
"content_id": "e532... |
84ef5b12-a58c-4e45-8fe1-29703eae264e | LuoshuiTianyi/Code | Luogu/P4111/4111.cpp | #include <cstdio>
#include <iostream>
using namespace std;
#define LL long long
#define go(G, x, i, v) \
for (int i = G.hd[x], v = G.to[i]; i; v = G.to[i = G.nx[i]])
#define inline __inline__ __attribute__((always_inline))
inline LL read() {
LL x = 0, w = 1;
char ch = getchar();
while (!isdigit(ch)) {
if (c... | ALGO | 0.999972 | 3.836748 | {
"github_metadata": {
"branch": "master",
"commit_count": 971,
"repo_created_at": "2019-09-09T08:42: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": "b3245d67... |
66aba18f-1a7b-48a6-99ad-c141c14c0ca4 | SamuelRuwe/sam-does-algorithms | c++/gfg/1_c++/twoDimensionalWorld.cc | // Input Format:
// First line of input contains number of testcases T. For each testcase, first line contains N, size of row and columns of matrix (Number of rows = Number of columns). Next N line contains N integers in each line.
//
// Output Format:
// For each testcase, print the array elements in row-column order ... | ALGO | 0.987836 | 5.416952 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-01-14T12:13: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": "8c3ab624b9... |
9539a80e-adfa-4a4e-988a-c9022feffcb5 | google/skia | src/pathops/SkLineParameters.h | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkLineParameters_DEFINED
#define SkLineParameters_DEFINED
#include "src/pathops/SkPathOpsCubic.h"
#include "src/pathops/SkPathOpsLine.h"
#include "src/pathops/SkPathO... | ALGO | 0.988851 | 6.267965 | {
"github_metadata": {
"branch": "main",
"commit_count": 75918,
"repo_created_at": "2014-01-09T17:09:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9958,
"forks": 1593,
"issues": 0,
"pull_requests": 39
},
"file_meta": {
"content_id": "83... |
ec06124e-6e22-47de-b58e-6d207e3e19ed | lancebrown42/cs01 | dorking/sortThree.cpp | //Write a program which input three numbers and display the largest number using ternary operator.
#include <iostream>
using namespace std;
int main(){
int a, b , c;
cout << "give me 3 integers\n" ;
cin >> a >> b >> c ;
(a < b && b < c) ? cout << a << endl << b << endl << c << endl : (b < a && a < c) ? cout <... | ALGO | 0.999758 | 4.134182 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2014-02-14T18:28: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": "484687235... |
fabe8b2e-3515-469f-b928-548c95d18ccc | jiaqiwang969/deal.II-mini | Translator_file/deal.II/integrators/divergence.h | //include/deal.II-translator/integrators/divergence_0.txt
// ---------------------------------------------------------------------
//
// Copyright (C) 2010 - 2020 by the deal.II authors
//
// This file is part of the deal.II library.
//
// The deal.II library is free software; you can use it, redistribute
// it, and/or... | ALGO | 0.976365 | 3.335972 | {
"github_metadata": {
"branch": "main",
"commit_count": 174,
"repo_created_at": "2021-06-09T08:02:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b476128bfc... |
f016474b-a23e-4d4d-8989-295a1b361291 | CodeWithRitikBoss/_2_Cpp_ProgrammingWithRitik | _2_Cpp_Practice/pirnt forword form, reverse form of your string and print all that using string a.cpp | /* Code a software to pirnt forword form, reverse form of your string and print all that using "string" in C++. */
#include<iostream>
#include<conio.h>
#include<stdlib.h>
#include"string"
using namespace std;
int main(){
system("color 02");
/* **** Use of "string" ****. */
string str= "Code With R... | ALGO | 0.979753 | 4.523334 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-04-21T16:35:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "74111f89db... |
c2a5081b-6964-4dc6-befd-4257b62522a6 | RickKoenig/engq | engqtest/u_gametheory.cpp | #include <m_eng.h>
#define DIM 3
#define RES 50
#if DIM==2
static S32 payoff[DIM][DIM]={
{ 0,-1},
{ 1, 0},
};
#endif
#if DIM==3
static S32 payoff[DIM][DIM]={
{ 0,-1, 1},
{ 1, 0,-1},
{-1, 1, 0},
};
#endif
#if DIM==4
static S32 payoff[DIM][DIM]={
{ 0,-1, 1, 1},
{ 1, 0,-1, 1},
{-1, 1, 0,-1},
{-1,-1, 1, 0},
}... | ALGO | 0.999989 | 3.616375 | {
"github_metadata": {
"branch": "dev",
"commit_count": 107,
"repo_created_at": "2020-02-21T03:48: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": "b2d0d8aaa94... |
30bcc583-d3d9-4cb0-969c-abfc0c690392 | kamyu104/LeetCode-Solutions | C++/number-of-subsequences-with-odd-sum.cpp | // Time: O(n)
// Space: O(1)
// combinatorics, fast exponentiation
class Solution {
public:
int subsequenceCount(vector<int>& nums) {
static const int MOD = 1e9 + 7;
// 2^(odd-1)*2^even = 2^(len(nums)-1)
return any_of(cbegin(nums), cend(nums), [](const auto& x) {
return x % 2 ... | ALGO | 0.999998 | 6.035219 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
31944a0f-e85d-46b0-a27d-6c804d1a82e3 | sejalrai23/DSA-Practise | 2104-sum-of-subarray-ranges/2104-sum-of-subarray-ranges.cpp | class Solution {
public:
long long subArrayRanges(vector<int>& arr) {
int mod=1e9+7;
int n=arr.size();
vector<int> left(n,0), right(n ,0);
stack<int> st;
for(int i=0;i<n;i++){
while(!st.empty() && arr[st.top()]>=arr[i]) st.pop();
if(st.empty()) left[i]... | ALGO | 0.999976 | 5.439287 | {
"github_metadata": {
"branch": "main",
"commit_count": 2811,
"repo_created_at": "2021-11-21T12:48:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ab92a39ca... |
b354479e-cce6-4000-81a8-3d72aaa9f68d | ishandutta2007/codeforces-g | gmusya/normal/868/F.cpp | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
vector <int> a;
vector <int> cnt;
vector <vector <ll>> dp;
int L = 0, R = -1;
ll f = 0;
void add(int val) {
f += cnt[val];
cnt[val]++;
}
void erase(int val) {
cnt[val]--;
f -= cnt[val];
}
void mo(int ne... | ALGO | 0.99987 | 4.241048 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:55: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": "fe2554c070fd... |
d6ca61d3-64ff-4ada-8758-f85d27b3d017 | stonne-simulator/stonne | pytorch-frontend/caffe2/utils/math/reduce.cc | #include "caffe2/utils/math/reduce.h"
#include <algorithm>
#include <cstring>
#include <functional>
#include <numeric>
#include <vector>
#ifdef CAFFE2_USE_ACCELERATE
#include <Accelerate/Accelerate.h>
#endif // CAFFE2_USE_ACCELERATE
#ifdef CAFFE2_USE_MKL
#include <mkl.h>
#endif // CAFFE2_USE_MKL
#include "caffe2/co... | TOOL | 0.988493 | 7.425599 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2020-12-01T17:24:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 134,
"forks": 30,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "038245... |
2f208c50-adb0-40c2-a3ad-0292721f89a1 | deimos-et-fobos/DCEimaging | src/FFT_CODE/fft.h | // fft.h - declaration of class
// of fast Fourier transform - FFT
//
// The code is property of LIBROW
// You can use it on your own
// When utilizing credit LIBROW site
#ifdef __CUDACC__
#define CUDA_CALLABLE_MEMBER __host__ __device__
#else
#define CUDA_CALLABLE_MEMBER
#endif
#ifndef _FFT_H_
#define _FFT... | ALGO | 0.963588 | 6.332339 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2017-11-28T20:46:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f624b24288... |
0f8bede1-a669-4d40-ad84-9741de5d333c | H-berg/Computational-Physics-SS20 | Übungsblatt2/aufgabe01.cpp | #include <iostream>
#include <fstream>
#include <Eigen/Dense>
#include <math.h>
#include "moodle/service.cpp"
using namespace std;
using namespace Eigen;
// zu b) Approximationsfunktion -----------------------------------------------
MatrixXd Approximation(MatrixXd &mat, int k, MatrixXd &U, MatrixXd &V, VectorXd &W)... | ALGO | 0.996345 | 4.039039 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2020-04-22T10:43:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "81ec0927b... |
2531d888-a8ba-4e2e-969f-4d1ee65d4f64 | VitalikGuds/Practic-PS-3-1 | day 2 вектори и матрицы задание 2 .17 .cpp |
//в матрице A(m,n) каждный элемент a(ij)заменить минимальным среди элементов подматрицы A(i,J)расположенной в левом верхнем углу матрицы А
#include<iostream>
#include<cstdlib>
#include<time.h>
using namespace std;
int main()
{
const int n=4;
const int m=4;
const int n2=2;
const int m2=2;
int a [n][m];
... | ALGO | 0.999837 | 3.255447 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-11-14T07:42: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": "fa93cd1b41... |
65193713-6e5f-4183-9264-b197e9125108 | KOTOKORURU/Kinect_SLAM | src/LocalMapper.cpp | #include "LocalMapper.h"
#include "LoopClosing.h"
#include "ORBmatcher.h"
#include "Optimizer.h"
#include
#include <QMutex>
namespace KINECT_SLAM
{
LocalMapping::LocalMapping(Map *pMap):
mbResetRequested(false), mbFinishRequested(false), mbFinished(true), mpMap(pMap),
mbAbortBA(false), mbStopped(false), mbSto... | ALGO | 0.974688 | 4.697071 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-05-03T11:13:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "51cf182fab... |
8471bf11-becf-49fd-8a98-fc84ca747ec6 | ladnir/aby3 | aby3-ML/main-logistic.cpp | #include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
#include <time.h>
#include <cryptoTools/Network/IOService.h>
#include <cryptoTools/Common/CLP.h>
#include <Eigen/Dense>
#include "aby3-ML/Regression.h"
#include "aby3-ML/LinearModelGe... | DATA | 0.953794 | 4.711442 | {
"github_metadata": {
"branch": "master",
"commit_count": 171,
"repo_created_at": "2018-03-28T16:14:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 211,
"forks": 57,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "7245f... |
819614e8-cf04-4e09-ae76-02e8391fe25c | amanzi/amanzi | src/operators/SmoothnessIndicatorShu.cc | /*
Copyright 2010-202x held jointly by participating institutions.
Amanzi is released under the three-clause BSD License.
The terms of use and "as is" disclaimer for this license are
provided in the top-level COPYRIGHT file.
Authors: <NAME> (<EMAIL>)
*/
/*
Operators
This smoothness indicator compares a... | ALGO | 0.998856 | 5.945409 | {
"github_metadata": {
"branch": "master",
"commit_count": 14660,
"repo_created_at": "2016-07-22T18:50:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 50,
"forks": 38,
"issues": 103,
"pull_requests": 5
},
"file_meta": {
"content_id": "268... |
530b8329-7a70-4182-bea9-d70cae8feeb2 | steem-engine/steem-engine | steem/code/acc.cpp | /*---------------------------------------------------------------------------
FILE: acc.cpp
MODULE: Steem
DESCRIPTION: Completely random accessory functions.
---------------------------------------------------------------------------*/
// Porting: GetNearestPaletteIndex get_text_width flush_message_queue
/*void inli... | TOOL | 0.917454 | 5.049779 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2015-04-03T19:52:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 80,
"forks": 9,
"issues": 8,
"pull_requests": 1
},
"file_meta": {
"content_id": "f12fce7e... |
5d24a58b-873a-4853-a1da-9896f47daddf | kevinng77/blenderbot_paddle | paddlenlp/ops/faster_transformer/src/fusion_decoding_op.h | /* Copyright (c) 2021 PaddlePaddle 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 by applicable law or... | DATA | 0.993687 | 7.176523 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2021-08-06T02:12:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3cf592a... |
0045dd7d-24ad-4c73-bd66-31a15a501522 | QianMo/GPU-Pro-Books-Source-Code | GPU-Pro-6/04_Shadows/01_Practical Screen-Space Soft Shadows/GPU_Pro_SSSS/external/include/mymath/mm_quat_func.h | #ifndef mm_quat_func_h
#define mm_quat_func_h
#include "mm_quat_impl.h"
template<typename ty>
mymath::impl::quati<ty> operator*(const mymath::impl::quati<ty>& p, const mymath::impl::quati<ty>& q)
{
const mymath::impl::vec3i<ty> pv = p.vector();
const ty ps = p.scalar();
const mymath::impl::vec3i<ty> qv = q.vect... | TOOL | 0.966677 | 7.355012 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2018-04-25T02:50:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 688,
"forks": 349,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b85b9... |
94f9a4c1-0074-49e9-8fa5-8ffbe3d45258 | alexandraback/datacollection | solutions_5751500831719424_0/C++/WindSnow/TheRepeater.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
using namespace std;
ifstream fin("A-small-attempt0.in");
ofstream fout("A-small-attempt0.out");
#define cin fin
#define cout fout
void run() {
int n;
cin>>n;
string s[100];
for (int i = 0; i < n; ++i)
cin>>s[i];
int ans = 0;
for ... | ALGO | 0.999831 | 3.768186 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52215b38a... |
70dab513-421c-47ad-9b27-d19261aad55d | makio93/competitive-atcoder | abc235/abc235_e/1/main0-2.cpp | // 復習1,自力AC2,クエリ先読みなし解法
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
#define rep(i, n) for (int i=0; i<(int)(n); ++(i))
#define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i))
#define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i))
#define re... | ALGO | 0.999994 | 4.862762 | {
"github_metadata": {
"branch": "main",
"commit_count": 925,
"repo_created_at": "2021-04-23T16:25: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": "915ae3002a... |
82bba126-1394-4aca-ad9e-f00b93f710ac | CGAL/cgal | Spatial_searching/examples/Spatial_searching/user_defined_point_and_distance.cpp | #include <CGAL/Search_traits.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
#include "Point.h" // defines types Point, Construct_coord_iterator
#include "Distance.h"
typedef CGAL::Creator_uniform_3<double,Point> Point_creator;
typedef CGAL::Random_points_in_cube_3<Point, Point_... | ALGO | 0.999687 | 5.667742 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
763fab63-49e5-477a-8001-507cd0284d59 | yurikaka/leetcode | cpp/583.cpp | //583. Delete Operation for Two Strings My SubmissionsBack To Contest
//Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one character in either string.
//
//Example 1:
//Input: "sea", "eat"
//Output: 2
//Explanation: You need... | ALGO | 0.99999 | 5.210926 | {
"github_metadata": {
"branch": "cpp",
"commit_count": 23,
"repo_created_at": "2017-01-30T12:57:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb0ee8a08416... |
5539e9f8-995f-4694-9ac8-27df9a02795e | hogwarts-mp/mod | code/client/src/sdk/Runtime/Core/Private/Misc/ConfigCacheIni.cpp | // Copyright Epic Games, Inc. All Rights Reserved.
#include "Misc/ConfigCacheIni.h"
#include "Containers/StringView.h"
#include "Misc/DateTime.h"
#include "Misc/MessageDialog.h"
#include "HAL/FileManager.h"
#include "Misc/FileHelper.h"
#include "Misc/CommandLine.h"
#include "Math/Vector4.h"
#include "Stats/Stats.h"
#... | TOOL | 0.92817 | 3.264385 | {
"github_metadata": {
"branch": "main",
"commit_count": 110,
"repo_created_at": "2023-02-12T16:57:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 50,
"forks": 8,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "835fbf34ef... |
82ab3570-7632-44c8-a85a-6e54c9732369 | HanYouyang/Computer | 数据结构与算法/@4/Others/4. 算法基础/1.编程作业-枚举/编程题#1: 画家问题/编程题#1: 画家问题/main.cpp | //
// main.cpp
// 编程题#1: 画家问题
//
// Created by CYC on 11/22/15.
// Copyright © 2015 CYC. All rights reserved.
//
#include <iostream>
#include<cmath>
#include<memory.h>
using namespace std;
int n;
int map[18][18] ;
int press[18][18] ;
void init()
{
cin >> n;
memset(map,0,sizeof(map));
memset(press,0,... | ALGO | 0.999954 | 3.309605 | {
"github_metadata": {
"branch": "master",
"commit_count": 133,
"repo_created_at": "2017-03-19T03:43:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eba8802d... |
78de535f-da5a-4121-b279-ac7476d69330 | seeman1978/c__20 | OOP/inherit2.cpp | //
// Created by 王强 on 2020/12/3.
//
#include <string>
#include <iostream>
#include <vector>
struct A{
A()=default;
A(int i, std::string str):m_i{i}, m_str{std::move(str)}{
}
virtual void func(){
std::cout << "I am A." << m_str << " " << m_i << '\n';
}
protected:
int m_i=0;
std:... | TOOL | 0.961593 | 5.430339 | {
"github_metadata": {
"branch": "master",
"commit_count": 388,
"repo_created_at": "2020-02-22T04:44: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": "6ede5e50... |
169e5059-aa39-4b29-a0f6-c8428ab37dd6 | YCCss/CLionTest | Game/Tetris/Game_Tetris1.cpp | #include <conio.h>
#include <cstdio>
#include <graphics.h>
//基本成功版本, 每次只会清除一行满的方块
// 游戏区域大小
const int WIDTH = 10; // 宽度
const int HEIGHT = 20; // 高度
const int NUMBER_TETRIS = 7; //方块的种数
// 方块类型及其形状定义
enum TetrominoType {
I, J, L, O, S, T, Z
};
const int TETROMINO_SIZE = 32; // 方块的大小(边长)
const int MATRIX_SIZE =... | ALGO | 0.98054 | 3.448061 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-11-25T05:14: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": "924646ce8d... |
0e251dc0-d057-44c2-9c4b-e79c1f8b0f1b | mei-jun/cross---species | 2017GetEvolvingComplex/2017GetEvolvingComplex/graph.h | #include "stdafx.h"
#include "graphhead.h"
class Graph //用邻接列表表示的图结构
{
public:
std::vector<Node*> m_NodeArray; //节点数组
int m_nNumEdges;
std::vector<Clique*> m_CliqueArray;
public:
Graph() {
}
Graph(const char* scFileName, const bool weight) {//载入初始的图信息
GraphLoader rawGraph(scFileName, w... | ALGO | 0.997954 | 3.016023 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-04-29T07:36: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": "d43c1dbd3c... |
48cae371-9e25-4fa3-86d5-22285aff0011 | gnishida/LSystem | DerivationTree/ParametricLSystem.h | #pragma once
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/string_cast.hpp>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <vector>
#include <map>
using namespace std;
namespace parametriclsystem {
class State {
public:
double diameter;
glm::mat4 modelMat;
glm::vec... | TOOL | 0.992616 | 5.650399 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2015-05-02T03: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": "0952f05db... |
13491669-c1c6-4e47-9140-90511d5d3780 | mission-peace/interview | C++/Graph Algorithms/Prims Minimum Spanning Tree Algorithm.cpp | #include<iostream>
#include<climits>
#include<vector>
#include<queue>
#include<list>
using namespace std;
const int INF = INT_MAX;
class edge{ public: int src,des,weight; edge(){}edge(int s,int d,int w): src(s),des(d),weight(w){}};
class compare { public: bool operator()(const edge &a,const edge &b){ return a.weight ... | ALGO | 0.999993 | 4.441959 | {
"github_metadata": {
"branch": "master",
"commit_count": 805,
"repo_created_at": "2014-07-20T21:27:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11185,
"forks": 5177,
"issues": 61,
"pull_requests": 114
},
"file_meta": {
"content_id":... |
fa1e223d-244c-4579-bf90-262ec59d3f6d | diligentliu/Algorithm | src/solution/lc3072.h | #pragma once
#ifdef LOCAL_LEETCODE
#include "main.h"
namespace LC_3072 {
namespace Test {
vector<int> nums = {2, 1, 3, 3};
} // namespace Test
#endif
class Fenwick {
public:
vector<int> tree;
Fenwick(int n) : tree(n) {}
void add(int i) {
while (i < tree.size()) {
tree[i]++;
... | ALGO | 1 | 5.984973 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2024-03-04T06:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "161204be0... |
05349fe1-0cec-4e6b-8379-90ecc55ade25 | SvetlanaRedchenko/bulls-and-cows | BullsAndCows/src/Sequence.cpp | #include "Sequence.h"
#include <algorithm>
#include "Answer.h"
#include "Characteristics.h"
#include "Helper.h"
Sequence::Sequence() : symbols_() {
}
Sequence::Sequence(const std::string& sequence)
: Sequence() {
for (auto c : sequence) {
symbols_.push_back(c);
}
}
bool Sequence::operator==(const Sequence& ot... | ALGO | 0.970093 | 5.475952 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2019-09-16T11:05:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "ffaecf32d... |
2abd066d-aa4f-49c5-82e1-4a44a8f552d2 | OTOY-NZ/OctaneBlender | blender/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc | /* SPDX-FileCopyrightText: 2013 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "COM_PlaneDistortCommonOperation.h"
#include "BLI_jitter_2d.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BKE_tracking.h"
namespace blender::compositor {
PlaneDistortBaseOperation::Pla... | ALGO | 0.972765 | 6.909981 | {
"github_metadata": {
"branch": "master",
"commit_count": 142,
"repo_created_at": "2013-08-29T02:43:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27,
"forks": 8,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "78cf3d55... |
f5a6274e-d505-49aa-b0a1-085b24fc218b | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/08/0826/personal_submission/cf432c_djl777.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n; cin >> n;
vector<int> a(n), pos(n);
for (int i = 0; i < n; i++) {
cin >> a[i]; a[i]--;
pos[a[i]] = i;
}
vector<int> primes;
vector<bool> isprime(n + 1, true... | ALGO | 0.999819 | 3.735412 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "46d0... |
69c1b3aa-2e44-4ec6-be6e-89eec6b5dc4c | GonzaloPereira/CompetitiveProgramming | Codeforces/1323/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define FIO ios_base::sync_with_stdio(false), cin.tie(NULL);
#define N 40005
ll n,m,k;
ll a[N],b[N];
ll p1[N], p2[N];
int main(){
FIO;
cin >> n >> m >> k;
for(int i = 0 ; i < n ; i++){
cin >> a[i];
}
a[n] =... | ALGO | 0.999969 | 3.488412 | {
"github_metadata": {
"branch": "main",
"commit_count": 86,
"repo_created_at": "2019-06-03T22:10:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "495c2d4bc6a... |
7d708a18-7eff-4097-8df9-f4bacf7fa624 | wxz1003083273/OPENSTA | OpenSTA_wr/search/PathAnalysisPt.cc | // OpenSTA, Static Timing Analyzer
// Copyright (c) 2019, Parallax Software, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) a... | ALGO | 0.989234 | 6.580272 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-03-20T08:50: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": "533811762b... |
bcd8d7bb-1a14-42b3-92ff-476f5709b960 | tbui468/raytracer | src/RayTracer.cpp | #include <iostream>
#include <fstream>
#include "RayTracer.h" //common headers (including stb_image)
#include "Sphere.h"
#include "HitableList.h"
#include "Camera.h"
#include "Material.h"
#include "Color.h"
#include "BVH.h" //bounding volumne hierarchy
#include "AARect.h" //axis-aligned rectangles
#include "Box.h"
#i... | ALGO | 0.973195 | 4.81713 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2020-06-01T02:36: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": "7450cf42d... |
ab9aab0f-89a5-449c-9154-8fa3b1ba6932 | anonymouss/my-leetcode-cpp | src/0240-Search-a-2D-Matrix-II.cpp | /**
* Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the
* following properties:
*
* Integers in each row are sorted in ascending from left to right.
* Integers in each column are sorted in ascending from top to bottom.
*
* Example:
* Consider the following matrix:
*... | ALGO | 0.999903 | 6.649509 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2018-10-17T17:39:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aeeaf616... |
84bf42fe-4301-4efa-a598-d1f2defdd674 | Divya097/CSA0426-Operating-System | 18-07-24/SJF.cpp | #include <stdio.h>
struct Process {
int pid;
int arrival_time;
int burst_time;
int completion_time;
int waiting_time;
int turnaround_time;
};
void calculateTimes(struct Process processes[], int n) {
int time = 0, completed = 0;
int min_burst_time, shortest;
int is_completed[100] = ... | ALGO | 0.999651 | 5.377545 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-07-18T06:36: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": "fcbcf4cb1de9... |
445470a8-74d1-4ec3-9cb4-4d0dda67d6bd | zongxinqi/Code | C-C++/acm/堆排序.cpp | #include <stdio.h>
#include <algorithm>
#include <string.h>
#include <queue>
#include <iostream>
using namespace std;
typedef long long ll;
const int N = 1005;
const int INF = 0x3f3f3f3f;
int num[N];
void HeapAdjust(int mother, int len)
{
int tmp = num[mother];
for(int i = ... | ALGO | 0.999958 | 3.465306 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-04-11T05:36:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "712864c13c... |
210e19e3-d7d6-4b80-b50d-6e58606fda88 | jk-jung/problem-solving | codeforces/Codeforces Round 40x/R401_div2_B.cpp | #include <cstring>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <set>
#include <map>
#include <array>
#include <stack>
#include <queue>
#include <vector>
#include <numeric>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef vector<i... | ALGO | 0.999977 | 3.422568 | {
"github_metadata": {
"branch": "main",
"commit_count": 1582,
"repo_created_at": "2021-06-24T13:40:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "223767b03... |
a882c2e1-3936-40e4-b373-1d349ad8a37a | raincross7/code-similarity | codes/train_code/problem012/problem012_398.cpp | #include <bits/stdc++.h>
using namespace std;
// 型定義
typedef long long ll;
typedef pair<ll, ll> P;
// forループ
#define REP(i,n) for(ll i=0; i<(ll)(n); ++i)
// 定数宣言
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
// グラフ表現
using Graph = vector<vector<int>>;
// グラフの辺表現
using Edge = map<pair<int,int>,i... | ALGO | 0.999921 | 3.781677 | {
"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": "253f5c35f171... |
cce979bd-0c32-422d-a841-8a2ce0fc1203 | jaeseung-lee/ps | codeforces/WrongAddition.cc | #include <iostream>
#include <string>
using namespace std;
#define endl '\n'
#define ll long long
int t;
ll a, s;
ll pow10[36];
void input();
void solve();
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
input();
solve();
return 0;
}
void input() {
cin >> t;
ll value = 1;... | ALGO | 0.996758 | 3.643477 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2021-09-20T13: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": "63cf054db60... |
e45fd294-513e-4655-a734-4e3a2243ae4d | PLUkraine/QML-TicTacToe | src/opponents/perfectai.cpp | #include "opponents/perfectai.h"
#include <QtConcurrent/QtConcurrentRun>
#include <QDebug>
using std::get;
PerfectAi::PerfectAi(QObject *parent)
: IGameOpponent(parent),
m_cancel(false)
{
}
PerfectAi::~PerfectAi()
{
PerfectAi::cancelComputation();
}
void PerfectAi::startComputation(GameBoard *board, b... | ALGO | 0.969032 | 5.106667 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2018-09-03T16:19: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": "8ea8ef930... |
96fe803e-5d81-4717-af5c-2aff71ac4a02 | Eunno-An/LeetCode | Weekly Contest 293/Maximum Consecutive Floors Without Special Floors.cpp | 6분 33초
앨리스가 빌딩에 있는 몇몇의 층을 빌렸다.
이러한 층들 중에서 몇몇은 special floors가 되어야 한다고 다짐했다.
bottom과 top이라는 정수 두개가 주어진다. bottom~top까지의 모든 층을 빌렸다는 얘기이다.
special이라는 정수도 주어지는데, special[i]는 special 층을 의미한다.
special floor 없이 연속적인 층의 최대 수를 리턴해라.
제한:
special.length <= 십만
bottom <= special[i] <= top <= 십억
special의 모든 수는 유일하다.
해결방법:
구간을 다루는 문... | ALGO | 0.99955 | 5.538662 | {
"github_metadata": {
"branch": "main",
"commit_count": 1135,
"repo_created_at": "2021-11-29T14:34:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "de32169b... |
51df3af7-d7c7-496d-b755-a2f81de6755e | Arghya0802/Striver-SDE-Sheet-Challenege | 11. Binary Search/Find Nth Root of M.cpp | // Link:
// ------------------------------------------------------
/* Approach:
1. Our answer will always be within the range [1... M ]. Thus we can easily apply BinarySearch for our answer.
2. If pow(mid, N) == M, it means this is our possible answer so we directly return mid.
3. Else if pow(mid, N) < M, we need a bi... | ALGO | 0.999942 | 5.133423 | {
"github_metadata": {
"branch": "main",
"commit_count": 261,
"repo_created_at": "2023-06-04T12:38:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5facb6a0f2... |
852c2275-a6e2-4119-b75c-bab8299829ed | wangying95599/coderep | bin/com/coderep/alg/study/bat/面试算法_源码/MaxSeq.cpp | // MaxSeq.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int MaxSequence(const int* a, int size)
{
int* p = new int[size];
int i;
for(i = 0; i < size; i++)
p[i] = 1;
int m = 1;
for(i = 1; i < size; i++)
{
if(a[i] - a[i-1] == 1)
{
p[i] += p[i-1];
m = max(p[i], m... | ALGO | 0.999895 | 4.083059 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2018-06-07T08:17:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ba7d882d... |
41a59cc7-f12a-4b83-b876-f8b82d2916bd | cccc1412/oceanbase-2022 | src/sql/engine/aggregate/ob_adaptive_bypass_ctrl.cpp | /**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BAS... | ALGO | 0.997194 | 5.447932 | {
"github_metadata": {
"branch": "2022_competition",
"commit_count": 1608,
"repo_created_at": "2022-11-09T08:58:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id"... |
3872a11c-a23e-41b3-a26a-760b72267be4 | Param129/codeforces | 1996/d.cpp | #include<bits/stdc++.h>
using namespace std;
int cntdig(int n) {
int cnt = (int)(log10(n) + 1);
return cnt;
}
int revNum(int n) {
int rev = 0;
while(n > 0) {
rev = rev * 10 + n % 10;
n /= 10;
}
return rev;
}
bool checkNumPalindrome(int n) {
return n == revNum(n);
}
int gc... | ALGO | 0.999893 | 5.304667 | {
"github_metadata": {
"branch": "master",
"commit_count": 219,
"repo_created_at": "2024-05-21T15:24: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": "e53e7cf4... |
74bebcbe-9d0d-4846-b458-f09d56d0a366 | TimeDelta/submodularity-for-data-selection | scripts/opengrm-ngram/src/lib/ngram-shrink.cc | // ngram-shrink.cc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, so... | ALGO | 0.9912 | 5.863228 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-09-28T15:12:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97dfa76b2e... |
6bb26430-529b-4680-9683-6b8b70003cf4 | an0520a/boj | BOJ_12865.cpp | #include <stdio.h>
#include <stdbool.h>
#include <malloc.h>
#include <memory.h>
typedef unsigned int u32;
typedef struct _stuff
{
u32 weight;
u32 value;
} stuff;
using namespace std;
u32 getMaxValue(u32 bagSize, stuff* stuck, u32 stuckSize);
int main()
{
u32 N, K;
scanf(" %u %u", &N, &K);
stuff... | ALGO | 0.999978 | 3.788629 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2022-08-20T13:53: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": "1c60042c2... |
f6ebece4-aeb6-4048-a9ef-9bcf48cdfc29 | tossenxD/adventofcode | 2023/13.cpp | #include "Common/parsing.hpp"
#include <iostream>
#include <cstdint>
#include <vector>
// No comments since right hand is injured and therefore am slow at writing
#define PART 2
typedef uint32_t Row;
typedef std::vector<Row> Pattern;
void print_Pattern(size_t n, Pattern in) {
for (size_t i = 0; i < in.size(); i... | ALGO | 0.999368 | 5.044322 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2023-12-03T21:16:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64bab2fdbc4... |
42bd85f8-bec5-4043-87e0-c56c155ceb56 | firiexp/contest_log | atcoder/ABC/003B.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <map>
#include <queue>
static const int INF = 1000000007;
using ll = long long;
using u32 = unsigned;
using namespace std;
int main() {
string s, t, u = "atcoder";
cin >> s >> t;
for (int i = 0; i < s.length(); ++i) {
... | ALGO | 0.99994 | 3.657628 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-09-25T02:26: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": "c49bafb05... |
3807072a-4213-40dc-b798-52b95f8bddc6 | Codensity30/Strivers-A2Z-DSA-Sheet | 06.Bit Manipulation/2. Interview Problems/01. Minimum bit flips.cpp | /*
QUESTION:
A bit flip of a number x is choosing a bit in the binary representation of x and flipping it from either 0 to 1 or 1 to 0. Given two integers start and goal, return the minimum number of bit flips required to convert start to goal.
Example:
Input: start = 10, goal = 7
Output: 3
Explanation: The binary rep... | ALGO | 0.999866 | 6.101457 | {
"github_metadata": {
"branch": "main",
"commit_count": 88,
"repo_created_at": "2023-05-29T13:38:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 213,
"forks": 70,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2f084318... |
4d465871-8df2-4243-bc90-65190d648af2 | kunyavskiy/competitive-programming-archive | atcoder.jp/agc47/B.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <sstream>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <cstdlib>
#include <cstdio>... | ALGO | 0.999901 | 3.598184 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2022-10-08T20:56:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b475d60675... |
09e3001c-2dbe-4d43-8433-67a7c2363f0a | haru210/atcoder | ABC325/C.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pint = pair<int,int>;
using pll = pair<long long, long long>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i,n) for (int i = 1; i <= (int)(n); i++)
#define YesNo(bool) if(bool) cout << "Yes" << endl; else cout << "No" << end... | ALGO | 0.999801 | 4.299897 | {
"github_metadata": {
"branch": "master",
"commit_count": 439,
"repo_created_at": "2023-05-18T08:20: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": "d536d303... |
00ede2fc-baed-4c3a-9391-b092daf060ba | piyushraj6161/Complete-DSA | Lowest_Common_Ancestor_Binary_Tree.cpp | #include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int val)
{
data = val;
left = NULL;
right = NULL;
}
};
bool getpath(node *root, int key, vector<int> &path)
{
if (root == NULL)
{
return false;
... | ALGO | 0.999992 | 5.08204 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-07-13T06:31:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9375d3d453b3... |
6797900e-8834-4ed7-abd4-06a40f167626 | MrAhsan777/DATA_STRUCTURE_LABS | DS-LAB-03/Ex3.cpp | #include <iostream>
using namespace std;
int main() {
const int size = 3;
int matrix[size][size] = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
cout << "The given matrix is:" << endl;
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
cout << ma... | ALGO | 0.999763 | 5.276613 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-10-21T16:10: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": "7e8b6d55982... |
d3da6d70-ae1f-44a7-9f1a-6e05518a5e5d | Tlouel/DijkstraAstar | Dijkstra_Algorithm/Dijkstra_Algorithm/Algo.h | #pragma once
#include <iostream>
#include <map>
#include <list>
#include <algorithm>
#include <set>
using namespace std;
template <typename T>
class Graph {
map<T, list<pair<T, int>>> I;
public:
void Connect(T x, T y, int wt) {
I[x].push_back({ y, wt });
I[y].push_back({ x, wt });
}
void Print() {
for ... | ALGO | 0.999244 | 4.788331 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-02-28T20:19: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": "d8459b683669... |
136760a9-9f35-4226-b8a4-81ed57246f5c | abbyshah02/Coding-Practice | Top VIew of a Binary Tree.cpp | /*
Please note that it's Function problem i.e.
you need to write your solution in the form of Function(s) only.
Driver Code to call/invoke your function would be added by GfG's Online Judge.*/
//Structure of binary tree
/*struct Node
{
int data;
struct Node* left;
struct Node* right;
};*/
// function shou... | ALGO | 0.999977 | 4.433507 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2017-10-12T09:56: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": "a438dd5bab... |
9875cb3a-70dd-4bfc-9f1c-28e67a4ac84b | Nastua1309/ADS-3 | src/alg.cpp | #include "tstack.h"
#include <string>
#include <utility>
int un_num(const char& sim)
{
std::pair<char, int> priority[6];
priority[0].first = '('; priority[0].second = 0;
priority[1].first = ')'; priority[1].second = 1;
priority[2].first = '+'; priority[2].second = 2;
priority[3].first = '-'; priority[3].second = ... | ALGO | 0.999567 | 4.294195 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-04-17T09:05:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 75,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb28f6cfa... |
f042c553-c2a6-4b7f-8945-6772fe45c5d1 | GeirHo/Optimization | NonLinear/DIRECT.hpp | /*==============================================================================
DIRECT: DIviding RECTangles
The DIviding RECTangles algorithm for global optimization [1] is based on
systematic division of the search domain into smaller and smaller
hyperrectangles. The "locally biased" variant [2] makes the algorithm ... | ALGO | 0.999214 | 5.984688 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-05-30T08:28: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": "f418c7691f... |
a7c9875b-9341-4770-bb69-27b16944ed86 | maksimKorzh/chess_programming | didactic_engines/fruit/value.cpp |
// value.cpp
// includes
#include "piece.h"
#include "search.h"
#include "util.h"
#include "value.h"
// variables
int ValuePiece[PieceNb];
// functions
// value_init()
void value_init() {
int piece;
// ValuePiece[]
for (piece = 0; piece < PieceNb; piece++) ValuePiece[piece] = -1;
ValuePiece[Empt... | ALGO | 0.995316 | 6.924901 | {
"github_metadata": {
"branch": "master",
"commit_count": 229,
"repo_created_at": "2020-07-29T07:55:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 85,
"forks": 26,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "80835d... |
81d088ba-0363-4ce9-a572-954a4864eed4 | ishandutta2007/codeforces-z | zhylj/normal/1615/D.cpp | #include <bits/stdc++.h>
#define gc() getchar()
template <typename T> inline void rd(T& x) {
int si = 1; char c = gc(); x = 0;
while(!isdigit(c)) si = c == '-' ? -1 : si, c = gc();
while(isdigit(c)) x = x * 10 + c - 48, c = gc();
x *= si;
}
template <typename T, typename... Args>
inline void rd(T& x, Args&... args... | ALGO | 0.999672 | 3.982396 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:43:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "945cd7dade0e... |
c199224c-b036-4e68-9922-54339611a26e | hku-mars/SUPER | rog_map/src/rog_map/prob_map.cpp | /**
* This file is part of ROG-Map
*
* Copyright 2024 <NAME>, MaRS Lab, University of Hong Kong, <mars.hku.hk>
* Developed by <NAME> <renyf at connect dot hku dot hk>
* for more information see <https://github.com/hku-mars/ROG-Map>.
* If you use this code, please cite the respective publications as
* listed on the abov... | ALGO | 0.96082 | 3.250303 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2024-12-19T09:07:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 537,
"forks": 78,
"issues": 9,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2e92eb... |
4a2694d4-30b8-4bb0-8d9d-27e4dbd881b6 | esmf-org/esmf | src/Infrastructure/Mesh/src/Moab/mesquite/QualityImprover/OptSolvers/TrustRegion.cpp | /* *****************************************************************
MESQUITE -- The Mesh Quality Improvement Toolkit
Copyright 2007 Sandia National Laboratories. Developed at the
University of Wisconsin--Madison under SNL contract number
624796. The U.S. Government and the University of Wisconsin
... | ALGO | 0.999808 | 3.251035 | {
"github_metadata": {
"branch": "develop",
"commit_count": 28124,
"repo_created_at": "2020-02-03T17:42:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 184,
"forks": 85,
"issues": 89,
"pull_requests": 10
},
"file_meta": {
"content_id": "b... |
7a442b5a-82fc-43b9-8af0-2d9290f3aecd | lelehola/NMLT_MaTran | Bai024.cpp | #include <iostream>
#include <iomanip>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <string>
using namespace std;
string getInputFileName(int);
void Nhap(int[][500], int&, int&, string);
void Xuat(int[][500], int, int);
int TongChan(int[][500], int, int);
int main()
{
int b[500][500];
int k;
int... | ALGO | 0.999424 | 3.931742 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2022-05-12T07:34:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "643275e716... |
09ec12ad-5a8a-40a3-b8b4-93368d747b1f | SJMA11723/Problem-solving | codeforces/Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round)/B.cpp | /**
* Author: <NAME>
* Github: https://github.com/SJMA11723
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t; cin >> t;
while(t--){
int n, x; cin >> n >> x;
map<int, int> cnt;
int arr[n];
for(... | ALGO | 0.999915 | 4.180798 | {
"github_metadata": {
"branch": "main",
"commit_count": 558,
"repo_created_at": "2022-10-19T22:29: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": "084713ae94... |
5455b631-1c10-4896-ae2d-b754f6b16cea | trilinos/Trilinos | packages/rol/src/step/fletcher/ROL_FletcherBase.hpp | // @HEADER
// *****************************************************************************
// Rapid Optimization Library (ROL) Package
//
// Copyright 2014 NTESS and the ROL contributors.
// SPDX-License-Identifier: BSD-3-Clause
// *************************************************************************... | ALGO | 0.972654 | 7.250684 | {
"github_metadata": {
"branch": "master",
"commit_count": 104031,
"repo_created_at": "2015-11-16T19:39:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1299,
"forks": 593,
"issues": 263,
"pull_requests": 61
},
"file_meta": {
"content_id":... |
315502a1-099b-4f99-886a-7b49779f110b | Rolight/ACM_ICPC | Not_Classified/POJ_3308.cpp | #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <climits>
#include <string>
#include <iostream>
#include <map>
#include <cstdlib>
#include <list>
#include <set>
#include <queue>
#include <stack>
using namespace std;
typedef long long LL;
const int maxn = 105;
const double INF = 1e6... | ALGO | 0.999746 | 3.308799 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2014-12-10T08:06: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": "94ccb4a9e... |
e18301b5-17b9-4ee3-a951-fb80230c7230 | kinetic-rb/kinetic-rb.github.io | code/CF1105C.cpp | // Please submit with C++14! It's best to use C++17 or higher version.
#ifndef LOCAL
#pragma region HEAD // Spectre
#endif
#include <algorithm> // By rbtree (https://rbtree.archi)
#include <array>
#include <bitset>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include ... | ALGO | 0.999955 | 4.83203 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2022-11-19T06:37: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": "a891e6e3eb3... |
695536c5-695c-469d-a3a4-d0bdd1668b36 | yu1206/test57_1 | test57.cpp |
#include "MSRCR.h"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <io.h>
#include <Windows.h>
#include "opencv\cv.h"
#include "opencv\highgui.h"
#include <direct.h>
using namespace cv;
using namespace std;
extern void SplitString(const string& s, vector<strin... | DATA | 0.904005 | 3.324966 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-01-09T10:12: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": "ff3dbb2248... |
d387d875-d363-4195-a4e2-a84bec456002 | D-Fate/Algorithms | lab6.cpp | // Лабораторная работа 6:
// Разработать алгоритм, написать и выполнить программу,
// осуществляющую поразрядную сортировку элементов динамического списка А,
// состоящего из 50 элементов. Элементами являются даты текущего столетия,
// представленные в виде одной строки, в которой день и год
// записаны цифрами (день... | ALGO | 0.999414 | 5.035329 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-08T19:47: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": "e35a33f9d48b... |
ecaa7e40-e277-421d-9114-b86bf3718d97 | 11aw/laba | main (3).cpp | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | ALGO | 0.999609 | 3.73782 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-03-27T16:28: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": "97db8793c9... |
9eb8b83c-b054-4f03-9987-902c3a431190 | palmerc/lab | development/lang/srilm/lm/src/BayesMix.cc | /*
* BayesMix.cc --
* Bayesian mixture language model
*
*/
#ifndef lint
static char Copyright[] = "Copyright (c) 1995-2006 SRI International. All Rights Reserved.";
static char RcsId[] = "@(#)$Header: /home/srilm/devel/lm/src/RCS/BayesMix.cc,v 1.12 2006/08/12 06:46:11 stolcke Exp $";
#endif
#ifdef PRE_ISO_CXX
# ... | TOOL | 0.993964 | 6.592763 | {
"github_metadata": {
"branch": "master",
"commit_count": 1844,
"repo_created_at": "2014-02-10T20:53:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bbd70b5... |
3369a06f-12e7-490f-a43c-377ef23887b7 | JimboChien/AIV-phone-controlled | Arduino/avoid_obstacles/avoid_obstacles.ino | // ==============================================================
// Author: JimboChien
// Date Created: 2020/08/22
// Last Updated: 2021/03/11
// Description: integrate ir and servo to auto avoid obstacles
// ==============================================================
#include<Servo.h>
Servo servor... | TOOL | 0.95069 | 5.052491 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-03-11T15:50: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": "6e7c875f5eee... |
f6812bb7-b167-43d5-be8e-a3b8e2fa9828 | ishandutta2007/codeforces-b | bicsi/normal/1408/E.cpp | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
struct DSU {
vector<int> link;
DSU(int n) : link(n, -1) {}
int Find(int x) {
if (link[x] == -1) return x;
... | ALGO | 0.999889 | 3.426205 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05: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": "54dc1f94cc82... |
28ca2f6e-78b6-482d-8081-f70d0ea7975e | SawanKumarJindal/CPlusPlus | cpp_Ass1/ABC/main.cpp | #include <iostream>
#include<fstream>
#include<iomanip>
#include<string>
#include<map>
#include<cstdlib>
using namespace std;
/*
* This is the main method which will first take the file value and
* with each string at a time and parsing over it character-wise,
* it will it will detect non-alphabetic characters. If ... | TOOL | 0.987714 | 3.484042 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-10-01T16: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": "1bb740436a... |
d76c80fa-52b8-4400-8dab-f9b41256a526 | isaurabhkr/Cpp-Practice | Bonus.cpp | #include<iostream>
#include<cmath>
using namespace std;
int binary_search(int arr[],int f,int l,double key)
{
int pos;
while((arr[f]<key && key<arr[l]) || (arr[f]>key && key>arr[l]))
{
int mid=(f+l)/2;
if(key==arr[mid])
return mid;
if(key>arr[mid])
{
l... | ALGO | 0.99999 | 4.269727 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-01-21T13:07:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a8d10a37... |
bfb629b9-6066-4aa3-afde-aea7142cb225 | Algo-Master/LeetCode_BestDSA | 0144-binary-tree-preorder-traversal/0144-binary-tree-preorder-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.999996 | 6.365752 | {
"github_metadata": {
"branch": "main",
"commit_count": 368,
"repo_created_at": "2024-08-09T17:58: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": "a7d1c21bbe... |
f100a82e-1a0f-4fdf-b140-395c8b7ba2bf | chengts95/EED | EED_VC/seu_nsga2/tourselect.cpp | /* Tournamenet Selections routines */
#include "basicfun.h"
/* Routine for binary tournament */
individual* tournament (int nobj,individual *ind1, individual *ind2)
{
int flag;
flag = check_dominance(nobj,ind1, ind2);
if (flag==1)
{
return (ind1);
}
if (flag==-1)
{
return (... | ALGO | 0.999993 | 5.80411 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-01-15T13:45:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "28e8ac4f1e... |
ad164dd1-a5bc-41b9-9a8c-fac46e33013a | ishandutta2007/codeforces-s | savinov/normal/611/A.cpp | #include <bits/stdc++.h>
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define in(x) int (x); input((x));
#define x first
#define y second
typedef int itn;
#define next next12345
#define prev prev12345
#define left lefdsf232
#define right rig4... | ALGO | 0.999736 | 3.2472 | {
"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": "2507a11a6c56... |
7d3a39f5-f607-4913-828b-60ad83433434 | raincross7/code-similarity | codes/train_code/problem144/problem144_117.cpp | #include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep... | ALGO | 0.99996 | 4.040219 | {
"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": "36a3d04b3874... |
ba90e2b7-3175-4422-84f5-1b5628c1e073 | decyphir/breach | @STL_Formula/private/src/robusthom/signal.h | #ifndef SIGNAL_H
#define SIGNAL_H
#include <deque>
#include <iostream>
#include <limits>
#include "mex.h"
#define BOTTOM -std::numeric_limits<double>::infinity()
#define TOP std::numeric_limits<double>::infinity()
//#define DEBUG__
using namespace std;
inline
double fmin(double a,double b)
{
return (a<b)?a:b;
}
... | TOOL | 0.972677 | 5.455143 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2017-01-04T16:20:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 61,
"forks": 21,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "fcb953c... |
d3a36cfd-e115-40eb-91d5-79e98119ed19 | Karmah24/Algorithms | Codeforces_Revisit/cf_yet_another_minimization_problem.cpp | #include <bits/stdc++.h>
using namespace std;
// #define int long long
//================================================================
int solve() {
int n;
cin >> n;
vector<int> a(n), b(n);
int sq_sum = 0, tsum = 0;
for (auto &e: a) cin >> e;
for (auto &e: b) cin >> e;
for (int i = 0; i ... | ALGO | 0.999925 | 4.765105 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2021-05-11T18:06: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": "d04dae4b019... |
e0521230-ebdb-4f89-9fec-74a6691ed05b | carminecoppola/Algorithms-and-Data-Structures-Implementations | Algoritmi_di_Ordinamento/Quicksort/Vector/Algoritmo.h | /* Riscrivere il quicksort utilizzando il contenitore Vector
ed gli iteratori
*/
#ifndef ALGORITMO_H
#define ALGORITMO_H
#include "vector"
using namespace std;
template <class Item>
class Algoritmo{
private:
static typename vector<Item>::iterator partition(typename vector<Item>::iterator,typename v... | ALGO | 0.999879 | 5.180021 | {
"github_metadata": {
"branch": "main",
"commit_count": 385,
"repo_created_at": "2022-10-01T20:41:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be77d35658... |
6cf376a4-20e0-45fa-a343-bdd17e567b7e | haoran0115/CSC4005-FA22 | hw04/src/main.mpi.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <memory.h>
#include <chrono>
#include "utils.h"
#ifdef GUI
#include "gui.h"
#endif
#include "const.h"
void compute(){
// running type buffer
strcpy(type, "mpi");
// start timing
auto t0 = std::chrono::high_resolution_clock::now();
... | ALGO | 0.999814 | 4.725067 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2022-09-28T03:03:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83b45a32d5f... |
2cf5cffe-362a-4270-a06a-ea56d4304234 | andyluo03/problems | problems/CF893D3/F.cpp | //wecu's template -- works with c++17
#include <algorithm>
#include <bitset>
#include <climits>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define forn(n) for(int i = 0; i < n; i++)
#define endl '\n'
using n... | ALGO | 0.999964 | 4.1287 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-06-08T19:27: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": "d9fba54715c... |
966b5659-e66d-4688-bee4-d816d0b1d09f | kanishka980/CrackYourInternship | stack and queues/evaluation of postfix.cpp | //{ Driver Code Starts
// C++ program to evaluate value of a postfix expression
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
//Function to evaluate a postfix expression.
int evaluatePostfix(string S)
{
// Your code here
stack<int>s1;
... | ALGO | 0.999072 | 5.906926 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2024-07-15T08:48: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": "c2922bd31f... |
f7402bd1-e085-4ce7-9ed6-5fca39d818d4 | jegonzal/PowerGraph | toolkits/graphical_models/deprecated/gibbs_sampling/matlab/gibbs_sampler_impl.cpp | /**
* Copyright (c) 2009 Car<NAME> University.
* 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
*
... | ALGO | 0.995654 | 6.360437 | {
"github_metadata": {
"branch": "master",
"commit_count": 5464,
"repo_created_at": "2013-07-01T07:59:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 356,
"forks": 514,
"issues": 39,
"pull_requests": 9
},
"file_meta": {
"content_id": "99... |
129bc566-84b2-4754-9b22-fd88eca7e77d | preritjn/Programming | DSA/treekdistance.cpp | #include<iostream>
using namespace std;
struct Node {
int key;
Node *left;
Node *right;
Node(int n) {
key = n;
left = right = NULL;
}
};
void printTree(Node *root,int k) {
if(root == NULL)
return;
if(k==0)
cout<<root->key<<" ";
else {
printTr... | ALGO | 0.999957 | 4.38403 | {
"github_metadata": {
"branch": "main",
"commit_count": 175,
"repo_created_at": "2022-06-12T19:18: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": "18351b85ea... |
b74bfb6e-171e-4242-ae86-89c266fba932 | FazeelUsmani/Scaler-Academy | 021 Queue/CircularQueue.cpp | #include <bits/stdc++.h>
using namespace std;
#define SIZE 5
class circularQ{
private:
int *arr;
int size, f, r, capacity, count;
public:
circularQ(int size = SIZE);
~circularQ();
bool isEmpty();
int front1();
void enqueue(int x);
void dequeue();... | ALGO | 0.999231 | 4.303408 | {
"github_metadata": {
"branch": "master",
"commit_count": 795,
"repo_created_at": "2020-01-28T18:13:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 252,
"forks": 172,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "59f7... |
04b4a754-1fba-44be-9b8d-8c55042f62d3 | littlebanana/lc | UniqueBinarySearchTreesII/UniqueBinarySearchTreesII.cpp | // Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
// For example,
// Given n = 3, your program should return all 5 unique BST's shown below.
// 1 3 3 2 1
// \ / / / \ \
// 3 2 1 1 3 2
// / /... | ALGO | 0.999922 | 6.016262 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2014-02-10T14:37: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": "1477a4604... |
2b4fae20-2b8a-4889-8d22-88be105f9c54 | MarcioMicro/beecrowd-cpp | Contests/SAP Hungary - Online Coding Contest/H - Coloração de Cenários de Jogos.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, ans;
char a[1050][1050];
bool vis[1050][1050];
void dfs(int x, int y) {
if(x < 1 || x > n || y < 1 || y > m) return;
if(vis[x][y] || a[x][y] == 'o') return;
vis[x][y] = true;
dfs(x + 1, y);
dfs(x - 1, y);
dfs(x, y + 1);
dfs(x, y - 1);... | ALGO | 0.999846 | 4.295331 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-01-17T22:47: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": "78b3a7387dfb... |
6b7f3cfe-1730-4c52-b575-1f77cdd850f6 | ishandutta2007/codeforces-i | ikatanic/normal/1450/F.cpp | #include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
#include <numeric>
#include <vector>
#define TRACE(x) std::cerr << #x << " = " << x << "\n"
#define _ << " _ " <<
using namespace std;
using i64 = int64_t;
int main() {
ios_base::sync_with_stdio(false);
int t;
cin >> t;
while (t-... | ALGO | 0.999735 | 4.011081 | {
"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": "1eb9d9423414... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.