uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
8ecb7907-7460-401e-bcd6-219600e5ecf3 | urnisha19/Computer-Graphics-Multimedia-Codes | 4. Line drawing using direct equation/main.cpp | #include<stdio.h>
#include<GL/glut.h>
#include<GL/gl.h>
#include<GL/freeglut.h>
#include<math.h>
void init();
void display();
float x_1, y_1, x_2, y_2, start, end, y, m, c;
int main(int argc, char** argv)
{
printf("Enter the two end-points of the line:-\n");
printf("x1: ");
scanf("%f", &x_1);
printf... | ALGO | 0.995863 | 3.708236 |
0b83f684-dea5-496f-83cc-e7e66deb9876 | Sunidhi-Tiwari/Leetcode | Permutations in array - GFG/permutations-in-array.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
bool isPossible(long long a[], long long b[], int n, long long k) {
sort(a, a+n);
sort(b, b+n, greater<int>());
for(int i = 0; i<n; i++)
if(a[i] + ... | ALGO | 0.999913 | 5.83603 |
a6aade7b-333a-494f-a379-47da149ab3e1 | allem40306/Competitive-Programming | zerojudge/D750~999/zjd835.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
string r="",s;
while(cin>>s){
r+=s;
}
a=b=0;
for(int i=0;i<r.size()-1;i++){
if(r[i]=='E')break;
if(r[i]=='W'){
a++;
}else{
b++;
}
if((a>=11||b>=11)&&abs(a-b... | ALGO | 0.999882 | 3.052468 |
661017a0-123c-4137-aae2-c6208843a2fc | gwidding/codingTest | 프로그래머스/unrated/181935. 홀짝에 따라 다른 값 반환하기/홀짝에 따라 다른 값 반환하기.cpp | #include <string>
#include <vector>
using namespace std;
int solution(int n) {
int answer = 0;
if (n % 2 == 1){
for (int i = 1; i<=n; i+=2){
answer += i;
}
}
else {
for (int i = 2; i<=n; i+=2){
answer += i*i;
}
}
return answer;
} | ALGO | 0.999574 | 5.037781 |
5a3065f1-de8b-4ebb-9d9c-dda31bd9b116 | champmaniac/SolvingLeetCodeProblems | Day 43/SameTree.cpp | class Solution {
public:
bool isSameTree(TreeNode* p, TreeNode* q) {
if(p==NULL || q==NULL)
return (p==q);
return (p->val==q->val) && isSameTree(p->left,q->left) && isSameTree(p->right,q->right);
}
}; | ALGO | 0.999986 | 6.381055 |
009f45f1-a553-4b35-a0aa-a4cffbc006f3 | jeanlemotan/silkopter | eigen/doc/examples/tut_arithmetic_dot_cross.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace Eigen;
using namespace std;
int main()
{
Vector3d v(1,2,3);
Vector3d w(0,1,2);
cout << "Dot product: " << v.dot(w) << endl;
double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar
cout << "Dot product via a matrix product... | ALGO | 0.999117 | 4.042919 |
5842fec9-116c-4d2b-bb75-23a7a116938f | Iamutkarshkumar/MyCodes | Codeforces/Non_Primes_101.cpp | // #include <bits/stdc++.h>
// using namespace std;
// #define gc getchar_unlocked
// #define fo(i, n) for (i = 0; i < n; i++)
// #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
// #define ll long long
// #define deb(x) cout << #x << "=" << x << endl
// #define pb push_back
// #define mp... | ALGO | 0.999646 | 4.614723 |
d2943ea9-90d3-4ac2-98cf-fc2c56ba34ac | MowMoney/SKR-V1.4-TURBO-BUGFIX-2.0.X | Marlin/qr_solve.cpp | #include "qr_solve.h"
#ifdef AUTO_BED_LEVELING_GRID
#include <stdlib.h>
#include <math.h>
//# include "r8lib.h"
int i4_min ( int i1, int i2 )
/******************************************************************************/
{
int value;
if ( i1 < i2 )
{
value = i1;
}
else
{
value = i2;
}
r... | ALGO | 0.999926 | 4.77243 |
27580b40-7d36-42d5-b877-d03aba412797 | gautamshah6/Coding_Blocks_Solution-c- | aggresive_cow.cpp | #include<bits/stdc++.h>
using namespace std;
bool cowstall(int a[],int n,int c, int mid)
{
int last_cow =a[0];
int cow=1;
for(int i=1;i<n;i++)
{
if(a[i]-last_cow>=mid)
{
last_cow=a[i];
cow++;
if(cow==c)
{
return true;
... | ALGO | 0.999995 | 3.945981 |
15cd257f-f479-44a4-ac2e-88299a8cf9a4 | whitevenus/Modern-C-Programming-from-Introduction-to-Practice | practice/chapter02/practice2_3.cpp | #include <cstdio>
enum class Operation
{
Add,
Subtract,
Multiply,
Divide
};
struct Calculator
{
Calculator(Operation op_in)
{
op = op_in;
}
int calculate(int a, int b)
{
int result{};
switch (op)
{
case Operation::Add:
{
r... | TOOL | 0.972995 | 5.372131 |
479305a5-1304-4177-b043-991fa305ffa6 | PaulPruenster/VC_Legenden | assignment5/src/water.cpp | #include "water.h"
float waveHeight(Vector2D pos, float t, const WaveParams& params)
{
return params.amplitude * sin(dot(normalize(params.direction), pos) * params.omega + t * params.phi);
}
float waterHeight(const WaterSim &sim, Vector2D position)
{
return waveHeight(position, sim.accumTime, sim.parameter[0]... | ALGO | 0.999393 | 3.853888 |
73aff524-07c2-4b4c-bd27-4e004ac5d8f9 | sarvex/leetcode-tsh | solution/1600-1699/1603.Design Parking System/Solution.cpp | class ParkingSystem {
public:
vector<int> cnt;
ParkingSystem(int big, int medium, int small) {
cnt = {0, big, medium, small};
}
bool addCar(int carType) {
if (cnt[carType] == 0) return false;
--cnt[carType];
return true;
}
};
/**
* Your ParkingSystem object will b... | ALGO | 0.979838 | 5.941752 |
6a4e0077-e247-4c14-9596-aa9fc3d29dc8 | assemMoh/Problem-Solving | CodeForces/560A/40218810_AC_30ms_4kB.cpp | #include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, entry, check = 0;
cin >> n;
while(n--)
{
cin >> entry;
if(entry == 1) check = 1;
}
if (check) cout << -... | ALGO | 0.999569 | 3.794166 |
d58f211c-86a1-4562-93c8-7204111bea9a | Mohibahmed2001/Data-Structure-and-Algos | 14-longest-common-prefix/longest-common-prefix.cpp | class Solution {
public:
string longestCommonPrefix(vector<string>& v) {
string prefix="";
prefix = v[0];
for(int i=1;i<v.size();i++){
int j=0;
while(j<v[i].size()&&j<prefix.size()&&prefix[j]==v[i][j]){
j++;
}
prefix = prefix.subst... | ALGO | 0.999828 | 5.536953 |
54fe828d-2632-42b7-9c34-9625780d569f | auee028/BEP | bep4/opening_and_closing.cpp | # include <iostream>
# include <opencv2/opencv.hpp>
# include <opencv2/core.hpp>
# include <opencv2/highgui.hpp>
using namespace std;
using namespace cv;
void zeroPad(Mat img_in, Mat& img_padding, int mask_size) {
int height = img_in.rows;
int width = img_in.cols;
img_padding = Mat(height + (mask_size - 1), widt... | ALGO | 0.996768 | 4.853627 |
ccc2ae7d-de77-42f1-a332-227b60d0d076 | ishandutta2007/codeforces | strawberryc/normal/1684/G.cpp | #include <bits/stdc++.h>
template <class T>
inline void read(T &res) {
res = 0; bool bo = 0; char c;
while (((c = getchar()) < '0' || c > '9') && c != '-');
if (c == '-') bo = 1; else res = c - 48;
while ((c = getchar()) >= '0' && c <= '9')
res = (res << 3) + (res << 1) + (c - 48);
if (bo) res = ~res + 1... | ALGO | 0.999976 | 3.099994 |
4558e2c1-203c-46ab-97b3-eb0edc714789 | haegenpro/Tucil2_13523099_13523109 | src/error_measurement/ssim.cpp | #include "ssim.hpp"
static constexpr double k1 = 0.01;
static constexpr double k2 = 0.03;
static constexpr double L = 255.0;
double SSIM::computeChannelSSIM(double sumRef, double sumTest,
double sumRef2, double sumTest2,
double sumRefTest, int count)
{
... | ALGO | 0.996223 | 6.150641 |
3266f3e3-e4f9-4697-8e35-5a726f8cba44 | LEECHHE/acmicpc | solved/1406.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
typedef struct node{
char data;
struct node* prev;
struct node* next;
node(){}
node(char data):data(data), prev(NULL), next(NULL) {}
}node;
class str{
public:
node *head;
node *cursor;
str(){
head = NUL... | ALGO | 0.999892 | 3.939656 |
3fba1c70-d418-4b58-bad6-00235180abed | Ishita-Trivedi/DailyDSA | 2707-extra-characters-in-a-string/2707-extra-characters-in-a-string.cpp | class Solution {
public:
map<string,int>mp;
vector<int>dp;
int helper(int i,string s,int n){
if(i>=s.length())return 0;
if(dp[i]!=-1)return dp[i];
int mini=1e9;
string current="";
for(int k=i;k<n;k++){
current+=s[k];
if(mp.find(current)!=mp.end... | ALGO | 0.999951 | 6.070115 |
780d1c0c-f112-48cc-9bc6-1df3764e10c8 | sdwalker233/ICPC | codeforces/#305-div2(2015.5.27)/A.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
char s[1010];
int n,i,j,len,l;
scanf("%s%d",s+1,&n);
len=strlen(s+1);
if(len%n){
printf("NO\n");
return 0;
}
l=len/n;
for(i=1;i<=len;i+=l){
for(j=0;j<l;j++)
if(s[i+j]!=s[i+l-j-1]){
printf("N... | ALGO | 0.999997 | 3.152418 |
1c8af181-c8bf-4a8a-81d5-f5d0bbbe81e9 | jonghwan83/StudyAlgo1 | swExpert/WordGame/main.cpp | #ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdio.h>
#include <time.h>
#define CMD_INIT 100
#define CMD_JOIN 200
#define CMD_PLAY_ROUND 300
#define CMD_LEAVE 400
#define MAXN 10000
#define MAXM 1500
#define MAXL 10
extern void init(int N, char mWordList[][MAXL + 1], char... | ALGO | 0.962914 | 3.197422 |
8609f637-94c6-4564-8241-77bca080b9b4 | neelchoudhury/cp | Codechef and Spoj/1-K/CISCO16P3.cpp | #include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define MOD 1000000007
#define mem(a) memset(a,0,sizeof(a))
#define pb push_back
#define ff first
#define ss second
using namespace std;
int main()
{
ll t;
string a="",b="";
cin>>t;
while(t--)
{
cin>>a;
cin>>b;
ll i=0,j=0;
ll f=0... | ALGO | 0.999982 | 4.400351 |
28152a35-3706-4eae-be77-2cb84f25c68b | LokeshBolisetty/DSA | Arrays/infosysDeepthi.cpp | /*
You are given a binary string of length N
in one operation you can either remove the substruing "10" or "11" such that the size of the str reduces by 2.
Find the minimum length of hte string you can obtain by doing the operation any number of times.
*/
#include<iostream>
#include<vector>
using namespace std;
int ma... | ALGO | 0.999932 | 4.720296 |
2d115b10-07b5-402d-a127-e1a4feb2b5f4 | pratyush2331/DSA_Love-Babbar | 03. STL/Basics/L19_7_priority_queue.cpp | // C++ priority_queue in STL
// Note: By default, C++ creates a max-heap for priority queue
#include<iostream>
#include<queue>
using namespace std;
int main() {
priority_queue<int> maxi; // max-heap (default)
priority_queue<int, vector<int>, greater<int>> mini; // min-... | ALGO | 0.984251 | 4.486934 |
6d34e66e-722c-47d2-bcfd-0bf1db94c0a6 | eldeshue/PS | BOJ/unclassified/1459_solved.cpp |
#include <iostream>
int main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
long long s, l, block_time, diag_time, total = 0;
std::cin >> s >> l >> block_time >> diag_time;
if (s > l)
std::swap(s, l);
if (diag_time < 2 * block_time)
{
l -= s;
total += s * diag... | ALGO | 0.999689 | 3.534101 |
26ab0a85-5dd1-4c90-a04e-d3d4d1d5ed8c | kokohuhusave/Programmers_Coding_Test | 프로그래머스/2/12914. 멀리 뛰기/멀리 뛰기.cpp | #include <string>
#include <vector>
#define NUM 1234567
using namespace std;
long long solution(int n) {
vector<long long> arr(n + 1);
arr[0] = 1;
arr[1] = 2;
arr[2] = 3;
for (int i = 3;i <= n;i++) {
arr[i] = arr[i - 1] + arr[i - 2];
arr[i] = arr[i] % NUM;
}
return arr[... | ALGO | 0.999946 | 4.619554 |
19442562-1a95-45e8-948f-7d1fa4b2846c | Donkwame/propertytrader | propertytrader/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.998422 | 6.76073 |
3db1e6b9-e85f-4a57-a904-1a58d9d05e6f | Sikiruu/icon_isc25 | core/common/utils.cpp | void utils_muphys::calc_dz(array_1d_t<real_t> &z, array_1d_t<real_t> &dz,
size_t &ncells, size_t &nlev) {
dz.resize(ncells * nlev);
array_2d_t<real_t> zh(nlev + 1, array_1d_t<real_t>(ncells));
for (size_t i = 0; i < ncells; i++) {
zh[nlev][i] = (static_cast<real_t>(3.0) * z[i + (nl... | ALGO | 0.998886 | 5.034222 |
2db55a79-bd6b-408c-9f4f-a910f85a2d6a | jefferyyellow/UE4 | UnrealEngine-4.26/Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactSphereHeightField.cpp | #include "GuVecBox.h"
#include "GuVecShrunkBox.h"
#include "GuVecConvexHull.h"
#include "GuVecConvexHullNoScale.h"
#include "GuVecTriangle.h"
#include "GuGeometryUnion.h"
#include "GuContactMethodImpl.h"
#include "PxTriangleMesh.h"
#include "GuContactBuffer.h"
#include "GuHeightField.h"
#include "GuPCMContactConvexCom... | ALGO | 0.988543 | 7.225429 |
2f693a2b-431c-4cd0-b149-e126c671fd32 | ishandutta2007/codeforces | 18michael/normal/1603/A.cpp | #include<bits/stdc++.h>
#define LL long long
#define Mx 1000000000
using namespace std;
int n,Test_num,ok;
LL res;
int a[1000002];
template<class T>void read(T &x)
{
x=0;int f=0;char ch=getchar();
while(ch<'0' || ch>'9')f|=(ch=='-'),ch=getchar();
while(ch>='0' && ch<='9')x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
x=f? -... | ALGO | 0.999923 | 3.856447 |
e6cf11c0-ff72-43e6-8f8f-dc4626b2dc1d | ishandutta2007/codeforces | kostroma/normal/1738/B.cpp | #pragma comment(linker, "/STACK:512000000")
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <deque>
#include <memory>
#include <chrono>
#include <cassert>
#include <random>
#include <queue>
#include <set>
#include <map>
#include <array>
#include... | ALGO | 0.999996 | 3.847608 |
9634d11c-5960-40f5-9170-bb883a93ec2d | xanthospap/iers2010 | examples/solid_earth_tide_displacement.cpp | #include "fundarg.hpp"
#include "solid_earth_tide.hpp"
#include "earth_rotation.hpp"
#include "planets.hpp"
using namespace dso;
int main(int argc, char *argv[]) {
if (argc != 4) {
fprintf(stderr, "Usage: [eopc04.1962-now] [de421.bsp] [naif*.tls]\n");
return 1;
}
/* Approx ITRF coordinates for site DIO... | ALGO | 0.996432 | 3.976568 |
7d9e2950-2483-4e2e-b7c9-d1534810ad2a | ishandutta2007/codeforces | penguinhacker/normal/1204/C.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, dist[101][101], p[1000000];
bool adj[101][101];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
string inUse;
for (int i=1; i<=n; ++i) {
cin >> inUse;
for (int j=0; j<n; ++j) {
adj[i][j+1] = (inUse[j]=='1');
}
for (int j=1; j<=n; ++j... | ALGO | 0.999982 | 3.813278 |
80edef16-e7ab-43cf-9294-0408c3e4cbdd | sagsango/cp | code/uva/869.cpp | #include<bits/stdc++.h>
#define int long long
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int N = 26;
int d1[26][26],d2[26][26];
int T,t , m1, m2;
char u,v;
int32_t main()
{
IOS
cin>>T;
for(int t=0;t<T;t++)
{
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
d1[i][j]=d2[i... | ALGO | 0.99982 | 4.661419 |
b65b7b07-32b6-40c5-a9c3-553d52624dac | AdamzkT/Prog1 | source/drill21/drill21_2.cpp | #include "std_lib_facilities.h"
#include<map>
#include <numeric>
void read(map<string,int>& map)
{
string name;
int value;
cin >> name >> value;
map.insert(pair<string,int>(name,value));
}
int main() {
map<string, int> msi;
msi["apple"] = 2; // input 10 map entries
msi["cheese"] = 6;
msi["spoon"] = 5;
msi["... | ALGO | 0.940565 | 4.559841 |
a2da06fa-1380-4de2-8d49-caf6e7533303 | ishandutta2007/codeforces | rafbill/normal/930/C.cpp | #ifndef __clang__
#pragma GCC optimize "-O3"
#pragma GCC target "tune=native"
#endif
#ifdef ONLINE_JUDGE
#define NDEBUG 1
#endif
#include <stdio.h>
#include <bits/stdc++.h>
#define FOR(i, n) for(lli i = 0; i < (lli)(n); ++i)
#define FORU(i, j, k) for(lli i = (j); i <= (lli)(k); ++i)
#define FORD(i, j, k) for(lli i... | ALGO | 0.999982 | 4.302015 |
06bf54c9-b75b-4688-a96a-e1d499f8c56a | 2369931/LintCode | code/64_合并排序数组.cpp | #include <iostream>
using namespace std;
void mergeSortedArray(int A[], int m, int B[], int n) {
int C[m+n];
int i = 0;
int j = 0;
int l = 0;
while (i < m || j < n) {
if (A[i] <= B[j] && i < m) {
C[l] = A[i];
l++;
i++;
}
else if (A[i] <= ... | ALGO | 0.999927 | 4.874272 |
f2b421e8-2359-4986-8fe5-0a82fbccc038 | randombit/botan | src/lib/pubkey/ed25519/ed25519_fe.cpp | #include <botan/internal/ed25519_fe.h>
#include <botan/internal/ed25519_internal.h>
namespace Botan {
//static
Ed25519_FieldElement Ed25519_FieldElement::invert() const {
auto t0 = this->sqr();
auto t1 = t0.sqr_iter(2);
t1 = *this * t1;
t0 = t0 * t1;
auto t2 = t0.sqr();
t1 = t1 * t2;
t2 = t1.sqr... | ALGO | 0.999433 | 5.872877 |
a6c1827e-1c3d-440d-b961-9d2ab3577ad6 | koosaga/olympiad | Library/USACO-master/Contests/USACO Solutions/2019-20/Open/Silver/moop.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
#define mp make_pair
#define f first
#define s second
typedef vector<int> vi;
typedef vector<ll> vl;
... | ALGO | 0.999979 | 4.48204 |
3b54a593-d00b-43fd-adc8-03ccc133bfe0 | Shivranjan17/LB | program387.cpp | #include <iostream>
using namespace std;
struct node {
int data;
struct node * next;
};
typedef struct node NODE;
typedef struct node * PNODE;
class SinglyCLL{
private:
int iCount;
PNODE First;
PNODE Last;
public:
SinglyCLL();
void Display();
int Count();
void InsertLast (int No... | ALGO | 0.99971 | 4.302435 |
789edfca-ff8b-4fdd-b152-6bfb53ff6611 | Omar-Montaser/Social-Sphere | src/Graph.cpp | #include "Graph.hpp"
#include "User.hpp"
#include "Queue.hpp"
Graph::Graph(int numUsers) {
adjList.resize(numUsers, Vector<int>());
}
Graph::Graph(Vector<Vector<int>> v){
adjList = v;
}
void Graph::addFriendship(int user1, int user2) {
adjList[user1].push_back(user2);
adjList[user2].push_back(user1);... | ALGO | 0.979855 | 4.950901 |
7dc1969b-39d0-46e6-9602-584289b28b62 | vbonnici/grafe-sim | analysis/data/p01314/s285116408.cpp |
#include <iostream>
using namespace std;
int main(){
int n;
while( true ){
cin >> n;
if( !n ) break;
// a:テつ催δつ湘つャテつづδ古つ静つョテつ静つ氾つ、kテつ古δづつづδ古つ和テつづδーテつ偲δヲテつづδゥ
// kテつ古δづつづδ古つ和テつづつェnテつづδつづδ暗つづδゥテつづδヲテつづつ、テつづδテつづつェテつ妥つカテつ催δ敕つづつキテつづδゥテつづつゥテつづδーテつ津つイテつづδ療つづδゥ
// n = k*a+k(k-1)/2
int sum = 0,a... | ALGO | 0.999523 | 3.701091 |
f1c5d288-e57e-49bc-ac21-b893091fc9fa | 101SkShabbirHussainAryanKhaN/MachineLearningAndDataScience | C++ 2/cube.cpp | #include <iostream>
using namespace std;
main()
{
while(true)
{
int cube,num;
cout<<"\nEnter the base value:"<<endl;
cin>>num;
cube=num*num*num;
cout<<"The cube of required number is: "<<cube<<endl;
}
}
| TOOL | 0.971386 | 3.075442 |
3fe7f96c-da60-421b-a2db-24bae3748376 | nobushi95/Boot_camp_for_Beginners | easy100/087.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define REP(i, left, right) for (ll i = left; i < right; i++)
#define REPEQ(i, left, right) for (ll i = left; i <= right; i++)
#define RREP(i, right, left) for (ll i = right; i >= left; i--)
#define FORE(elem, container) for (aut... | ALGO | 0.999847 | 4.246212 |
681f306e-dbfe-4f5e-abd3-f5c43128581a | ishandutta2007/codeforces | btzy/normal/1503/D.cpp | #include <bits/stdc++.h>
using namespace std;
constexpr int MAXN=200'000;
struct tangle{
int other;
bool prime; // start here
bool visited;
//bool newprime;
};
tangle arr[MAXN*2];
bool visit(int& low, int& high, int& fliplow, int& fliphigh){
/*struct item{
int index;
bool primeness;
... | ALGO | 0.999824 | 3.736135 |
7428455a-2731-4aa9-b752-3b10d44d87b6 | chenjunhao0315/Tensor | Tensor/TensorCatKernel.cpp | //
// TensorCatKernel.cpp
// Tensor
//
// Created by 陳均豪 on 2022/2/19.
//
#include "TensorCat.hpp"
#include "TensorCatKernel.hpp"
#include "Dispatch.hpp"
#include "Tensor.hpp"
#include "Vec.hpp"
namespace otter {
struct InputMeta {
void* data_ptr;
int64_t inner_size;
InputMeta(const Tensor& t, int64_... | ALGO | 0.9151 | 6.742966 |
a57a639e-e399-4c31-8bde-afcb860a1409 | AcaiHi/Sunny | 327A.cpp | // 327A.cpp
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int x, n, cnt, maxi, len, res;
bool f;
#define F first
#define S second
int main(){
cin >> n;
bool q[n];
int i = 1;
vector<pair<int, int> > v;
for (bool &x : q){
cin >> x; if (x) cnt++;
if (v.empty() || v.back().F != x)
... | ALGO | 0.999786 | 3.190081 |
247665f0-e952-4ea6-8d33-e37282197c92 | hisenyiu2015/android_frameworks_av | media/libstagefright/codecs/avc/enc/src/sad_halfpel.cpp | /* contains
int AVCHalfPel1_SAD_MB(uint8 *ref,uint8 *blk,int dmin,int width,int ih,int jh)
int AVCHalfPel2_SAD_MB(uint8 *ref,uint8 *blk,int dmin,int width)
int AVCHalfPel1_SAD_Blk(uint8 *ref,uint8 *blk,int dmin,int width,int ih,int jh)
int AVCHalfPel2_SAD_Blk(uint8 *ref,uint8 *blk,int dmin,int width)
int AVCSAD_MB_Hal... | ALGO | 0.999654 | 3.913443 |
8fd4e49c-f49e-43d2-bb1b-fc869863fcf0 | ishandutta2007/codeforces | heno239/normal/1398/A.cpp | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<bitset>
#include<stack>... | ALGO | 0.9992 | 3.593409 |
a03ea473-2ba1-49c8-a560-342cb1ace13d | AST-TheCoder/CP-Solutions | CodeForces/GNU C++14/1473D | Program/104345790.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long int
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define Max 10000000000000000
#define min_heap priority_queue <ll,... | ALGO | 0.999967 | 3.87423 |
fe8e3b67-9587-49a8-ace5-7ccdf69b2a72 | aditya9706/Cudnn | Latest/cublas_gemm_test.cpp | #include <iostream>
#include <string>
#include "cublas.h"
#include "cublas_v2.h"
#define INDEX(row, col, row_count) (((col) * (row_count)) + (row)) // for getting index values matrices
#define RANDOM (rand() % 10000 * 1.00) / 100 // to generate random values
/* 1e-9 for converting throughput in GFLO... | ALGO | 0.984622 | 4.705071 |
a1d8d59a-4d85-4413-a9b4-da6bf1b7ad1a | vaibhavm102/cpp_programs | cpp cadac programming/firstday/palidrome.cpp | #include<iostream>
using namespace std;
int main()
{
int sum=0,r,a,n,temp;
cout<<"enter number";
cin>>n;
temp=n;
while (n>0)
{
r=n%10;
sum=(sum*10)+r;
n=n/10;
}
if (sum==temp)
{
cout<<"num is palidrome";
}
else
cout<<"num is not palidrome";
... | ALGO | 0.999722 | 3.511206 |
214e6b84-0824-45ba-9369-0d1d73a34c3f | meruneru/algorithmPractice | old/TravelingSalesmanAroundLake/main.cpp | #include <algorithm>
#include <climits>
#include <iostream>
#include <vector>
#include <cmath>
#include <numeric>
using namespace std;
// https://stackoverflow.com/questions/21204676/modern-way-to-filter-stl-container/53268928#53268928
template <typename Cont, typename Pred>
Cont filter(const Cont &container, Pred pr... | ALGO | 0.999803 | 4.540543 |
550730b1-cabf-4fef-8750-ade41abd9f6f | reymon359/cplusplustutorial | 3. Compound data types/3. Pointers/3_pointers_and_const.cpp | /*Pointers and const
Pointers can be used to access a variable by its address, and this access may include modifying the value pointed.
But it is also possible to declare pointers that can access the pointed value to read it, but not to modify it.
For this, it is enough with qualifying the type pointed to by the pointe... | TOOL | 0.970451 | 6.09281 |
ec195ce6-7641-40a5-b3b5-5dadb6a5b8d4 | Shubham84095/CPP | A_2023.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4.2")
#define incSort(V) sort(V.begin(), V.end())
#define decSort(V) sort(V.begin(), V.end(), greater<int>())
using namespace std;
typedef long long ll;
//const int M = 1e9 + 7;
//const int N = 1e7 + 10;
void Solution()
{
int n , k;
cin... | ALGO | 0.999777 | 3.860536 |
b27118b7-d4cb-4edb-8c5a-8eea124afb72 | tahahamdii/more-javascript-practice | codeforces cpp/Codeforces Round 973 Div2/passwordcracking.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <random>
#include <set>
#include <map>
#include <cstdint>
#include <algorithm>
#include <string>
#include <utility>
#define int long long
#define uint unsigned long long
#define vi vector<int>
#define vvi vector<vi... | ALGO | 0.999803 | 3.665382 |
182eeb31-158d-4c05-9119-513f54062cea | denisewu/LeetCode | subsets.cpp | /*
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.
The solution set must not contain duplicate subsets.
For example,
If S = [1,2,3], a solution is:
[
[3],
[1],
[2],
[1,2,3],
[1,3],
[2,3],
[1,2],
[]
]
*/
class Solution {
publ... | ALGO | 0.999933 | 6.180147 |
e4862b5b-2d66-46bf-a6b9-fc316d3e6dc2 | subramanyampv/kamino | cpp/VisiTree/SimpleTree.cpp | // SimpleTree.cpp: implementation of the SimpleTree class.
//
//////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "SimpleTree.h"
// Adds an item on the next available slot doing a breadth first search
// roots: A collection of nodes on the same level, all non-null
// le... | ALGO | 0.999094 | 5.558505 |
2762fcec-811c-448b-81d1-e282edf093a2 | david-alejo/resolution | resolution/src/GeneticConfig.cpp | #include "GeneticConfig.h"
#include "functions/functions.h"
using namespace functions;
namespace resolution {
AlgorithmConfig *GeneticConfig::createAlgorithmConfig(ParseBlock& block)
{
AlgorithmConfig *ret = new GeneticConfig();
ret->init(block);
return ret;
}
void GeneticConfig::init()
{
CostConfig::init();
... | CONFIG | 0.936588 | 5.910797 |
af7424c0-8646-42f4-b9c9-2d25ef03f7a4 | cran/Boom | src/Bmath/ftrunc.cpp | #include "nmath.hpp"
namespace Rmath{
double ftrunc(double x)
{
if(x >= 0) return FLOOR(x);
else return ceil(x);
}
}
| ALGO | 0.992068 | 3.563968 |
a8c34ce4-4fb7-45e6-9057-313686cbb630 | MatheusNevs/code-practice | pc/pratica_03/a.cpp | #include <bits/stdc++.h>
using namespace std;
void sequencias_distintas(const string& s, set<string>& combinacoes) {
for (size_t i = 0; i < s.length(); ++i) {
for (int j = i; j < s.length(); ++j) {
combinacoes.insert(s.substr(i, j - i + 1));
}
}
return ;
}
int main() {
str... | ALGO | 0.999842 | 5.096634 |
0689cde8-e419-462b-ad1c-8efaf39aca5d | tamofplease/atcoder_abc | abc191/c/main.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,n) for(int i=1;i<=n;i++)
const ll MOD = 1000000007;
struct edge{
int to,weight;
edge(int to,int weight):to(to),weight(weight){}
};
using Graph = vector<vector<int>> ;
using GraphEdge = vector<vect... | ALGO | 0.999736 | 4.398406 |
1bda8280-2bd2-4796-98a1-1f786a1748d5 | ldcduc/leetcode-training | cpp/last-stone-weight.cpp | /* Problem url: https://leetcode.com/problems/last-stone-weight
* Code by: ldcduc
* */
/* Begin of Solution */
class Solution {
public:
int lastStoneWeight(vector<int>& stones) {
priority_queue<int> Q;
for (int i = 0; i < stones.size(); ++ i) {
Q.push(stones[i]);
}
whil... | ALGO | 0.999426 | 5.635626 |
2163a702-f993-47d8-81e7-dac61b3d2299 | anuja2004/test-gfg | Difficulty: Medium/Longest Subarray with Sum K/longest-subarray-with-sum-k.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
int longestSubarray(vector<int>& arr, int k) {
// code here
int n=arr.size();
// int ans=0;
// for(int i=0;i<n;i++){
// int sum=0;
// for(int... | ALGO | 0.999466 | 6.19907 |
33cc4905-85ce-4276-a07c-17495c7f2faf | ishandutta2007/codeforces | bicsi/normal/612/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define MAXN 300000
unordered_map<int, int> Add, Rem;
vector<int> V;
vector<pair<int, int>> Segms;
void Read(int &x) {
char c, sgn = 0;
for(c = getchar(); !isdigit(c) && c != '-'; c = getchar());
if(c == '-') {sgn = 1; c = getchar();}
for(x = 0; isdigit(... | ALGO | 0.999992 | 3.835868 |
f14af744-0257-43b2-85bb-03e7a2fd10a7 | SIL1202/Sophomore | second_semester/Algorithm/HW2/Advanced Greedy.cpp | #include <algorithm>
#include <chrono>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
using namespace chrono;
// Bottom-Up Dynamic Programming
int Bottom_up(vector<int> &p, vector<int> &w, int total) {
int n = p.size();
vector<vector<int>> dp(n + 1, vector<int>(total + 1));
for (int ... | ALGO | 0.999989 | 5.894435 |
fa997f5a-3b18-4e90-9cec-3b4d87e5a6be | heavenMOJANG/ICPC | .history/luogu/P1856 [IOI1998] [USACO5.5] 矩形周长Picture_20240808155052.cpp | #pragma GCC optimize(1)
#pragma GCC optimize(2)
#pragma GCC optimize(3,"Ofast","inline")
#include<bits/stdc++.h>
#define int long long
using namespace std;
constexpr int INF = 0x7fffffff;
constexpr int N = 2e5 + 10;
struct Node {
int l, r, h, syb;
Node () {}
Node (int a, int b, int c, int d) : l(a), r(b), h... | ALGO | 0.999567 | 3.70788 |
3d5da44d-4b61-433d-b938-17de138bafe6 | arthurWDK/Autoware1 | ros/src/util/packages/map_tools/nodes/map_extender/map_extender.cpp | /*
Localization program using Normal Distributions Transform
Yuki KITSUKAWA
*/
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <ros/ros.h>
#include <sensor_msgs/PointCloud2.h>
#include <geometry_msgs/PoseWithCovarianceStamped.h>
#include <tf/tf.h>
#include <tf/transform_broad... | DATA | 0.928816 | 5.449749 |
c7e37de9-59a0-419e-b5a5-fb11c6351ed4 | pointer-authentication/pcan-llvm | clang-tools-extra/include-fixer/IncludeFixer.cpp | #include "IncludeFixer.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Parse/ParseAST.h"
#include "clang/Sema/Sema.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#define DE... | TOOL | 0.93599 | 3.077182 |
ac6036b7-255b-41b7-a252-046c8e5fc679 | TRAN-THUY-NGOC/UPCODER | UPCODER/Other/TBCMANG.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
int n;
cin >> n;
int arr[n], cnt = 0, res = 0;
for (int &x : arr) cin >> x;
for (int x : arr)
if (x % 2 != 0) res += x, cnt++;
cout << fixed << setprecision(1) << (double) res/cnt;
return 0;
} | ALGO | 0.998722 | 3.879527 |
a3658f07-51e5-4d7a-8402-2b5c82126b1d | BaoZhuhan/Awesome-SE-Box | 00课程技术栈/ACMTrain/OnlineTrain/LeetCode/Mid/2180.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int maxNumberOfAlloys(int n, int k, int budget, vector<vector<int>>& composition, vector<int>& stock, vector<int>& cost) {
//use binary search
int left = 0 , right = 2e8 , ans = 0;
while(left <= right){
int m... | ALGO | 0.99963 | 4.007919 |
e6c3ff36-6ecf-4d00-bce4-22ff9040d261 | Beisenbek/PP1_Spring2020 | week2/18.cpp | #include <iostream>
using namespace std;
int main(){
int i = 1;
do{
cout << i << endl;
i = i + 1;
}while(i <=100);
return 0;
} | TOOL | 0.937691 | 3.353916 |
ffecbd0e-106b-4957-b6b4-3739d1ede44b | asifjahan1/JU-Bus-Route-Tracer | google_map_demo/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.99808 | 6.76073 |
7745065c-376a-4125-8bcc-faeecd72c1c6 | jungin0507/problem-solving | BOJ/1000/1047.cpp | #include <bits/stdc++.h>
#define pii pair<int, int>
#define pdi pair<double, int>
#define pdd pair<double, double>
#define pid pair<int, double>
#define pll pair<ll, ll>
#define pli pair<ll, int>
#define INF 987654321
#define vi vector<int>
#define sq(x) ((x) * (x))
#define rep(from, to, stride) for (auto i = (from); ... | ALGO | 0.999781 | 4.258515 |
f52ca477-3cd2-4b99-8c2f-0aa077930e2b | thelazy/ContestCodes | Codeforces/Div2-388/c.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
long long n, i; string s;
cin>>n; cin>>s;
queue<long long> dq;
queue<long long> rq;
for(i=0; i<n; i++){
if(s[i]=='D')
dq.push(i);
else
rq.push(i);
}
long long q1, q2;
while(dq.size()>0&&rq.size()>0){
q1 = dq.front(); q2 = rq.front();
dq.p... | ALGO | 0.999928 | 3.534996 |
bb5c891b-ba4b-4182-8f20-8216bfd941ae | Yoyuuhi/cpp-atcoder | _result/_AtCoderBeginnerContest369/A-369/main.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
#define out(X) cout << (X) << endl;
#define outs(XS) \
for (auto X : XS) cout << X << " "; \
cout << endl;
#define outl cout << endl;
#ifdef __LOCAL
#define DBG(X) cout << #X << " = " << (X) << endl;
#else
#define DBG(X)
#endif
#define rep(i, n) ... | ALGO | 0.999952 | 4.050804 |
f889857b-a62c-4c3e-b8b3-bbb5fcaca01f | hyeunkim42/algorithm | baekjoon/sol_mar/m20/2998.cpp | #include <bits/stdc++.h>
using namespace std;
string octet[8]={"000", "001", "010", "011", "100", "101", "110", "111"};
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
string binary; cin >> binary;
while (binary.length()%3){
string tmp="0" + binary;
binary = tmp;
}
int idx=0;
while (idx < binary.leng... | ALGO | 0.999697 | 3.832496 |
203d1d00-4aa4-4a6c-a57a-20b84c6331a2 | risal-shefin/Competitive-Programming | LightOJ/1185 - Escape - 1364496.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
vector <ll> g[110];
bitset <2> v[110];
ll cnt = 0;
void dfs(ll u, bool state, ll p)
{
if(v[u][state])
return;
if(state && p != -1) cnt++;
if(p != -1)
v[u][state] = 1;
for(ll i = 0; i < g[u].size(); ... | ALGO | 0.999811 | 4.202863 |
fba0171a-16e1-489d-989e-db7d6a90c3e3 | lengmuzhaxi/atcoder | AtCoder Beginner Contest 378/C.cpp |
#include<iostream>
#include<map>
using namespace std;
int N,a,i=1;map<int,int>M;
int main(){
cin>>N;
for(;i<=N;i++){
cin>>a;
cout<<M[a]-1<<' ';
M[a]=i+1;
}
} | ALGO | 0.999884 | 3.259505 |
21caf819-c249-4d44-9dac-f716d0d74b07 | cornyum/acm_summer | Day_4/B.cpp | #include <bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int UINT;
#define FAST_IO std::ios::sync_with_stdio(false),std::cin.tie(0),std::cout.tie(0)
using namespace std;
int const maxn = 100010 * 2;
struct node {
int v, next;
}e[maxn];
int dep[maxn >> 1], head[maxn], father[ma... | ALGO | 0.999991 | 4.293813 |
a4ad32f9-1dac-479e-a297-e9a00700226c | ishandutta2007/codeforces | xlk/normal/263/A.cpp | #include<stdio.h>
#include<iostream>
#include<string.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
using namespace std;
#define fr(i,n) for(int i=0;i<n;i++)
#define fo(i,n) for(int i=1;i<=n;i++)
#define fe(i,n) for(__typeof(n.begin()) i=n.begin();i!=n.end();i++)
int n=5,zi,zj;
int a[10][10];
int main()
{
... | ALGO | 0.999337 | 3.044957 |
de13e82d-dcc2-4fa3-b2c5-07919cd73895 | syedMohib44/Multithread_NeuralNetwork | src/main.cpp |
#include "neural_network/NeuralNetwork.h"
#include "helpers/utils.h"
#include "algos/BackPropagation.h"
#include "algos/Shakingtree.h"
#include "dataset/DataSet.h"
#include <ctime>
#include <numeric>
#include <fstream>
#include <iostream>
#include <vector>
#include <limits>
#include <thread>
#include "algos/ThreadG... | ALGO | 0.996545 | 4.306193 |
3bce49db-4982-45e7-82c7-e6f3ad8e3d46 | EffortLEE911/algorithm | lecture06/ConsoleApplication1/ConsoleApplication1/project.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int arr[9]; //
int visited[9]; // 湮 ǥ
int main() {
for (int i = 1; i < 9; i++) {
arr[i] = 1;
}
int d_x[2] = { -1, +1 }; // ̵
queue<int> q;
int dinosaur = 3;
int apple = 8;
q.push(dinosaur);
visited[dinosaur] = 1;
int nex... | ALGO | 0.999783 | 3.414367 |
673238bf-6fd7-4ce8-996e-75e237e2d2b9 | raincross7/code-similarity | codes/train_code/problem387/problem387_185.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <climits>
#include <map>
#include <set>
const int mod = 1e9 + 7;
const int inf = 1 << 20;
const long long INF = 1LL << 60;
using namespace std;
typedef long long ll;
typedef pair<in... | ALGO | 0.99998 | 4.521713 |
6cf4c709-5137-4aba-bb77-eb05eee974e7 | C-2023-1-3/8209230224-ZhangZiming | text4_2.cpp | /*#include<iostream>
using namespace std;
void bubble_sort(double arr[])
{
for (int i = 0; i < 10; i++)
{
for (int m = 0; m < 9 - i; m++)
{
if (arr[m] > arr[m + 1])
{
double mid = arr[m + 1];
arr[m + 1] = arr[m];
arr[m] = mid;
}
}
}
}
int main()
{
double arr[10] = { 1.26,5.56,8.20,9.... | ALGO | 0.999776 | 3.832507 |
77e89b9e-81b0-49df-9a1a-b01293c96043 | ishandutta2007/codeforces | square1001/normal/732/C.cpp | #include <iostream>
#include <algorithm>
using namespace std;
long long a[3];
int main() {
for (int i = 0; i < 3; i++) cin >> a[i];
long long ret = 1LL << 62;
for (int i = 0; i <= 2; i++) {
for (int j = 0; j <= 2; j++) {
long long t[3] = { 0 };
for (int k = i; k != (j + 1) % 3; k = (k + 1) % 3) t[k]++;
lo... | ALGO | 0.999965 | 3.80503 |
59bb9cd6-aeac-477f-891a-6d9d73315c19 | LTNGlobal-opensource/vlc-sdi | modules/demux/mkv/virtual_segment.cpp | #include <vector>
#include "demux.hpp"
/* FIXME move this */
matroska_segment_c * getSegmentbyUID( KaxSegmentUID * p_uid, std::vector<matroska_segment_c*> *segments )
{
for( size_t i = 0; i < (*segments).size(); i++ )
{
if( (*segments)[i]->p_segment_uid &&
*p_uid == *((*segments)[i]->p_seg... | TOOL | 0.947219 | 4.407463 |
9796136f-cbed-47fc-bb69-e93e69d7fc5c | eaulisa/MyFEMuS | applications/SW/lock_exchange_zlevel_2matrices/lock_exchange_zlevel_2matrices.cpp | /** tutorial/Ex1
* This example shows how to:
* initialize a femus application;
* define the multilevel-mesh object mlMsh;
* read from the file ./input/square.neu the coarse-level mesh and associate it to mlMsh;
* add in mlMsh uniform refined level-meshes;
* define the multilevel-solution object mlSol associated ... | ALGO | 0.993797 | 3.73283 |
8bd0d359-32c1-4de4-86e6-1a153a6d1f96 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/Phi/top0-100/maximum-total-beauty-of-the-gardens-Solution4.maximumBeauty/177786_DoS_Exec_Code_Overflow.cpp | void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
int *maskColors, GBool inlineImg) {
double *ctm;
SplashCoord mat[6];
SplashOutImageData imgData;
SplashColorMode srcMode;
SplashImageSource src;
GfxGray gray;
GfxRGB rg... | TOOL | 0.934594 | 4.254801 |
85f86efe-9687-4381-9c27-c3627c73a815 | brenosmBR/ap_shop_flutter_breno_menezes | 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.998859 | 6.785645 |
f7d18600-6b6b-4608-afa4-e25cd371daec | lemoneid/1.do-exercises | redo/3.C++/17.const.cpp | /*************************************************************************
> File Name: 17.cas.cpp
> Author: yanzhiwei
> Mail: <EMAIL>
> Created Time: 2021年04月16日 星期五 22时31分57秒
************************************************************************/
#include <iostream>
#include <algorithm>
#include <cstdio>
#inc... | ALGO | 0.956839 | 3.798849 |
478e8f89-541f-4882-b1ff-2c98451fcc6f | milmillin/comp-prog | ICPC/SEERC2023/c.cpp | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <vector>
using namespace std;
constexpr double PI = 3.141592653589793238;
constexpr double EPS = 1e-12;
double clamp(double x, double lo, double hi) {
return x < lo ? lo : x > hi ? hi : x;
}
struct Vec2 {
double x, y;
Vec2() ... | ALGO | 0.999976 | 5.429657 |
039454f8-43e9-4c9e-9078-90a02f5e8e96 | sudarshanreddyc/Data-Structures-Practice | DP/FibonacciMemoization.cpp | class Solution
{
public:
int fibMemo(int n, vector<int> &memo)
{
if (n == 0)
return 0;
else if (n == 1 || n == 2)
return 1;
else if (memo[n] != -1)
return memo[n];
memo[n] = fibMemo(n - 1, memo) + fibMemo(n - 2, memo);
return memo[n];
... | ALGO | 0.999976 | 6.067515 |
b750e30c-e848-42aa-a19c-175e518573ad | HossamMahmoudkhedr/codeforces | Brain's_photo.cpp | #include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#include <set>
#include <math.h>
#include <stack>
using namespace std;
int main()
{
int n,m;
string status;
cin >> n >> m;
char arr[n][m] ;
for(int i=0;i<n;i++){
for(int j =0;j<m;j++){
cin >> arr[i][j];
}
... | ALGO | 0.999674 | 4.371887 |
08937d06-0cdb-4988-8bd1-137bfa1ed548 | miguelsndc/competitive-programming-lib | Solutions/Codeforces/2049_c.cpp | #include <bits/stdc++.h>
using namespace std;
template <typename T>
using vc = vector<T>;
using ll = long long;
using ii = pair<int, int>;
const int maxn = 2e5 + 5;
const ll inf = 1e18;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
void solve() {
int n, x, y;
cin >> n >> x >>... | ALGO | 0.999909 | 4.009988 |
69990f20-629c-45cd-bbb0-27d373858dba | ishandutta2007/codeforces | vercingetorix/normal/744/B.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <deque>
#include <queue>
#include <cstring>
#include <set>
#include <list>
#include <map>
#include <random>
#include <unordered_map>
#include <stdio.h>
using namespace std;
typedef long long ll;
typedef std::vecto... | ALGO | 0.999705 | 3.140036 |
406e10e9-4b79-4a4e-8673-435cef52de8f | txgcwm/code_study | cplusplus/boost/boost_1_63_0/libs/geometry/example/c10_custom_cs_example.cpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
#include <iostream>
#include <boost/geometry/geometry.hpp>
// 1: declare a coordinate system. For example for Mars
// Like for the Earth, we let the use choose between degrees or radians
// (Unfortunately, in real life Mars has two coordinate systems:
// ... | ALGO | 0.990433 | 7.850029 |
0093982b-0c37-43e6-af40-2e53a4a6990a | gaurav6129/c-and-c-- | FandSlargestEL.cpp | #include <iostream>
using namespace std;
int main()
{
int first_largest, second_largest, third_largest;
// int a[50];
// cout<<n;
// for (int i = 0; i < n; i++)
// {
// cout << a[i];
// }
int a[]={1,5,10,9,7,8};
int n=6;
for (int i = 0; i < n; i++)
{
if (first_la... | ALGO | 0.999799 | 3.050089 |
39318a07-2912-4797-81cf-b89434938afb | NafiulAdnan/greenCodes | Light Oj ACCEPTED/Lightoj 1174 Commandos.cpp | #include<bits/stdc++.h>
using namespace std;
int d[120][120];
void floyd_warshal(int n)
{
for(int k=0; k<n; k++)
{
for(int i=0; i<n; i++)
{
for(int j=0; j<n; j++)
{
if(d[i][j] > d[i][k] + d[k][j])
{
// cout<<i<<" "<<j<<... | ALGO | 0.999969 | 4.593974 |
d3260170-4928-4b78-bda9-e1886264df14 | vpcola/MikroChibiOS | utils/globalconfig.cpp | #include "globalconfig.h"
#include "dictionary.h"
#include "iniutils.h"
#include <stdlib.h>
#include <string.h>
#define MAX_DICT_NAME 200
static char tmpstr[MAX_DICT_NAME];
static int onconfigparse(void * usercfg, const char * section, const char * name, const char * value)
{
strncpy(tmpstr, section, MAX_DICT_NA... | TOOL | 0.903909 | 4.657953 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.