uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
5d8289e3-3442-41ef-858a-1fe296febb37 | tanmayhinge/dsa | atcoder/abc191/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll v,s,t,d;
cin >>v>>t>>s>>d;
ll sec1;
ll sec2;
sec1 = s-t;
sec2 = d/v;
if(sec2 > sec1)
cout << "No" <<endl;
else
cout << "Yes" << endl;
}
| ALGO | 0.999793 | 3.580579 |
4e139125-f735-4e07-b97b-65409f45fa28 | WenjieSun1996/PAT_Advanced | 1121~1159/1151.cpp | #include<bits/stdc++.h>
using namespace std;
vector<int> fa(1e6);
void f(int inl, int inr, int prel, vector<int> &in, vector<int> &pre) {
if (inl > inr) return;
int i = inl;
while (in[i] != pre[prel]) i++;
int l = prel+1, r = i+1+prel-inl;
if (inl <= i-1) fa[pre[l]] = in[i];
if (i+1 <= inr) fa[pre[r... | ALGO | 0.99991 | 4.109953 |
13af3845-55e8-429e-b1f8-f85e00f8ae14 | Jbernardiss/codeStylometryResearch | data/dataset-v3/tourist/tourist-e1-2022-worldFinals.cpp | /**
* author: tourist
* created: 05.08.2022 19:42:07
**/
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif
template <typename T>
struct TPoint {
T x;
T y;
int id;
TPoint() : x(0), y(0), id(-1) {}
TPoint(const T& x_, const ... | ALGO | 0.999928 | 4.633914 |
73c76228-7990-48d0-844f-8f250f67e315 | fmckenna/OpenSeesBORIS | SRC/reliability/analysis/telm/StatFirstPassageAnalyzer.cpp | // $Revision: 1.1 $
// $Date: 2008-02-29 19:43:53 $
// $Source: /usr/local/cvs/OpenSees/SRC/reliability/analysis/telm/StatFirstPassageAnalyzer.cpp,v $
#include <StatFirstPassageAnalyzer.h>
StatFirstPassageAnalyzer::StatFirstPassageAnalyzer
(ReliabilityDomain* passedReliabilityDomain,
FindDesignPointAl... | ALGO | 0.919072 | 3.682353 |
ba8b5a23-6dad-44b8-892a-af246ee12a8d | yanyan2060/Decision-Tree-Induction-algorithm | ginicompute.cpp | #include "ginicompute.h"
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
int compute3(vector<MyCell>original, vector<vector<string>>&ds, vector<vector<double>> &dscnt, vector<vector<string>> &sub, string &chattri) //to choose the biggest infomation value of attribute
{
double info_D =... | ALGO | 0.999821 | 3.697226 |
7a08b2e7-ddf4-4d15-946e-e35f1ae52c2f | jackboom2510/DSA-PTIT | assets/Thuc hanh 05-18/14.cpp | #include <bits/stdc++.h>
#define endl "\n"
using namespace std;
bool Var(char c)
{
return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--)
{
string s, k;
cin >> s;
stack<string> s... | ALGO | 0.999995 | 4.972631 |
ee37630e-4285-40d3-a405-d15cfd1c6404 | Paxing939/Coursera-tasks | RedBelt/6 week/second_part/search_server.cpp | #include "search_server.h"
#include "iterator_range.h"
#include "profile.h"
#include "RequestTimeEstimator.h"
#include <algorithm>
#include <iterator>
#include <sstream>
#include <iostream>
#include <functional>
#include <mutex>
#include <thread>
#include <future>
//#define DEBUG
std::vector<std::string_view> SplitI... | WEB | 0.969733 | 5.089528 |
4e0f1d0e-437b-41e4-996c-471135fd597d | Omkasabekar/C-CPP-file | Queue_circular.cpp | #include<iostream>
using namespace std;
struct Queue{
int size;
int front;
int rear;
int *Q;
};
void display(Queue q){
int i=q.front+1;
do{
cout<<q.Q[i];
i=(i+1)%q.size;
}while(i!=(q.rear+1)%q.size);
cout<<endl;
}
void enqueue(Queue *q,int x){
if((q->rear+1)%q->size==q->front){
cout<<"queue is full";
... | ALGO | 0.998834 | 3.822544 |
2231ca95-981c-4025-b2b3-d95d19caf418 | walkccc/LeetCode | solutions/1093. Statistics from a Large Sample/1093.cpp | class Solution {
public:
vector<double> sampleStats(vector<int>& count) {
const int n = accumulate(count.begin(), count.end(), 0);
const double mode = ranges::max_element(count) - count.begin();
return {
getMinimum(count),
getMaximum(count),
getMean(count, n),
(getLeftMedi... | ALGO | 0.997907 | 6.43809 |
8399434a-b892-4133-960b-318010f36815 | sarvex/leetcode-pascal | solution/1900-1999/1970.Last Day Where You Can Still Cross/Solution.cpp | class Solution {
public:
vector<int> p;
int dirs[4][2] = {{0, -1}, {0, 1}, {1, 0}, {-1, 0}};
int row, col;
int latestDayToCross(int row, int col, vector<vector<int>>& cells) {
int n = row * col;
this->row = row;
this->col = col;
p.resize(n + 2);
for (int i = 0; i... | ALGO | 0.999935 | 6.028176 |
7b668347-f2f5-4ad1-aeb6-2a07334a007b | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_9245_25.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
cout<<H+W/2<<endl;
}
| ALGO | 0.99682 | 3.375807 |
b236d568-799d-49e5-a189-e8c1c8d69560 | ishandutta2007/codeforces | gyz_gyz/normal/1295/D.cpp | #include<bits/stdc++.h>
#define rep(i,x,y) for(auto i=(x);i<=(y);++i)
#define dep(i,x,y) for(auto i=(x);i>=(y);--i)
using namespace std;
typedef long long ll;
const int mo=998244353;
void sol(){ll x,y;
scanf("%lld%lld",&x,&y);
y/=__gcd(x,y);ll res=1;
rep(i,2,y){
if(y/i<i)break;
if(!(y%i)){
res*=i-1;y/=i;
w... | ALGO | 0.999834 | 4.965581 |
99d72eff-927d-4d97-8fdd-de7ef03271f9 | szmybs/PhysIKA_Cloud | Extern/opencv-2.4.13/modules/imgproc/src/pyramids.cpp | #include "precomp.hpp"
namespace cv
{
template<typename T, int shift> struct FixPtCast
{
typedef int type1;
typedef T rtype;
rtype operator ()(type1 arg) const { return (T)((arg + (1 << (shift-1))) >> shift); }
};
template<typename T, int shift> struct FltCast
{
typedef T type1;
typedef T rtype;
... | ALGO | 0.989553 | 3.950835 |
c18f56ec-b9e9-4a63-aadb-d3a11323cfaf | ishandutta2007/codeforces | heart_blue/normal/339/D.cpp | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#incl... | ALGO | 0.999971 | 4.163165 |
261f175a-f60e-45a8-b97c-b15e61840622 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_741_6.cpp | #include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
return a < b ? (a = b, true) : false;
}
vector<long long> v[200001];
long long vis[200001], color[200001];
vector<pair<long long, long long>> edge;
... | ALGO | 0.999965 | 3.951919 |
a2183680-42a7-438b-bd42-0e6f14585799 | life-studied/hstring | hstring/hstring.cpp | #include <vector>
#include <cstring>
#include"hstring.h"
using namespace m_hstring;
Memory_Pool* hstring::only_pool = Memory_Pool::getInstance();
int Memory_Pool::Element::num = 0;
const size_t hstring::npos = SIZE_MAX;
hstring& m_hstring::hstring::operator=(const char* str)
{
this->only_pool->deleteMemory(this->N... | TOOL | 0.883065 | 3.698686 |
a06b33b4-a709-49f7-be6e-88e8ff1cb990 | anus05/Snow_Hub | harshed_num.cpp | //A Harshad number
/*eg. 378 is Harshad number
3+7+8=18 . 378 is divisble by 18
*/
#include<iostream>
using namespace std;
int main()
{
int n;
cout<<"Enter a number : "<<endl;
cin>>n;
int sum=0;
int copy=n;
while(copy!=0)
{
sum +=copy%10;
copy/=10;
}
if (n%su... | ALGO | 0.999681 | 4.356923 |
435e31c5-7391-4150-a990-4ca96a19d852 | KnifeParty12/Back_again | FANG_Mix/Two_City_Scheduling.cpp | #include <bits/stdc++.h>
#define endl "\n"
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define loop(i, a, b) for (int i = a; i < b; i++)
#define sloop(str, i, a) for (int i = a; str[i] != '\0'; i++)
#define mod 1000000007
#d... | ALGO | 0.999834 | 3.46535 |
7d5b86ce-3b9c-4a8b-a443-60c72769d73f | THEBELLIN/Kattis-Problems | shattered_cake.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int w, n, a=0, wi, le;
cin>>w>>n;
while(n--)
{
cin>>wi>>le;
a+=wi*le;
}
cout<<a/w;
return 0;
} | ALGO | 0.999531 | 3.684656 |
96437ae3-0eaf-4228-9a85-113ff718fc3a | hassanzhd/FAST-Resources | Data Structures/Assignment_3/K180208-A3P2.cpp | #include <fstream>
#include <iostream>
#include <queue>
using namespace std;
class node {
public:
int data;
node *left, *right;
node() {
data = 0;
left = right = NULL;
}
node(int __data, node *__left = NULL, node *__right = NULL) {
data = __data;
left = __left;
... | ALGO | 0.999047 | 4.567 |
a8b1c785-d92c-47a7-8329-d5778323b2f7 | Lynskylate/chromium-base-bazel | third_party/icu/source/i18n/csrmbcs.cpp | #include "unicode/utypes.h"
#if !UCONFIG_NO_CONVERSION
#include "cmemory.h"
#include "csmatch.h"
#include "csrmbcs.h"
#include <math.h>
U_NAMESPACE_BEGIN
#define min(x,y) (((x)<(y))?(x):(y))
static const uint16_t commonChars_sjis [] = {
// TODO: This set of data comes from the character frequency-
// of-o... | TOOL | 0.943723 | 6.639045 |
083ea11b-16ef-4fe1-b154-085b73bd415b | andreidecuseara19/Spline | Spline/TestSpline.cpp | #include "CSpline.h"
int main(){
double x[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
double y[] = {9, 8, 5, 8, 4, 6, 2, 3, 5, 1};
int n = sizeof(x) / sizeof(double);
double * pX = x;
double * pY = y;
CSpline * pS = new CSpline(n, pX, pY);
pS ->solve();
int nTotal = pS->getNrTotalPoints();
vector<double> xi = pS-... | ALGO | 0.961877 | 3.81304 |
c7e44920-7916-4abd-b739-d9c44991f795 | ishandutta2007/codeforces | toxel/normal/1010/C.cpp | #include<bits/stdc++.h>
int main(){
int n, k;
scanf("%d%d", &n, &k);
int gcd = k;
for (int i = 0, x; i < n; ++ i){
scanf("%d", &x);
gcd = std::__gcd(gcd, x);
}
int sz = k / gcd;
printf("%d\n", sz);
for (int i = 0; i < sz; ++ i){
printf("%d%c", i * gcd, " \n"[i ==... | ALGO | 0.999954 | 3.625978 |
5f826dd5-d355-4aa4-8197-5df7c616f0ac | Paxwell-Paxwell/ProbSol | Lab09/LCS2.cpp | #include <bits/stdc++.h>
using namespace std;
#define MAX 201
string s,t;
int memos[MAX][MAX];
string str[MAX][MAX];
void input(){
cin >> s >> t;
}
void LCS() {
int n = s.size();
int m = t.size();
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= m; j++) {
if (i == 0 || j == 0... | ALGO | 0.99996 | 4.443195 |
0c3daeee-30d1-4c26-89ed-924630de0c9e | CorporaOS/android_frameworks_av | media/module/codecs/amrnb/common/src/inv_sqrt_tbl.cpp | /*
Filename: /audio/gsm_amr/c/src/inv_sqrt_tbl.c
------------------------------------------------------------------------------
REVISION HISTORY
Description: Changed table name to inv_sqrt_tbl
Description: Added #ifdef __cplusplus and removed "extern" from table
definition.
Description: Put "ext... | ALGO | 0.998802 | 3.596707 |
61c63ad8-8415-419b-bfba-84cea9a881cc | dehezhang2/Kombu | code/ext/nanogui/ext/eigen/bench/sparse_cholesky.cpp | // #define EIGEN_TAUCS_SUPPORT
// #define EIGEN_CHOLMOD_SUPPORT
#include <iostream>
#include <Eigen/Sparse>
// g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/lin... | ALGO | 0.996331 | 4.147974 |
22a7985d-d224-4e68-89e1-a73254f39972 | krishna-shrivastav232702/DSA | binarySearch.cpp | #include<iostream>
using namespace std;
int main(){
int arr[100];
int n;
cout<<"Enter size of the array"<<endl;
cin>>n;
cout<<"Enter numbers in the array"<<endl;
for(int i=0;i<n;i++){
cin>>arr[i];
}
int start=0,end=n-1,first=-1,last=-1,mid,target;
cout<<"Enter target"<<endl;... | ALGO | 0.999683 | 5.098456 |
d617a394-322c-493d-9954-f3c85d56a8b5 | leblancdavid/CppReview | PCD/q4.cpp | #include <iostream>
#include <vector>
#include <memory>
// assume all the necessary includes are here
class World {
public:
static int temperature; // celcius
static int windSpeed; // miles per hour
};
int World::temperature = 0;
int World::windSpeed = 0;
class Bird
{
public:
virtual void Fly()=0;
... | ALGO | 0.949767 | 6.059593 |
d1cf2fed-97c2-43dc-8c0d-b97dee4084ea | tadejpetric/nla | nla_mehurcek/nla_mehurcek.cpp | #include <iostream>
#include <vector>
#include <math.h>
#include <Eigen/Dense>
#include <matplot/matplot.h>
using Eigen::MatrixXd;
using Eigen::VectorXd;
MatrixXd gauss_seidel(MatrixXd U) {
for (int iteration = 0; iteration < 2000; ++iteration) {
for (int i = 1; i < U.rows()-1; ++i) {
for (int ... | ALGO | 0.999399 | 4.530318 |
a7a95848-4c68-4baa-b21c-728dc6caaa12 | webturing/NOIP2018FS | Contest1225/C.cpp | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
while (getline(cin, s)) {
int a = 0, b = 0, c = 0, d = 0;
for (int i = 0; i < s.size(); i++) {
if (isalpha(s[i]))a++;
else if (isspace(s[i]))b++;
else if (isdigit(s[i]))c++;
else... | ALGO | 0.987092 | 3.447144 |
5a19bbf8-dcc4-4925-a76f-cd9973b12607 | ishandutta2007/codeforces | arsijo/normal/431/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define files(x) freopen(x ".in", "r", stdin); freopen(x ".out", "w", stdout);
#define input freopen("input.txt", "r", stdin);
#define output freopen("output.txt", "w", stdout);
#define io input; output;
#define x first
#define y second
#define sync ios_base::sync_with_stdi... | ALGO | 0.999963 | 3.404065 |
134be36c-f154-4d0f-9140-e8eb11bd1708 | hatopoppoK3/AtCoder-Practice | ABS/Daydream_ans.cpp | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string str;
string divide[] = {"dream", "dreamer", "erase", "eraser"};
cin >> str;
reverse(str.begin(), str.end());
for (int i = 0; i < 4; i++)
{
reverse(divide[i].begin(), divide[i].end());
... | ALGO | 0.99997 | 4.099076 |
7fc1f622-4914-4850-9d58-9b04ecf4a44d | ASergeevich/practical_work | inverting_function.cpp | #include <iostream>
#include <random>
#include <bitset>
void Generate(uint8_t *mask_array, uint8_t array_length, uint8_t number_of_bits)
{
std::random_device rd;
std::mt19937 generate(rd());
std::uniform_int_distribution<uint8_t> distr(0u, number_of_bits - 1);
for(int i{0}; i < array_length; ++i)
... | ALGO | 0.985093 | 5.016601 |
77521328-c762-4898-ad15-65fd6f8f69c6 | hal-uw/cpelide-micro24-artifact | gem5_multigpu/src/systemc/tests/systemc/misc/v1.0/dash8/dist.cpp | /*****************************************************************************
dist.cpp -- Implementation of the odometers.
Original Author: Ali Dasdan, Synopsys, Inc.
*****************************************************************************/
/************************************************************... | ALGO | 0.987128 | 6.558409 |
1b91394a-82ec-4af1-85e1-6c42b09c33a8 | jddjk/Baekjoon_Online_Judge_Solutions | 1007.cpp | #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
const int MAX_N = 20;
int selected[MAX_N];
double const INF = 1e18;
double min_distance;
int test_cases, num_points, half;
int coordinates_x[MAX_N], coordinates_y[MAX_N];
int sum_x, sum_y;
double power(double base, int exponent) {
doubl... | ALGO | 0.999757 | 4.686666 |
05832741-58c2-4277-88d0-8ebcded89c4d | BoDeaD/IT_STEP_ACADEMY | C++/Homework/Dz14.cpp | #include <iostream>
using namespace std;
int leap_year(int year);
void func2(int massive[], int lenght);
void func1(int d1, int m1, int y1, int d2, int m2, int y2);
void func3(int massive[], int lenght);
/*
Задание 1. Написать функцию, которая принимает две даты
(т.е. функция принимает шесть параметров) и вычисляет ... | ALGO | 0.996124 | 4.331498 |
8fabacb1-f2cb-4d18-82de-cbc9419f3bbd | jinyongp/write-code-everyday | baekjoon/src/1915.cpp | // https://www.acmicpc.net/problem/1915
#include <algorithm>
#include <iostream>
#define SIZE 1001
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int S[SIZE][SIZE] = {0};
int DP[SIZE][SIZE] = {0};
for (int i = 1; i < N + 1; ++i) {
for (int j = 1; j < M + 1; ++j) {
char temp;
cin >... | ALGO | 0.999663 | 4.244926 |
197b74a2-0a6d-43d6-8963-3e48f5cce86c | RoboticRice/CS-M10B-Projects | test.cpp | #include <iostream>
using namespace std;
/*
* Project: Template
* Class: CS M10B
* Student: Rice, Sammuel D.
* Edited: 20160###
* Due on: 20160###
* Version: 0.1 (History: 0.1)
* gitHub: https://github.com/RoboticRice/CS-M10B-Projects.git
*/
/*
* Instructions:
*
*//*
* Notes:
* This program does NOT impliment any... | ALGO | 0.997614 | 4.093084 |
e5ae10a7-4609-4925-ba76-90173a1fdb4f | smy999/practice_algorithm | baekjoon/For문/2741_N찍기.cpp | #include <iostream>
using namespace std;
int main() {
/* #2741*/
int N;
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> N;
for (int i = 1; i <= N; i++) {
cout << i << "\n";
}
}
| ALGO | 0.999416 | 3.78591 |
4a447f12-c8a7-4d30-a02f-ce0d7726f036 | sarvex/leetcode-julia | solution/1100-1199/1150.Check If a Number Is Majority Element in a Sorted Array/Solution.cpp | class Solution {
public:
bool isMajorityElement(vector<int>& nums, int target) {
auto left = lower_bound(nums.begin(), nums.end(), target);
auto right = upper_bound(nums.begin(), nums.end(), target);
return right - left > nums.size() / 2;
}
}; | ALGO | 0.999965 | 6.026114 |
e30247aa-2d12-47e3-8177-5502dc13b920 | ivkaradzhova/AI-Homeworks | Homework1/IDA.cpp | #include <cmath>
#include <string>
#include <set>
#include "IDA.h"
#include "Resolvable.h"
#include <chrono>
using namespace std::chrono;
State create_goal_state(int num)
{
int board_size = sqrt(num + 1);
vector<vector<int>> numbers(board_size, vector<int>());
for (int i = 0; i < board_size; i++)
{
... | ALGO | 0.99992 | 4.834122 |
9fb84ec5-ffa4-43d4-97c4-ce7c8a9ce2e5 | TheProbPro/Numeriskemetoder | NR_C301/legacy/nr2/CPP_211/examples/xdfridr.cpp | #include <iostream>
#include <iomanip>
#include <cmath>
#include "nr.h"
using namespace std;
// Driver for routine dfridr
DP func(const DP x)
{
return tan(x);
}
int main(void)
{
DP x,h,dx,err;
cout << "input x, h (h=0.0 to stop):" << endl;
cout << fixed << setprecision(6);
ci... | ALGO | 0.999608 | 3.940571 |
8d12d185-4d7c-418e-a548-2d00593bedba | jdehotin/Freecad | src/Mod/Cam/App/UniGridApprox.cpp | #include "PreCompiled.h"
#include "UniGridApprox.h"
#include "best_fit.h"
#include <Mod/Mesh/App/Core/Grid.h>
#include <Base/Builder3D.h>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <BRepBuilderAPI_Mak... | ALGO | 0.995634 | 4.695465 |
c72d3384-6191-4fc4-a31e-f00443bcb69a | leafeonia/leetcode | C++/code/304.cpp | class NumMatrix {
public:
NumMatrix(vector<vector<int>>& matrix) {
int m = matrix.size();
int n = matrix[0].size();
sum.resize(m + 1, vector<int>(n + 1, 0));
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
sum[i][j] = sum[i][j - 1] + matrix[i... | ALGO | 0.999735 | 6.634308 |
aa1c12c2-a9a8-4e8e-b54b-0b60068e1b42 | b-chae/AlgorithmStudy | baekjoon/1012.cpp | #include <iostream>
#include <vector>
using namespace std;
int T, N, M, K;
int board[50][50];
bool visited[50][50];
vector<int> ans;
void dfs(int i, int j) {
visited[i][j] = true;
if (i > 0 && board[i - 1][j] && !visited[i - 1][j]) {
dfs(i - 1, j);
}
if (j > 0 && board[i][j - 1] && !visited[i][j - 1]) {
dfs(... | ALGO | 0.999924 | 3.648425 |
4ec4977c-81a8-4bfe-8dfb-0b4ee85c7508 | lStewieAl/Geck-Extender | BetterFloatingFormList.cpp | #include "BetterFloatingFormList.h"
#include <commctrl.h>
#include "GameObjects.h"
#include "GECKUtility.h"
#include "GameAPI.h"
#include "Utilities.h"
#include <iostream>
#include <fstream>
#include <sstream>
namespace BetterFloatingFormList
{
bool IsFormInListView(HWND hListView, TESForm* form)
{
LVFINDINFO lvF... | TOOL | 0.881638 | 5.86355 |
317fca66-c432-46ee-beb6-518e60476fbc | andyhill1979/xbmc | xbmc/filesystem/AddonsDirectory.cpp | #include <array>
#include <algorithm>
#include <functional>
#include <set>
#include "AddonsDirectory.h"
#include "addons/AddonDatabase.h"
#include "interfaces/generic/ScriptInvocationManager.h"
#include "FileItem.h"
#include "addons/AddonInstaller.h"
#include "addons/PluginSource.h"
#include "addons/RepositoryUpdater.h... | TOOL | 0.889721 | 6.341027 |
61bc8638-453d-4a60-8bf1-1639c2a8ecd9 | crystax/android-vendor-boost | libs/algorithm/string/example/split_example.cpp | // Boost string_algo library example file ---------------------------------//
// See http://www.boost.org for updates, documentation, and revision history.
#include <string>
#include <vector>
#include <iostream>
#include <iterator>
#include <functional>
#include <boost/algorithm/string/classification.hpp>
#include... | TOOL | 0.989356 | 4.93924 |
e20d8c1f-d62f-4c99-a33d-f43976e08f65 | Nicetocupro/miniob | deps/common/math/md5.cpp | //
// Created by Longda on 2010
//
#include "common/math/md5.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
namespace common {
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23... | ALGO | 0.981627 | 5.945392 |
435bf715-f9f3-482b-9371-033f8c0a2010 | guipie/juai_flutter | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
436be006-6827-47cc-a628-15b6da083b1e | ShreyaDhir/HacktoberFest2020 | metrics/rough_sparse_matrix.cpp | // ! FULLY DEPRICATED PROGRAM (CRYING FROM INSIDE) NEED TO MAKE A BETTER ONE SOON
// ? SHOUD I GO FOR IMPROVING THIS
// TODO : FOR NOW JUST REUSE THE SNIPPETS FROM THIS CODE IN OTHER CODES IT WILL BE A TIMESAVER
// * ALAS BYE BYE THIS PROGRAM I WILL MAKE A BETTER ONE AFTER READING SOME MORE BOOKS
// ? WHYNOT USE THIS C... | ALGO | 0.990604 | 3.551781 |
085d3a7c-0a51-48fe-864b-3e7618711ea9 | Arya0309/chip_llm | C2SC/systemc_generation/dataset/geek/data/SearchanElementinanArray_BinarySearch.cpp | // C++ program to implement iterative
// binary search
#include <bits/stdc++.h>
using namespace std;
bool binarySearch(vector<int>& v, int target) {
// Defining the part of the vector to be
// searched
int low = 0, high = v.size() - 1;
// Till the element is found or vector cannot
... | ALGO | 0.999952 | 6.116416 |
febfca19-d07c-4af9-a186-7bbf9632f324 | mameaw14/probsolve-cpe-2 | subset.cpp | #include <string.h>
#include <stdio.h>
#include <math.h>
main() {
char str[1001];
scanf("%s",str);
int c = 0;
for (int i = 0; i < strlen(str); ++i)
{
if(str[i] == ',') c++;
}
if(strlen(str) == 2) c=-1;
printf("%d\n", (int)pow(2,c+1));
} | ALGO | 0.998925 | 3.073949 |
cf01addc-303e-4f42-9ae1-3ebba42ce990 | CISSSCO/learnToCode | c++/day11/createFunction.cpp | #include <iostream>
using namespace std;
void printHi5times()
{
for (int i = 0; i < 5; i++)
{
cout << "Hii" << endl;
}
}
int main()
{
printHi5times();
cout << "Hello\n";
printHi5times();
int a = 5;
cout << a << endl;
printHi5times();
return 0;
}
/*
datatype functionna... | ALGO | 0.973585 | 3.903882 |
e2ab6548-0b82-4f46-9b3f-242517dbef4d | anupriyachhabra/Model-Predictive-Control | src/Eigen-3.3/doc/examples/Tutorial_BlockOperations_block_assignment.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace std;
using namespace Eigen;
int main()
{
Array22f m;
m << 1,2,
3,4;
Array44f a = Array44f::Constant(0.6);
cout << "Here is the array a:" << endl << a << endl << endl;
a.block<2,2>(1,1) = m;
cout << "Here is now a with m copied into its cent... | ALGO | 0.953164 | 3.331377 |
80e9f797-724e-4563-99de-093822ebf5b1 | naman152728/DSA | 9. Strings/5_ValidPalindrome.cpp | #include <bits/stdc++.h>
using namespace std;
bool isPalindrome(string str)
{
string temp;
for (int i = 0; i < str.size(); i++)
{
if ((str[i] >= '0' && str[i] <= '9') || (str[i] >= 'A' && str[i] <= 'Z') || (str[i] >= 'a' && str[i] <= 'z'))
{
temp.push_back(tolower(str[i]));
... | ALGO | 0.998447 | 5.724264 |
063a986b-28aa-4c81-95d9-87b62c372a41 | ishandutta2007/codeforces | xuanquang1999/normal/264/C.cpp | //84104971101048411497 - Can you guess what does this mean?
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef complex<double> point;
#define mapii map<int, int>
#define debug(a) cout << #a << ": " << a << endl
#define debuga1(a, l, r) fto(i, l, r) cout << a[i] << " "; cout << endl
#define fd... | ALGO | 0.999933 | 3.560622 |
4b7aab4d-7c32-434e-b626-08771b5922cc | dhnanj2/CP_Kit | 2DArray/Transpose.cpp | #include<bits/stdc++.h>
using namespace std;
// time : O(N^2), space:O(1)
// transpose of a square matrix
void transpose_sq(vector<vector<int>> &A) {
int m=A.size();
assert(m>0);
int n=A[0].size();
assert(n==m);
for(int i=0;i<m;i++) {
for(int j=0;j<i;j++) {
swap(A[i][j],A[j][... | ALGO | 0.999922 | 4.045725 |
815c24a4-c252-4146-b7a5-21bed7ce6bfb | Y-ang/c_plus_plus | CodeCaprice/code/6.BTree/lc538二叉树转换为累加树.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.999995 | 6.188716 |
04419c31-58ac-4e3e-8230-3532c1d41bc1 | garfiaslopez/competitive_programming | BOOK CLUB - Guide to competitive programming/CSES ProblemSet/03.- Dynamic Programming/06.- Grid Paths/main.cpp | // compile & run: g++ -std=c++11 main.cpp -o main && ./main < input.txt > out.txt
// Problem Url: https://cses.fi/problemset/task/1638
//
// © Jose Garfias Lopez
//
#include <bits/stdc++.h>
using namespace std;
int mod = 1e9+7;
int main() {
int n;
cin>>n;
vector<vector<char>> grid(n+4, vector<char>(n+4... | ALGO | 0.999953 | 5.050507 |
919b9b6b-641f-4a23-9305-8e4de5187ef2 | aelsoftware/Proximeter | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.9988 | 6.76073 |
4bf1b90b-99ab-44b5-b6a8-8bc8b088c1bc | folgerwang/UnrealEngine | Engine/Source/ThirdParty/IntelTBB/IntelTBB-4.0/src/tbbproxy/tbbproxy.cpp | #define TBB_PREVIEW_RUNTIME_LOADER 1
#include "tbb/runtime_loader.h"
#include "tbb/tbb_stddef.h"
// C standard headers.
#include <cctype> // isspace
#include <cstdarg> // va_list, etc.
#include <cstdio> // fprintf, stderr, etc.
#include <cstdlib> // malloc, free, abort.
#inclu... | TOOL | 0.857489 | 4.153047 |
2a594a46-e0c0-43be-a6d3-1225e07f3f53 | Muhammadaan/belajarsqflite | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
d09b9e28-08d7-42a5-9604-b3ce1184a5ca | ishandutta2007/codeforces | abc864197532/normal/1107/B.cpp | #include <iostream>
using namespace std;
int main () {
int n;
cin >> n;
for (int t=0;t<n;++t) {
long long int k,x;
cin >> k >> x;
cout << x+(k-1)*9 << endl;
}
} | ALGO | 0.999291 | 3.405161 |
63029527-9cc6-4506-9ff8-83aa408bd4ad | rabelhmd/LeetCode | 105-construct-binary-tree-from-preorder-and-inorder-traversal/105-construct-binary-tree-from-preorder-and-inorder-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.99999 | 6.049469 |
5f14047b-b74a-4a4e-a3fc-66cba491d570 | magyarakoos/contest-prog | codeforces/contest/1971/A/main.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define sz(v) (int)v.size()
#define smin(x, y) x = min(x, y)
#define smax(x, y) x = max(x, y)
const ll INF = 2e9, MAXN = 2e5, MOD = 1e9 + 7;
#define cases 1
void solve() {
in... | ALGO | 0.999378 | 5.208674 |
cda46c45-8bbe-4405-b4ae-953eada56518 | manuelmusngi/derivatives_models_for_options | option-sensitivities/main.cpp | /*
Calculation of Options Sensitivities
*/
#include <iostream>
#include <cmath>
#include "greeks.h"
// Function to print option details
void printOptionDetails(double S, double K, double r, double v, double T) {
std::cout << "Underlying: " << S << std::endl;
std::cout << "Strike: " << K << std::endl;
... | ALGO | 0.994256 | 7.680093 |
e1982894-4eed-4d10-8836-8d3af40e1895 | alechim/Cplusplus-Projects | C++_Textbook/Chapter_8/Exercises/q6/main.cpp | // Question 6: Grade T/F Quizzes
/**
* Notes:
* - Question meant for a dataset of more than 150 students
* - Test only has 20 questions
* - Test only has 'T', 'F', or ' ' marked
* > No need for verification for studentID or answers
*/
/**
* Point Distribution:
* > Correct Answer - 2 points
* > Wrong Answer ... | TEST | 0.882788 | 5.716077 |
b2e7a3ed-ed6f-4743-9a48-762c858af189 | adamhumphriescs/TASE_KLEE | lib/Core/TimingSolver.cpp | #include "TimingSolver.h"
#include "klee/Config/Version.h"
#include "klee/ExecutionState.h"
#include "klee/Solver.h"
#include "klee/Statistics.h"
#include "klee/TimerStatIncrementer.h"
#include "CoreStats.h"
#include "klee/Internal/System/Time.h"
using namespace klee;
using namespace llvm;
/***/
bool TimingSolver:... | ALGO | 0.979556 | 6.353769 |
3c4bdcc6-2f0c-43b4-95dc-29a77795b64e | Bagrielsl/Programa-o-Competitiva | NEPS/Soma dos elementos.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n, res, i, x;
res = 0;
cin >> n;
for(i=0;i<n;i++){
cin >> x;
res += x;
}
cout << res << endl;
} | ALGO | 0.99909 | 3.714758 |
fdbc7526-4401-497c-889f-21aac4d09627 | arpitgpta/DataStructures | binerySearch.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cout << "Enter size of array" << endl;
cin >> n;
int arr[n];
for(int i = 0; i < n; i++) cin >> arr[i];
int k,high = n-1, low = 0;
int mid = (high+low)/2;
cout << "Enter the value to search" << endl;
cin >> k;... | ALGO | 0.999787 | 5.484515 |
b78c50e6-3c8a-49fb-aac2-8cacfc8b04bd | lukejin-dev/4k_video_test | libs/libyami/decoder/vaapidecoder_h265.cpp | #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "codecparsers/h265Parser.h"
#include "common/log.h"
#include "common/nalreader.h"
#include "vaapi/vaapiptrs.h"
#include "vaapi/vaapicontext.h"
#include "vaapi/vaapidisplay.h"
#include "vaapidecpicture.h"
#include <algorithm>
#include "vaapidecoder_h265.h"
na... | TOOL | 0.868004 | 4.476992 |
605b2310-8853-4cc3-aea2-69a34e7ca4af | alexiiion/2019-ETH-ApproximatingDOGs | external code/Non-linear projection optimization (PH)/Stitching2_AI-revision/libigl/include/igl/embree/ambient_occlusion.cpp | template <
typename DerivedP,
typename DerivedN,
typename DerivedS >
IGL_INLINE void igl::embree::ambient_occlusion(
const igl::embree::EmbreeIntersector & ei,
const Eigen::PlainObjectBase<DerivedP> & P,
const Eigen::PlainObjectBase<DerivedN> & N,
const int num_samples,
Eigen::PlainObjectBase<DerivedS> ... | ALGO | 0.990888 | 6.708069 |
5b09f164-fd78-4034-9872-b9c43f7d0ec4 | KhoiBui16/28Tech_Code_Online | Data structure algorithm/Source Code DSA Contest/SapXepTimKiem/B03_SapXepTheoTongChuSo.cpp | #include <bits/stdc++.h>
using namespace std;
int tong(int n)
{
int sum = 0;
while(n)
{
sum += n % 10;
n /= 10;
}
return sum;
}
bool cmp(int a , int b)
{
if(tong(a) != tong(b)) return tong(a) < tong(b);
return a < b;
}
int main()
{
int n ; cin >> n;
int a[n];
fo... | ALGO | 0.999897 | 5.09781 |
e20ee2d4-4d84-457a-9429-bce5ac9ecc4c | Abdullahbottar/C-pf | assignment2/Q3 without strings l22-6913.cpp | #include <iostream>
using namespace std;
int main()
{
int col, row;
char c = 'A';
cout << "Enter the value of columns you want do not exceed 26:";
cin >> col;
cout << "Enter the number of rows you wnat:";
cin >> row;
if (col < 0 || col>26)
{
while (col < 0 || col>26)
{
cout << "Enter the correct value of... | ALGO | 0.965531 | 3.162405 |
2bc0c093-30a7-41d9-a8d8-1b520079b819 | aronZhang977/LeetCode | offer03.数组中重复的数字.cpp | /*
找出数组中重复的数字。
在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。
示例 1:
输入:
[2, 3, 1, 0, 2, 5, 3]
输出:2 或 3
*/
// unordered_set
class Solution {
public:
int findRepeatNumber(vector<int>& nums) {
unordered_set<int> hashset;
int count = 0;
for(i... | ALGO | 0.999716 | 5.579675 |
a55661c4-2d3e-4c8a-ac74-8985df657beb | sonejilab/FastWilcoxTest | src/extract_proximity_oob.cpp | #include <Rcpp.h>
using namespace Rcpp;
//#include <progress.hpp>
//' @title extract proximity for the ranger results
//' copied from https://github.com/imbs-hl/ranger/issues/234
//' @aliases extract_proximity_oob,FastWilcoxTest-method
//' @rdname extract_proximity_oob
//' @description calculate the proximity matrix
... | ALGO | 0.997872 | 5.888398 |
49b1427d-b801-4ae2-93be-e76bfdbf918f | puyams/PSU-psu-firmware | src/eez-framework/src/eez/libs/agg/agg_vpgen_clip_polygon.cpp | #include <eez/conf-internal.h>
#if EEZ_OPTION_GUI
#include "agg_vpgen_clip_polygon.h"
#include "agg_clip_liang_barsky.h"
namespace agg
{
//------------------------------------------------------------------------
// Determine the clipping code of the vertex according to the
// Cyrus-Beck line clipping a... | ALGO | 0.996068 | 6.806314 |
8569b9d0-e39f-4778-9980-7582705d2ecd | senliuy/FaceLivenessDetection | FaceLivenessDetection/lib/3rdParty/dlib/include/dlib/test/ranking.cpp | #include "tester.h"
namespace
{
using namespace test;
using namespace dlib;
using namespace std;
logger dlog("test.ranking");
// ----------------------------------------------------------------------------------------
template <typename T>
void brute_force_count_ranking_inversions (
... | TEST | 0.969862 | 7.038505 |
3cec30e5-a661-482f-915a-673bd5813e45 | jkpld/SDC_ND_T3P1_Path_Planning | src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
MatrixXf mat(2,4);
mat << 1, 2, 6, 9,
3, 1, 7, 2;
MatrixXf::Index maxIndex;
float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex);
std::cout << "Maximum sum at position " << maxIndex << std:... | ALGO | 0.999774 | 4.220459 |
35ee3328-3327-4dbd-8f2f-df0b04988dae | digital-salon/Digital-Salon | extern/eigen-3.4.0/bench/sparse_trisolver.cpp |
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out
// -DNOGMM -DNOMTL
// -I /home/gael/Coding/LinearAlgebra/CSparse/... | ALGO | 0.996893 | 4.874496 |
a69dc20c-e808-41fc-8791-c3fc3a91ccf1 | ArchUsr64/project_euler | 6.cpp | #include <bits/stdc++.h>
int main() {
long long n = 100;
long long sum_of_n = (n * (n + 1)) / 2;
long long square_of_sum_of_n = sum_of_n * sum_of_n;
long long sum_of_square_of_n = (n * (n + 1) * (2*n + 1)) / 6;
std::cout << square_of_sum_of_n - sum_of_square_of_n << std::endl;
return 0;
}
| ALGO | 0.999172 | 4.213143 |
0e673357-7969-4608-b6aa-85830b210248 | UMANG-GAKHAR/Hackerblocks-practice | Matrix Search.cpp | #include <iostream>
using namespace std;
void matrixSearch(int **arr, int n , int m, int key) {
for(int row = 0;row < n;) {
for(int col=m-1;col>=0 and row < n;) {
if(arr[row][col] == key) {
cout<<1;
return;
} else if(arr[row][col] > key) {
... | ALGO | 0.999992 | 4.099847 |
8f131018-8b3f-4317-b1a3-634d380a0ecd | scottku/Baekjoon_Solution | 24.02.06/q9251.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <cmath>
#include <iostream>
#include <string>
#include <deque>
#include <vector>
#include <memory.h>
#include <algorithm>
#include <map>
#include <stack>
#include <sstream>
#include <unordered_map>
#include <queue>
using namespace std;
char c1[1001];
char c... | ALGO | 0.999882 | 3.017949 |
3823922e-238d-4829-ba62-dba9a33884ae | ekarth/DSA | Trees/Binary Trees/3.cpp | // Link: https://practice.geeksforgeeks.org/problems/zigzag-tree-traversal/1/
#include<bits/stdc++.h>
using namespace std;
struct Node
{
int data;
Node* left, * right;
};
Node* newNode(int val)
{
Node* temp = new Node;
temp->data = val;
temp->left = NULL;
temp->right = NULL;
return temp... | ALGO | 0.999951 | 5.930577 |
5ef00437-b4cd-4ad1-bdba-3d4d01640be3 | chichchic/algorithmPrac | BaekJoon/2021/1January/210131_13305.cpp | #include <iostream>
#include <vector>
using namespace std;
int main()
{
// freopen("input.txt", "r", stdin);
ios_base::sync_with_stdio(0);
cin.tie(0);
long long cityNum;
cin >> cityNum;
vector<long long> gasStation(cityNum);
vector<long long> loadLens(cityNum - 1);
for (long long i = 0; i < cityNum -... | ALGO | 0.999905 | 3.071324 |
405584c4-424e-45e4-821c-c644f3dd4a7f | Anusha-A-R/code-library | cycleInDirected.cpp | #include<bits/stdc++.h>
using namespace std;
class Graph
{
int V;
list<int> *adj;
bool isCyclicUtil(int v, bool visited[], bool *rs);
public:
Graph(int V);
void addEdge(int v, int w);
bool isCyclic();
};
Graph::Graph(int V)
{
this->V = V;
adj = new list<int>[V];
}
void Graph::addEdge(int v, int w)
{
... | ALGO | 0.99985 | 4.964539 |
6dddf77d-2861-42ef-b806-e945030ceb6b | Laurine-sl/TDS2-IMAC1 | TDS2/TD3/exo1/main.cpp | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include "fonction.hpp"
int main()
{
std::string phrase{"3 4 +"};
// std::cout << "Entrez une phrase en NPI : ";
// std::getline(std::cin, phrase);
std::cout << phrase << std::endl;
std::vector<std::string> tokens{split_stri... | TOOL | 0.954695 | 4.280878 |
ec2987fb-62a6-4377-8123-4cea84aaac07 | dgkngzlr/DataStructuresAlgorithmsCpp | InsertionSort/main.cpp | /*
* Insertion sort implementation for C/C++.
* It is mostly used for linked lists.
*/
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <chrono>
#define ARR_SIZE 100000
double* generateRandomArray(int size)
{
double rval;
srand(time(NULL));
double* arr = new double[size];
for (int i... | ALGO | 0.999949 | 5.596643 |
c90a9dfc-0c2f-4513-bf70-a84039a88613 | JianCong-WENG/IterCluster | IterCluster/IterCluster-MCL/src/eigen-eigen-b9cd8366d4e8/doc/examples/TutorialLinAlgSVDSolve.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
MatrixXf A = MatrixXf::Random(3, 2);
cout << "Here is the matrix A:\n" << A << endl;
VectorXf b = VectorXf::Random(3);
cout << "Here is the right hand side b:\n" << b << endl;
cout << "The least-squares ... | ALGO | 0.999863 | 3.896713 |
c8627d7f-89d2-485a-8862-69a752d1cb12 | janghyunroh/codetree-TILs | 250102/반복 출력하기/repeated-output.cpp | #include <iostream>
using namespace std;
int N;
int main() {
cin >> N;
for(int i = 0; i < N; i++) cout << "12345^&*()_\n";
return 0;
} | ALGO | 0.995375 | 3.802554 |
dcb89b5b-6686-4a44-8d2a-6895828a5ac1 | Carpeu/ADS | 4º - Semestre - Estrutura de Dados/Aula 04/FilaCircularMenu.cpp | #include <iostream>
#include <string.h>
#define MAX_FILA 5 // Tamanho mximo da fila circular
using namespace std;
struct DADOS_ALUNO {
int CodAluno;
char Nome[100];
int Turma;
bool Removido;
};
// Assinaturas das funes
bool Enfileirar(DADOS_ALUNO Fila[], int CodAluno, char Nome[], int Turma, int &FimF... | ALGO | 0.982966 | 5.041474 |
86f5b948-5af5-40d5-9223-9f2186568fdd | ssri07/Hacktoberfest22 | cp/86-partition-list/86-partition-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* partition(L... | ALGO | 0.999995 | 5.302963 |
5d47239a-016a-42f4-b031-00602c093892 | SehajMander/dsa_with_cpp | BinaryTree/Traversals.cpp | #include<iostream>
#include<queue>
using namespace std;
class node {
public:
int data;
node *left;
node *right;
node(int d){
this -> data = d;
this -> left = NULL;
this -> right = NULL;
}
};
node *buildTree(node *root){
cout<<"Enter the data : "<<en... | ALGO | 0.999814 | 4.680869 |
5d2d85c8-a44a-4f8a-99d9-911d92c74710 | JessicaSt0ne/datastructure | week10/hw10/t2.cpp | #include <iostream>
#include <vector>
using namespace std;
int findSmid(vector<int>& a, vector<int>& b){
int m = a.size();
int n = b.size();
if(m != n){
return -1;
}
int i = 0, j = 0;
int count = 0;
int prev = 0, curr = 0;
while(count <= m){
prev = curr;
if(i < ... | ALGO | 0.999969 | 5.411476 |
2c4c3290-8a25-432b-8804-604264c1fcb9 | Abdullah-Asif/Codeforces | CodeForces/CF-1352C.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long int t, n, k, x, y;
cin >> t;
while (t--) {
cin >> n >> k;
x = ((k / n) + k);
if (n == 2) cout << n * k - 1 << endl;
//else if (x % n == 0) cout << x + 1 << endl;
else if (x / n > k / n) {
x = x / n;
... | ALGO | 0.999945 | 3.499239 |
7b54cfec-3414-46c3-a2f2-5f1e9a91cce7 | lpapp/leetcode | misc/198-House-Robber/main3.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
// Runtime Complexity: O(N) - The max is calculated at each house once.
// Space complexity: O(N) - Caching the max value at each house.
// N: number of houses.
int rob(vector<int>& nums) {
std::size_t snums = nums.size();
std::vec... | ALGO | 0.999627 | 6.015816 |
ee0793e0-84ff-4241-b82f-efa2642cefd5 | MuhammadRukon/problem-solving | Choose_Three.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int x;
cin>>x;
for(int l=0; l<x; l++){
int n, target;
cin >> n>> target;
int arr[n];
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
int flag= 0;
for(int i=0; i<n-2; i++){
for(int j=i+1;j<n-1; j++... | ALGO | 0.999908 | 4.238088 |
02b94e93-7485-45c5-8ccc-96fdb5256c69 | sujithareddy40/C- | min max in array.cpp | #include <iostream>
using namespace std;
void findMinMax(int arr[], int n, int &min, int &max) {
min = arr[0];
max = arr[0];
for (int i = 1; i < n; i++) {
if (arr[i] < min)
min = arr[i];
if (arr[i] > max)
max = arr[i];
}
}
int main() {
int n;
cout << "En... | ALGO | 0.999811 | 5.116139 |
173a714c-01fe-4285-8a61-e7952b30e03e | NadaElokaily/ProblemSolving | 100-same-tree/same-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.999931 | 6.450904 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.