blob_id stringlengths 40 40 | content_id stringlengths 40 40 | repo_name stringlengths 5 114 | path stringlengths 5 318 | language stringclasses 5
values | extension stringclasses 12
values | length_bytes int64 200 200k | license_type stringclasses 2
values | content stringlengths 143 200k |
|---|---|---|---|---|---|---|---|---|
bdb0223eff490202dff6bfcc68f7cdf5ab3eea40 | 8e2fef8f830b23465678adf2b2dc558d126f8c7b | jeffsetter/Halide_CoreIR | /apps/hls_examples/feature2d_hls/pipeline.cpp | C++ | cpp | 7,033 | permissive | #include "Halide.h"
#include <stdio.h>
using namespace Halide;
Var x("x"), y("y"), c("c");
Var xo("xo"), yo("yo"), xi("xi"), yi("yi"), tile_index("ti");
Var xio("xio"), yio("yio"), xv("xv"), yp("yp");
int blockSize = 3;
int Ksize = 3;
float k = 0.04;
//float threshold = 20000000;
float threshold = 1000;
class M... |
3eaf8d32ae0957493582890a38da917bf8a38af0 | 79df48ea23e798396ec1d3e6782a4ed14b3273d3 | zhoushiwei/TwoDPCADemo | /Matrix.cpp | C++ | cpp | 8,712 | no_license | // Matrix.cpp: implementation of the CMatrix class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Matrix.h"
#include <math.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
/////////////////////////... |
a707cf866b0f2c4f1c827c2fb0ab3a56e9929744 | 9566451a938ca035b5f0b7ff60f4c2f8617c7d64 | kmhofmann/selene | /selene/img_io/jpeg/_impl/Detail.hpp | C++ | hpp | 1,056 | permissive | // This file is part of the `Selene` library.
// Copyright 2017-2019 Michael Hofmann (https://github.com/kmhofmann).
// Distributed under MIT license. See accompanying LICENSE file in the top-level directory.
#ifndef SELENE_IMG_IMPL_JPEG_DETAIL_HPP
#define SELENE_IMG_IMPL_JPEG_DETAIL_HPP
#include <selene/selene_confi... |
9da3501fde8ff7beaef1e9033bd973bc7c705c62 | 1de370337aa92bfc04dcb0cc76e4266abca6929a | ruisebastiao/QuickQanava | /GTpo/samples/basic/basic.cpp | C++ | cpp | 2,286 | permissive | /*
The MIT License (MIT)
Copyright (c) 2016 Benoit AUTHEMAN
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to... |
2be90f8c0261d004275127e1da377f7bc38c4964 | c99f29c4e92a83adcdbbb8fa9eccfebea3e28898 | Willson1989/WillsonGO | /LearningCpp/LearningCpp/Functions.hpp | C++ | hpp | 1,080 | no_license | //
// Functions.hpp
// StudyCpp
//
// Created by fn-273 on 2020/9/29.
// Copyright © 2020 ZhengYi. All rights reserved.
//
#ifndef Functions_hpp
#define Functions_hpp
#include <stdio.h>
using namespace std;
// 基本类型所占字节数和取值范围
void printByteInfo();
// lambda 函数块
void lambda_study();
// auto 关键字
void auto_study(... |
594134504d2911a3f72eac4fcb7cb1f4d2a14fea | 8758cd6963d24b5074e5be8fb2e36514d877cdc0 | ryan763/bitcoin-abc | /src/qt/createwalletdialog.cpp | C++ | cpp | 2,038 | permissive | // Copyright (c) 2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <qt/createwalletdialog.h>
#include <qt/forms/ui_cre... |
ae2471509633f89fc69371a9fdfa395587d78dcd | 26bfb31773b6b957ba9a1416c92848722b277f7e | mario7lorenzo/cp | /kattis/numbertree.cpp | C++ | cpp | 747 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
int h;
string op;
cin >> h;
int node = pow(2, h+1) - 1;
cin >> op;
int base;
if (op.length()) {
for (int i = 0; i < op.length(); i++) {
if (i == 0) {
if (op[i] == 'L') {
base = 1;
node -= base;
}
else {
base = 2;
nod... |
c42c0e247c47d72dac811fa75d5154fab9ffd5b4 | 1164bd33dd412c485bac5f17eb3dce5faa4aa9ea | zhangnju/visualtracking | /VisualTracking/VisualTracking/kcftracker.cpp | C++ | cpp | 19,846 | no_license | /*
Tracker based on Kernelized Correlation Filter (KCF) [1] and Circulant Structure with Kernels (CSK) [2].
CSK is implemented by using raw gray level features, since it is a single-channel filter.
KCF is implemented by using HOG features (the default), since it extends CSK to multiple channels.
[1] J. F. Henriques, ... |
7a5b05824a16e741802de2eda853d73432ffdf98 | 35c6721ecca42dc0e241f4608f2ea4074af8273a | MajorSquirrelTVS/Tekeimyung | /Game/src/Game/Hud/DisplayCastleLife.cpp | C++ | cpp | 1,633 | no_license | /*
** @Author : Julien CHARDON
*/
#include <Engine/Core/Components/Components.hh>
#include <Engine/EntityFactory.hpp>
#include <Game/Manager/GameManager.hpp>
#include <Game/Building/Castle.hpp>
#include <Game/Hud/DisplayCastleLife.hpp>
void DisplayCastleLife::start()
{
this->_em = EntityFactory::getBindedEntity... |
ddd3fd32f0cca091416701b7eaf5f614d85b8c76 | b7b2d1b6be9be829390aaa85f7de76c74c6815c2 | wataruiwabuchi/competitive_programming | /atcoder/arc019_b.cpp | C++ | cpp | 937 | no_license | #define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <climits>
using namespace std;
#define MOD int(1e9 + 7)
#define INF (long long)(1e18)
int main()
{
cout... |
99a186c19ca0221f52981fa6ba96421cf49bf2a5 | 51a43c20980851e0cd0cd1448de3512eacf95bb2 | hannahvnguyen/kudu | /src/kudu/integration-tests/exactly_once_writes-itest.cc | C++ | cc | 13,414 | permissive | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
c7b45bd34d43f57389c19a215fe90156a4d0d8ee | 3d117d668399bc021e15535b2df46e4330010e53 | juinsommer/ece0302 | /homework/hw04/linked_list/linked_list.hpp | C++ | hpp | 1,176 | no_license | #ifndef _LINKED_LIST_HPP_
#define _LINKED_LIST_HPP_
#include "abstract_list.hpp"
#include "Node.hpp"
template <typename T>
class LinkedList: public AbstractList<T>
{
public:
// default constructor
LinkedList();
// copy constructor
LinkedList(const LinkedList& x);
// destructor
~LinkedList();
... |
d25aeb02e490b953e5e9178c66c64978902e04d1 | 72965701fb8720c028bd2ccc85d6e57c4c70bc88 | igromanru/RogueCompany-SDK-9-24-2020 | /SDK/RC_WBP_Header1_parameters.hpp | C++ | hpp | 1,294 | no_license | #pragma once
// RogueCompany (4.24) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Function WBP_Head... |
68bcff4f6bea10d58afdc70d30bc154c5fd0d9cd | 2ecfac3935ea05ec58bf09d35f5586e3520a5531 | bitcoinemxmx/GCX | /src/leveldb/db/log_test.cc | C++ | cc | 13,911 | permissive | // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "db/log_reader.h"
#include "db/log_writer.h"
#include "leveldb/env.h"
#include "util/coding.h"... |
8717815e6acc8b8469cd99dd7bedcaea0d45ab59 | a376ea4a9f3144d324daff3de74244872d86b058 | sipv1612/CastleVania-Clone | /CastleVania/CastleVania/ItemObject.cpp | C++ | cpp | 2,103 | no_license | #include "ItemObject.h"
ItemObject::ItemObject(bool _Candle, ItemType _type, int posX, int posY)
{
_listAction = SpriteManager::GetInstance()->listAnimation[SpriteItem];
_collType = CollItem;
_direction = RIGHT;
isCandle = _Candle;
type = _type;
if (type == ItemSmallHeart)
vx = 0.05;
if (!isCandle)
_curActi... |
180e952621b7f118673cf5fd37786d2a67cc2c2a | d2a54b653d9c0595b5ee0e9367b3b478632294df | huaweicloud/huaweicloud-sdk-cpp-v3 | /lts/src/v2/model/CreateTransferRequestBody_log_transfer_info.cpp | C++ | cpp | 7,570 | permissive |
#include "huaweicloud/lts/v2/model/CreateTransferRequestBody_log_transfer_info.h"
namespace HuaweiCloud {
namespace Sdk {
namespace Lts {
namespace V2 {
namespace Model {
CreateTransferRequestBody_log_transfer_info::CreateTransferRequestBody_log_transfer_info()
{
logTransferType_ = "";
logTransferTypeIsS... |
0ebd6fb337efa805f30f01111b9664bfd3cfa1bd | 2ad5800410ac9888225cddcd9bd4033db5ace27b | TianyiChen/rdcpp-data | /data/20.cpp | C++ | cpp | 19,869 | permissive | int UFe , WGxe34 , BD//fC7
,
VP,//
yQ//6CxY
, setPyq/*lRgA*/,ade, Tz, hzdoCQV
,K83
,
g7so,/*OH*/
NZ, am3 ,
zdGi,GR
,F , deo ,
Omvk//
,T0x,f, SQskG
,
KHnP
,KfO
,
bE//bX
,
npE2,
d4qz
,o5,
gf ,Cc ,
/*Yk*/kZ4x , p8oA ,/*X8*/xum,//ikD
Dd8
,Y4 , aCh
,ZXUA /*UQ*/,/*esXr*/
oa, Xy
/*2Xb*/,Zqr
/*P*/, ... |
dbe91bc7e8211136c1dcbdab20ad639ea201b94a | de471f9dd747db3ab063fcd2154996510f54c727 | f2rkan/intro-to-Programming-w-c-plus-plus | /part-4/6/golf2.cpp | C++ | cpp | 1,574 | no_license | #include<iostream>
const int MAX = 10;
//input
int inputScores(int scores[], int max);
//display
void displayScores(const int scores[], int numScores);
//calculate average
double averageScore(const int scores[], int numScores);
int main(void)
{
using namespace std;
int arr[MAX];
int entrie... |
bedca76edd223c1f0ab0ff55cd5b2f119e1d4e3a | ff0345fa353d7c41f91df33820ca5181a8aca6db | aquinoa-nba/Cpp_modules | /cpp_04/ex02/Squad.hpp | C++ | hpp | 357 | no_license | #ifndef SQUAD_HPP
# define SQUAD_HPP
# include "ISquad.hpp"
class Squad : public ISquad
{
private:
int _count;
ISpaceMarine **_marineArr;
public:
Squad();
Squad(Squad const &other);
~Squad();
int getCount() const;
ISpaceMarine* getUnit(int) const;
int push(ISpaceMarine*);
Squad& operato... |
14a467e2c61b6a4ca981feb7eabfc76fd545d4a9 | 5ec9b947bc8d5d60fe587e4ff355971733fcad76 | ywapple/chromium | /chrome/browser/ui/blocked_content/popup_tracker_browsertest.cc | C++ | cc | 3,468 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/blocked_content/popup_tracker.h"
#include <string>
#include "base/supports_user_data.h"
#include "chrome/browser/chrome_noti... |
774ab87fd28831e678eb7c2208f789823e26a9a5 | 49b55c421318ade4b884a03f3b6b644c7b2e67e6 | ranajibghosh/C-Progs | /single_thread.cpp | C++ | cpp | 1,184 | no_license | // single thread
// find the addition of all odd from 1 to 19000000000 and even also
#include <iostream>
#include <thread>
#include <chrono>
#include <algorithm>
using namespace std;
using namespace std::chrono;
typedef unsigned long long ull;
ull oddSum =0;
ull evenSum =0;
void findEven(ull start, ull end){... |
1b5812491bbf8c4afeac69c0c0e198b331bb3b06 | 581ac98357ad189e759bf6ad1a3112d52d37235c | sadrulhc/chromium | /third_party/blink/renderer/modules/animationworklet/worklet_animation_test.cc | C++ | cc | 22,422 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/animationworklet/worklet_animation.h"
#include <memory>
#include <utility>
#include "testing/gtest/include/... |
e090a5bf97944f763a44b382b6789d2c05be29c6 | cb2a01538846404a77385b35f335998cb516b43b | shagunlamba/Competitive-Programming | /Maximum in Table.cpp | C++ | cpp | 527 | no_license | //https://codeforces.com/contest/509/problem/A
#include<iostream>
#define ll long long
#include<string.h>
#include<queue>
#include<bits/stdc++.h>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<unordered_map>
using namespace std;
int main()
{
int n;
cin>>n;
int **arr= new int*[n];
for(int i=0;i<n;i+... |
e149e96ca4b9c26a9afcd29e7c829dbad3a17846 | aff409af6edf5b2bdcc1cf25f566f780ff8e4272 | colinw7/CRenderer | /ps_src/CPSPixelRenderer.cpp | C++ | cpp | 5,231 | permissive | #include <CPSPixelRenderer.h>
CPSPixelRenderer::
CPSPixelRenderer(CPixelRenderer *prenderer) :
CPixelRenderer(), prenderer_(prenderer), size_(0,0)
{
int xmin = 0;
int ymin = 0;
int xmax = getWidth () - 1;
int ymax = getHeight() - 1;
print_.setSize(xmin, ymin, xmax, ymax);
}
CPSPixelRenderer::
CPSPixelRend... |
4c425ca133ecebad17092a74cfb0464c199ecd1e | f840bbd20c27d3d60b882d3738d44b435470c0c7 | osdeverr/CXOS | /src/cx/os/kernel/fs/tar/tar_file.hpp | C++ | hpp | 1,061 | no_license | //
// tar_file.hpp
// Kernel
//
// Created by Nikita Ivanov on 13.12.2020.
// Copyright © 2020 CXOS Team. All rights reserved.
//
#ifndef tar_file_h
#define tar_file_h
#include <cx/os/kernel/fs/tar/tar_header.hpp>
#include <string.h>
namespace cx::os::kernel::fs::tar
{
class TarFile
{
public:
... |
bdc03a86c2b6d8c54b459b4aa38f709b8a6b7a91 | 71ab511fba282b914ecdf71f75e2fe0e3fdb1665 | renoki-games/Metin2BE-Server-Source | /Server/game/src/questlua_affect.cpp | C++ | cpp | 6,130 | no_license | #include "stdafx.h"
#include "config.h"
#include "questmanager.h"
#include "sectree_manager.h"
#include "char.h"
#include "affect.h"
#include "db.h"
namespace quest
{
//
// "affect" Lua functions
//
ALUA(affect_add)
{
if (!lua_isnumber(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3))
{
sys_err("invalid... |
f5afd6868e08d84f1f1845c8a4009d5cac0aa32a | ea4dae7c1267fdd47ee746f0bde2ad403be13096 | jarnoh/qmlmidi | /qmlmidiout.cpp | C++ | cpp | 218 | permissive | /** QML Midi plugin
* jarnoh@komplex.org
* Copyright (c) 2011 Jarno Heikkinen
*/
#include "qmlmidiout.h"
QmlMidiOut::QmlMidiOut(QDeclarativeItem *parent) :
QDeclarativeItem(parent), port(-1)
{
}
|
dea368706e15e861c3c815af5947c0c772c9e7e3 | c74fca472179e708967f49af03bec80302cb89a1 | nwjs/blink | /Source/bindings/core/v8/ScriptPromiseResolver.cpp | C++ | cpp | 2,851 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "bindings/core/v8/V8RecursionScope.h"
namespace blink {
ScriptPromiseR... |
4d4871c58b9f1a8396028939b3a7e7ef7cfa9b70 | c8c45a84c746ebc49d50e43ae9283a7a7195ff9c | GrahamDumpleton-abandoned/ose | /software/library/OTC/debug/otcerrors.cc | C++ | cc | 888 | permissive | /*
// ============================================================================
//
// = LIBRARY
// OTC
//
// = FILENAME
// debug/otcerrors.cc
//
// = AUTHOR(S)
// Graham Dumpleton
//
// = COPYRIGHT
// Copyright 1991-1993 OTC LIMITED
// Copyright 1997-2004 DUMPLETON SOFTWARE CONSULTING PTY LIMITED... |
e1270a68fcada4bdb0b83f266e197d8163bb1306 | 192580e55a671e849f1c10f3d7affea64bae6d88 | satra/ANTs | /Examples/PasteImageIntoImage.cxx | C++ | cxx | 6,562 | permissive |
#include "antsUtilities.h"
#include <algorithm>
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkImageRegionIteratorWithIndex.h"
#include <string>
#include <vector>
namespace ants
{
template <class TValue>
TValue Convert( std::string optionString )
{
TValue value;
std::i... |
6c7a7faeb862a50332a40a09df9ecc95915a3f0b | 17eb126f44eccf8566c0d18e4357e77bf6ce77fe | KoalaGroup/KoalaSoft | /detectors/lmdforward/geolumidetector.cxx | C++ | cxx | 49,985 | no_license | #include "geolumidetector.h"
#include "FairGeoBuilder.h"
#include "FairGeoInterface.h"
#include "FairGeoLoader.h"
#include "FairGeoMedia.h"
#include "FairLogger.h"
#include "TGeoCompositeShape.h"
#include "TGeoCone.h"
#include "TGeoManager.h"
#include "TGeoMatrix.h"
#include "TGeoPcon.h"
#include "TGeoTube.h"
#includ... |
6c4470feab20f37d94fedd617832e2a8eac15a73 | 9adeca584b37173cb663d75e40d4a175ead0a171 | dbsmile/nitroshare-desktop | /plugins/wizard/wizard.cpp | C++ | cpp | 1,833 | permissive | /*
* The MIT License (MIT)
*
* Copyright (c) 2018 Nathan Osman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use,... |
e9826b607eafe6a3c90d955473b98a9e2e4637f7 | 211cbdc742e7d855d831f51f1b9df7e540afb371 | casey42311/CS260-lab1 | /winery.cpp | C++ | cpp | 1,129 | no_license | #include "memoryleakdetect.h" // this must be the first #include in each of your .cpp files
#include "winery.h"
#include <iomanip>
using namespace std;
// change the value of this variable to be your own name instead of "I. Forgot"
const char Winery::YOUR_NAME[] = "Casey Benson";
Winery::Winery(const char ... |
26932f0d7c5e8c9caafc0cace6d03ae3cdd4c656 | 7ce56fc062c84f248e57c23a659f23c8743e407b | RandomVar/ACM | /专题合集/数据结构/The Falling Leaves UVA - 699.cpp | C++ | cpp | 604 | no_license | #include<cstdio>
#include<iostream>
#include<queue>
#include<cmath>
#include<cstring>
#include<algorithm>
#define ll long long
using namespace std;
const int INF=0x3f3f3f3f;
int a[200];
int build(int p){
int x;cin>>x;
if(x==-1&&p==100) return 0;
if(x==-1) return 1;
a[p]+=x;
build(p-1);
build(p+1);
return 1;
}
... |
207e8c9a528614780a308ad138f5c1216ba9964c | cf8706f72758c33274d1a8ba63e9d44ebb838b14 | SMiles02/CompetitiveProgramming | /OIs/WEOI/2023/turbulences.cpp | C++ | cpp | 636 | no_license | #include <vector>
#include <map>
#include <set>
using namespace std;
long long revenue(int n, int k, vector<long long> a) {
int neg = 0, pos = 0;
long long ans = 0, cur = 0;
map<long long, int> m;
set<long long> s;
for (auto i : a) {
if (i > 0) {
++pos;
++m[i];
... |
232637be9364ca71435988389be9e8f3d590369e | 168cedfafb4af70668493f0abc2d8224762f7afe | HyeonJaaE/baekjoon_cpp | /9095.cpp | C++ | cpp | 329 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int T; cin >> T;
int dp[12] = {0,1,2,4,};
for(int i = 4; i < 12; i++){
dp[i] = dp[i-3] + dp[i-2] + dp[i-1];
}
while(T--){
int n; cin >> n;
cout << dp[n] << "\n";
... |
dd272cc624d39034656a6cc8b7fc2755beebf995 | c140ecbe2c3f5662b61ded2ecd143c804f4e6222 | confluence/cgppd | /src/Potential.cpp | C++ | cpp | 7,151 | no_license | #include "Potential.h"
using namespace std;
double calculate_LJ(Residue &ri, Residue &rj, const double r, const AminoAcids &AminoAcidsData)
{
/* This calculation is described in kim2008, in equations 2, 3, 5 and 6
*
* Eij is the LJ interaction strength between residues i and j.
* Sigmaij is the ave... |
01295e3eb80fa7f70f16db04ca409e7105ce0631 | fe904006666da796e832176c6d70cd67f2df59e7 | Zephilinox/LoxCPP | /src/LoxCPP/Token.hpp | C++ | hpp | 2,311 | no_license | #pragma once
//STD
#include <string>
#include <variant>
#include <string>
namespace LoxCPP
{
template <typename T>
struct always_false
{
inline static constexpr bool value = false;
};
struct Uninitialized
{
friend constexpr bool operator==(const Uninitialized& left, const Uninitialized& right);
};
constexpr bool... |
56ac567cba29c9f204f9b366cf852277f421edce | 1c7e35e02ba7fa31fd184fe30c7619db5083a40e | libov/zeus | /other/old_scripts/scripts/MC_true_zarah/K0s_analysis_part1+true_21.cxx | C++ | cxx | 18,422 | no_license | //////////////////////////////////////////////////
////////////// K0s analysis /////////////////
////////////// with V0lite /////////////////
////////////// (part1) /////////////////
//////////////////////////////////////////////////
// //
// ... |
f38a8427aa4afe0a6978ea7a535055d92f9f39b7 | 9593f67bc27434c0971ee4f837ba6330d09ed5f6 | S0mn4mbul1st/CPlusPlus | /Problemsets/[ToDo]843.Guess_the_Word.cpp | C++ | cpp | 3,759 | no_license | /*
This is an interactive problem.
You are given an array of unique strings wordlist where wordlist[i] is 6 letters long, and one word in this list is chosen as secret.
You may call Master.guess(word) to guess a word. The guessed word should have type string and must be from the original list with 6 lowercase letters... |
e067d0e232a549ad2bb3db66f0a4476e06292840 | a6a3e400a6c725a8d140a807ea8f6f74c9b391e9 | ag-richa-13/Competitive-Coding | /GeeksForGeeks/General/PossiblePathsFromTopLeftToBottomRight.cpp | C++ | cpp | 1,176 | no_license | // Count all possible paths from top left to bottom right
// Question
// The task is to count all the possible paths from top left to bottom right of a mXn matrix with the constraints
// that from each cell you can either move only to right or down.
// Input:
// First line consists of T test cases. First line of ev... |
4f8933cbf254d402290e0da5e5de09af1b151322 | b8dae2de18bda02bbc6a0c76ae94f960abd0797f | KurodaKanbei/ACM | /Template of other teams/NewMeta/4 Tree/1 树点分治(斜率优化).cpp | C++ | cpp | 789 | no_license | bool ena[mxn]; int s[mxn]; // s[x] 是子树 x 的大小
#define fore(i) for (auto i : G[x]) if (!ena[i])
#define fors(i) fore(i) if (i != p)
int size(int x, int p)
{ s[x] = 1; fors(i) s[x] += size(i, x); return s[x]; }
pii core(int x, int p, int sx, vi &st) {
st.push_back(x); fors(i) if (sx - s[i] < s[i])
return core(... |
c6b1dd1457f459a70f6ea8eb60e3dc2ec190c64a | 57458d578beeef51aa6ace739bbc5819d1e0f8f8 | MIABLACKLL/Leetcode | /0500.键盘行/0500-键盘行.cpp | C++ | cpp | 856 | no_license | class Solution {
public:
vector<string> findWords(vector<string>& words) {
vector<string> keyb={"qwertyuiop","asdfghjkl","zxcvbnm"};
vector<string> samelinewords;
map<char,int> keybmap;
for(int i=0;i<3;i++)
for(char letter:keyb[i])
{
... |
fdbc8ea098b19abdda45a75f73b26444b9cd0b51 | 64b506299125ef6bbb3d09d3d1e14c30e91ba1d0 | btk15049/home | /pro/codeforces/div2/509/B.cpp | C++ | cpp | 1,125 | no_license | //http://codeforces.com/contest/1041/problem/B
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
#ifdef BTK
#define DEBUG if(1)
#else
#define CIN_ONLY if(1)
struct cww {cww() {CIN_ONLY{ios::sync_with_stdio(false); cin.tie(0);}}
}star;
#define DEBUG if(0)
#endif
#define ALL(v) (v).begin(),(v).end()
#... |
098fccd56d1cc059b93846e673abf885916ea579 | a68ed83c3ceabc7dd5ad93be11935d48ae482e00 | JulianCienfuegos/Mantella | /src/propertyAnalysis/activePropertyAnalysis/additiveSeparabilityAnalysis.cpp | C++ | cpp | 5,276 | permissive | #include "mantella_bits/propertyAnalysis/activePropertyAnalysis/additiveSeparabilityAnalysis.hpp"
// C++ standard library
#include <set>
#include <algorithm>
#include <limits>
#include <utility>
#include <cmath>
// IWYU pragma: no_include <ext/alloc_traits.h>
// Mantella
#include "mantella_bits/optimisationProblem.hp... |
27f9701700b40b580638da88a757f8a3f7d360a2 | 2b5c3ab81ccba7d6fe5bf7142dea34b7eaa98e68 | mprevot/gpuocelot | /tests/cuda3.2/sdk/cutil.cpp | C++ | cpp | 61,480 | permissive | /*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related... |
e1f4f3ef1ffa9c813a953d639e56ada7e399b87b | 97ff0868f7ccbceb15e5b72077125192635da5ce | brbrown25/aaf-1 | /ref-impl/src/impl/ImplAAFRIFFChunk.cpp | C++ | cpp | 5,261 | no_license | //=---------------------------------------------------------------------=
//
// This file was GENERATED for the AAF SDK
//
// $Id: ImplAAFRIFFChunk.cpp,v 1.5 2009/06/01 11:47:07 stuart_hc Exp $ $Name: $
//
// The contents of this file are subject to the AAF SDK Public Source
// License Agreement Version 2.0 (the "Lice... |
5bff1382bbd0323e61aaf71b1e2a4f35fe107b9e | dc999ceffb1df6c167b4dd4de555431827ef62d8 | sandialabs/limeext | /LIME/example/supersimple_float/THINWALL_ModelEval0.hpp | C++ | hpp | 1,946 | no_license | // ********************************************************************************************
//
// THINWALL_ModelEval0.hpp
// This is the ss_thinwall LIME model evaluator used for a simple coupling with ss_con1d
//
// ********************************************************************************************
#ifn... |
1b96ac966b27ba6a7da3da20cb4bb2b8412f2850 | dc17803ef2b049d008691d4cafe65efe20331bf9 | stanhuff/chromium | /components/password_manager/core/browser/http_auth_manager_impl.cc | C++ | cc | 5,937 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/password_manager/core/browser/http_auth_manager_impl.h"
#include <utility>
#include "components/autofill/core/common/password_form.... |
882b3ea756affd448814cb014e59497d7e432f61 | 47fdf6289f1e0c992f1deb3e20656a4727ed59ae | Jin-Myung/cpp_study | /stl_algorithm/minimum_maximum/prev_permutation.cpp | C++ | cpp | 223 | no_license | #include <algorithm>
#include <string>
#include <iostream>
int main() {
std::string str = "dcba";
do {
std::cout << str << std::endl;
} while (prev_permutation(str.begin(), str.end()));
return 0;
}
|
5b0e05ebd3d9f2a9b243873fa3a3e78235d63848 | ef5dda11915cdba92fd7f2dbbbbe31d28fb3cb36 | rrika/cdcEngineDXHR | /cdcObjects/ObjectComponent.cpp | C++ | cpp | 916 | no_license | #include "ObjectComponent.h"
#include "ObjectManager.h"
#include "cdcWorld/GameTracker.h"
#include "cdcWorld/Instance.h"
#include "cdcWorld/InstncG2.h"
namespace cdc {
// ObjectManager *g_objectManager;
// called from Instance::InitCommonComponents
void ObjectComponent::SetProcessFunctions() {
// TODO
}
// called ... |
c6f16e93f1e8ddc1ce08f483a1e7da2cdc8e9962 | 61104dff686560d975f86ced4efd38777c138dc6 | SKART1/QNXTiming | /QNXTimingTask4/QNXTimingTask4.cc | C++ | cc | 4,065 | permissive | #include <errno.h>
#include <gf/gf.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <sys/neutrino.h>
#include <sys/trace.h>
#include <gf/gf.h>
#define KEYBOARD_IRQ 1
gf_display_t display;
struct sigevent event;
bool end=0;
/*-----------------------------------------------... |
b3531939992d058ee4af2e50749b9592e26d743f | 2ab5af968b7ea8f03e80eb134c2169554d841977 | winddyhe/QtOpenGL | /qterrain/common/qfrustum.cpp | C++ | cpp | 4,317 | no_license | #include "qfrustum.h"
/*QFrustum*/
void QFrustum::extractFromMatrix(const QMatrix4x4 &matrix, bool normalizePlanes)
{
leftPlane.normal.setX(matrix(0,3) + matrix(0, 0));
leftPlane.normal.setY(matrix(1,3) + matrix(1, 0));
leftPlane.normal.setZ(matrix(2,3) + matrix(2, 0));
leftPlane.d = (matrix(3,... |
96411b3d1cbac493f73da872e8ade880e0df24e1 | 3c2a5578638408e739fd2ce080b8cdee074064c2 | abhaychandna/Practice | /Projects/Stacks and Queues.cpp | C++ | cpp | 203 | no_license | //incomplete Day 18 - HKRRNK
#include<iostream>
using namespace std;
class Solution {
private:
char stack[10000];
char queue[10000];
public:
void pushCharacter(char c)
{
}
}; |
bb11f0e2841f619c5a0ac1718093221715736ae0 | 6267e290c346ce33fa4c7f5a33d09fda044bbe11 | Flare-k/Algorithm | /수학/플러그_수학_2010.cpp | C++ | cpp | 612 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<int> multitap(n);
for (int i = 0; i < n; i++) {
cin >> multitap[i];
}
sort(multitap.begin(), multitap.end());
... |
a58985af544813d66570b7bf7884a3c5f53ea2df | 5760dfe7d145d76b710ee5c3704b409565da51df | AshwinkumarPillai/LEETCODE_CHALLENGES | /Weekly_200/4_Get_the_Maximum_Score.cpp | C++ | cpp | 606 | no_license | class Solution {
public:
int maxSum(vector<int>& nums1, vector<int>& nums2) {
long long i =0,j=0,m=nums1.size(),n=nums2.size(),mp=1e9+7,a=0,b=0,xa=0,xb=0,maxval;
while(i<m && j<n){
if(nums1[i] < nums2[j]) a+= nums1[i++];
else if(nums1[i] > nums2[j]) b+= nums2[j++];
... |
2dcb685302be89a6c7bada139ba103889d822bb7 | 6f19921aadef184697401316595a9e36d8556a7b | rakeshnitr/bluegrass | /test/data_structs/test_service_queue.cpp | C++ | cpp | 1,426 | no_license | #include <iostream>
#include <cassert>
#include <mutex>
#include "bluegrass/service.hpp"
using namespace std;
using namespace bluegrass;
mutex M;
size_t I;
char STR0[] =
"service in action! Test pipes a DEQUEUE s_q into an ENQUEUE s_q\n";
char STR1[] =
"service in action! Test utilizes a NOQUEUE s_q\n";
void cr... |
c777caa098a7c8891c6d0965930a6613d7b5e080 | 9d1185db3ab3f1ae31b0917fa17eabcfd673fd2a | sbates-idrc/cubetto | /CubettoLibrary/hal_aci_tl.cpp | C++ | cpp | 12,805 | no_license | /* Copyright (c) 2014, Nordic Semiconductor ASA
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify... |
82bfc2106525a62735bcf0a3b8aa3611e5622e68 | 1d89ba8d13771419ed17d73a8787989cd0fcb360 | Shakthi/mu | /016dilated_reagent.cc | C++ | cc | 4,217 | no_license | //: An alternative syntax for reagents that permits whitespace in properties,
//: grouped by brackets. We'll use this ability in the next layer, when we
//: generalize types from lists to trees of properties.
:(scenarios load)
:(scenario dilated_reagent)
def main [
{1: number, foo: bar} <- copy 34
]
+parse: produc... |
2e873fced9de6246d503fb668f891d5614bef7f8 | a84382caed0c40ee4d3b7fcac1d0e6f078c0c76f | StrayDragon/OJ-Solutions | /PTA/PAT_A/Cpp11/A1028_AC.cc | C++ | cc | 1,318 | permissive | // ---
// id : 1028
// title : List Sorting
// difficulty : Medium
// score : 25
// tag : Primary Algorithm
// keyword : sort
// status : AC
// from : PAT (Advanced Level) Practice
// ---
#include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
#include <... |
49a0c6f9d59b41d3a485fa7c239a92eb45eca7d0 | 14d36305ee81e3c2b4a4eb1456accb8183e07739 | leeboll109/simple_dont_starve | /APIFrameWork(D2D)/APIFrameWork(D2D)/Map.cpp | C++ | cpp | 205 | no_license | #include "stdafx.h"
#include "Map.h"
Map::Map()
{
}
Map::~Map()
{
}
HRESULT Map::init(void)
{
return E_NOTIMPL;
}
void Map::release(void)
{
}
void Map::update(void)
{
}
void Map::render(void)
{
}
|
ae287a9867fd67be1e36f83d435256c52a1bcc96 | e6b08472a72123f00d2ed1cc8b648a6f3b7c8787 | souravdas142/clg_Assginment | /oop_cpp/assgin2.cpp | C++ | cpp | 468 | no_license | #include<iostream>
using namespace std;
class temperature
{
float temp;
public:
temperature(){}
temperature(float);
float tempchng();
};
temperature::temperature(float temp){this->temp=temp;}
float temperature::tempchng()
{
float cel;
cel=((temp-32)*5)/9;
return cel;
}
int main()
{
temperature ferhen;
float... |
5f034ae1a331e2996761ebf95867a3c677f813e3 | fbae00bde91a35c9ecc746df378ec77acdfb7424 | SheffieldXie/chromium | /chrome/browser/chromeos/arc/file_system_watcher/arc_file_system_watcher_service.cc | C++ | cc | 17,875 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/arc/file_system_watcher/arc_file_system_watcher_service.h"
#include <string.h>
#include <algorithm>
#include <memory>
... |
fc85c973a0f52b37d1d0d242047e7fe9244fe2be | e85216f6db4974646bfa4cba36c85050d90ac2ea | imulan/procon | /yukicoder/179.cpp | C++ | cpp | 1,399 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);++i)
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)
#define mp make_pair
#define pb push_back
#define fi first
#define sc second
int main(int argc, char const *argv[]) {
int h,w;
... |
4520ab9ebe53b91b7fe14d6cc291ceced9c25d5d | 39a3060fae796b35f86944c67d8c6605642463a5 | vortex314/wibo | /Sys.cpp | C++ | cpp | 944 | no_license | #include "Sys.h"
#include <malloc.h>
#include <unistd.h> // gethostname
#include <string.h>
#include <time.h>
#include <Log.h>
char Sys::_hostname[30] ;
uint64_t Sys::_upTime=0;
uint64_t Sys::_boot_time=0;
#ifdef __linux__
#include <time.h>
uint64_t Sys::millis() // time in msec since boot, only increasing
{
... |
9498359a895991bebcf51785fc2847d22d89d012 | fafe575a786ce4ca5f591cbc2f1425923462e9f7 | ahandsomechild/Alogrithm-Albums | /2018-ENUTest/梵高先生.cpp | C++ | cpp | 532 | no_license | #include<iostream>
using namespace std;
int main() {
int n;
int i, j;
cin >> n;
int a[20][20];
for (i = 0; i < 20; i++) {
for (j = 0; j < 20; j++) {
a[i][j] = 0;
}
}
for (i = 0; i < n; i++) {
for (j = 0; j <=i; j++) {
if (j == 0 || j == i) {
a[i][j] = 1;
}
else {
a[i][j] = a[i - 1][j]... |
ebdab47599972e31e4886b477ce60634fa02c9cf | 8c38eca6076719215e111f9c72b483cff9eff667 | kazunetakahashi/atcoder | /2019/0714_AGC035/C.cpp | C++ | cpp | 3,768 | permissive | #define DEBUG 1
/**
* File : C.cpp
* Author : Kazune Takahashi
* Created : 7/15/2019, 3:17:20 AM
* Powered by Visual Studio Code
*/
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <complex>
#include <tuple>
#include <queue>
#include <stack>
#include <map... |
14e0472431de85f82410b360fe9b4541c5aa8128 | db0da9a1b6781b53f18dbe96f8be01e9c0962c7b | Dreakii/OpenWorld | /include/Texture/CTexture.cpp | C++ | cpp | 4,805 | no_license | //CTexture.cpp
#include"CTexture.hpp"
unsigned char* CTexture::downloadBMP( char* namefile)
{
/*fstream file(namefile , ios::in | ios::binary); // plik
BITMAPFILEHEADER head; // naglowek pliku BMP
BITMAPINFOHEADER info;
unsigned char *buffer; // bufor obrazu
file.read( (char*)&head, sizeof(BITMAP... |
ca7d6af28af6d242964618eed5b3a0bd6d99196b | 85246db585974ccf22ffdd2873e72edecdbe4546 | gitter-badger/Kvasir-1 | /Lib/Chip/Unknown/STMicro/STM32F107xx/UART4.hpp | C++ | hpp | 6,492 | permissive | #pragma once
#include "Register/Utility.hpp"
namespace Kvasir {
//Universal asynchronous receiver
transmitter
namespace Nonesr{ ///<UART4 SR
using Addr = Register::Address<0x40004c00,0xfffffe00,0,unsigned>;
///Parity error
constexpr Register::FieldLocation<Addr,Register::maskFromRa... |
86fd2def6959ff1c31b72a9b20c473ee6506c279 | 88631708d913d99c70cd293c2e100b5ada83802f | ZoTechGroup/xfopencv | /include/imgproc/xf_resize_down_nn.hpp | C++ | hpp | 7,647 | permissive | /***************************************************************************
Copyright (c) 2016, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must reta... |
2d5f2f9d6da49227448eaf1e3c1336b32e5a1be0 | d3bd22ab4e1293422c094152319a11dd39114369 | Mentos-/Mordhau_SDK | /SDK/Mordhau_BP_EquipmentDisplay_parameters.hpp | C++ | hpp | 1,441 | no_license | #pragma once
// Mordhau (Dumped by Hinnie) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
... |
31494a9c7dc6f03c06908513e313f6a606559dbd | e66c95bd58cbcc3d967369745692ca113e043eee | Ampersand25/ConsoleGamesAndAnimations | /CPP/FLAGS/main.cpp | C++ | cpp | 21,675 | no_license | /*SetConsoleTextAttribute colors:
0 BLACK
1 BLUE
2 GREEN
3 CYAN
4 RED
5 MAGENTA
6 BROWN
7 LIGHTGRAY
8 DARKGRAY
9 LIGHTBLUE
10 LIGHTGREEN
11 LIGHTCYAN
12 LIGHTRED
13 LIGHTMAGENTA
14 YELLOW
15 WHITE
*/
#include <iostream>
#include <windows.h>
#include <iomanip>
using namespace std;
int main()
... |
bfce528ddc962e329dd840caba53529b37be533f | 4c0c7ea8416c1bba8271f4bf31a8ec283c79b1d4 | baviya/v8 | /test/cctest/test-log.cc | C++ | cc | 43,177 | permissive | // Copyright 2006-2009 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this lis... |
1cc98f7789411d6e1a6aba3ea8712e73a0221b00 | abee13b8c56498fa73783514c539435b960985fe | TencentCloud/tencentcloud-sdk-cpp | /ds/src/v20180523/model/SignInfo.cpp | C++ | cpp | 8,022 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
30eb878b3bc0e530efeefcd1c05c50aa304d1c70 | fe95b0db9c5c0c1ac3af5c051072202e014a84cd | jkrempus/llvm | /unittests/IR/ConstantRangeTest.cpp | C++ | cpp | 21,050 | permissive | //===- ConstantRangeTest.cpp - ConstantRange tests ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
0f131093da588d6b69009a82e98296534ed690d7 | 536378697164eb7815a061f72f8eb015c6ffd9d7 | meedan/alegre | /chromaprint/src/fft_lib_kissfft.cpp | C++ | cpp | 1,254 | permissive | // Copyright (C) 2010-2016 Lukas Lalinsky
// Distributed under the MIT license, see the LICENSE file for details.
#include "fft_lib_kissfft.h"
namespace chromaprint {
FFTLib::FFTLib(size_t frame_size) : m_frame_size(frame_size) {
m_window = (kiss_fft_scalar *) KISS_FFT_MALLOC(sizeof(kiss_fft_scalar) * frame_size);... |
2edb6d614bfae89f29b1855fe0b115bdcb3a9eb2 | 485f4cc04675071b9936eac4daec5c345f0d13cb | 15831944/TRiAS | /Tools/CvrtCoords/CvrtAsc/CvrtAsc.cpp | C++ | cpp | 3,708 | no_license | // CvrtAsc.cpp : Implementation of DLL Exports.
// Note: Proxy/Stub Information
// To build a separate proxy/stub DLL,
// run nmake -f CvrtAscps.mk in the project directory.
#include "stdafx.h"
#include "resource.h"
#include <initguid.h>
#include "CvrtAsc.h"
#include "..\TransformLineOfTextEngi... |
23a0fa719685d026b59692896256e6d906accf03 | ffaceb28b4ff213ce178003ec705151577c880e7 | YuhuiYin/CPP-Primer-Notes | /ch14/t14-7.cc | C++ | cc | 1,363 | no_license | #include "t14-7.h"
#include <algorithm>
#include <iostream>
using namespace std;
std::pair<char *, char *> String::alloc_n_copy(const char *b, const char *e) {
auto str = alloc.allocate(e - b);
return { str, std::uninitialized_copy(b, e, str) };
}
void String::range_initializer(const char *first, const char *... |
1ae0a6425b054997212eff1045795a844bbc14be | 93f5da345c6c5cb31e3aaf025cd1a5e61ee7cb7c | EthanNielsen/DataStructures | /DataStructures/Controller/Tools/Timer.cpp | C++ | cpp | 699 | no_license | //
// Timer.cpp
// DataStructures
//
// Created by Nielsen, Ethan on 2/2/18.
// Copyright © 2018 Ctech. All rights reserved.
//
#include "Timer.hpp"
using namespace std;
Timer :: Timer()
{
executeTime = 0;
}
void Timer :: resetTimer()
{
executeTime = 0;
}
void Timer :: startTimer()
{
executeTime = ... |
fa2813d7b73467850c8794d8d33bb0956ebbaf4c | 9da7821cc155adf89ae53f0573894c0dbd2566e7 | EvieLachlanB/realm-core | /src/realm/table_view.cpp | C++ | cpp | 20,215 | permissive | /*************************************************************************
*
* Copyright 2016 Realm Inc.
*
* 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/lice... |
4ce5005f24ad6748a80e38df25cb313605a980b5 | 955469fd91de5d951cc9b004cfb87e614c9bfb76 | beaver700nh/command_line_craft | /tests/colortest.cpp | C++ | cpp | 1,143 | no_license | #include <ncurses.h>
void colortest() {
initscr();
cbreak();
noecho();
keypad(stdscr, true);
curs_set(0);
start_color();
for (int n = 1; n < 256; ++n) {
init_pair(n, n, n);
}
init_pair(0, -1, -1);
for (int row = 0; row < 16; ++row) {
for (int col = 0; col < 16; ++col) {
mvaddch(row... |
babbcdc03eb51a4296664ddef0668185b107d821 | 55fea9fbd62cd50a063fa0c3429c6f7fe8544473 | Super-long/Summer-of-2019 | /LZL/Solution/回溯/ZOJ-1002.cpp | C++ | cpp | 1,306 | no_license | //学到的东西 可以把一个二维数组抽象成线性 用整除和取余获取坐标
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int bestn;
char map[10][10];
int n;
int canput(int row,int col)
{
int i;
for(i=row-1;i>=0;i--)
{
if(map[i][col]=='X')
{
break;
}
if(map[i][col]=='K')
{
retur... |
f320651c7604e1764a4f787ded3764f78bc681dc | d50bc63539bfedf3a675c13315ef58ea2d715937 | gbrlas/AVSP | /CodeJamCrawler/dataset/11_18491_45.cpp | C++ | cpp | 1,200 | no_license | #include <stdio.h>
#include <stdlib.h>
void main()
{
int O[1000],B[1000],t,n,i,j,k,l,currO,currB,steps,step,o,b,Bn,On;
char order[1000];
freopen("A-large.in","r",stdin);
freopen("output.txt","w",stdout);
scanf("%d\n",&t);
for(i=0;i<t;i++)
{
scanf("%d",&n);
Bn=0;On=0;b=0;o=0;
for(j=0;j<n;j++)
... |
36576d814ce0f493b20ec3ea3c85a2f06dfaa1e4 | 9a8f0b6077f74312428c319ddd6a976cbf4a9a33 | longshotsyndicate/ray | /src/ray/core_worker/lease_policy.cc | C++ | cc | 2,747 | permissive | // Copyright 2017 The Ray Authors.
//
// 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 i... |
f82eb769880afd40cee4770adbb34e441aea9925 | 2a889d88b8038dc8259b1b70bff154118ee90b6f | Tana0910/DirectXTex | /DirectXTex/BC6HBC7.cpp | C++ | cpp | 147,860 | permissive | //-------------------------------------------------------------------------------------
// BC6HBC7.cpp
//
// Block-compression (BC) functionality for BC6H and BC7 (DirectX 11 texture compression)
//
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/?LinkId=2... |
ef5758343aa3bb903adbf72cc012b0264ec6984c | 1fde501fd277a88e7f8e23c4a1fa6b57f6aa8bf0 | m-diers/hpx | /components/containers/partitioned_vector/include/hpx/components/containers/coarray/coarray.hpp | C++ | hpp | 8,218 | permissive | // Copyright (c) 2017 Antoine Tran Tan
// Copyright (c) 2017 Google
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/// \file hpx/components/coarray/coarray.hpp
#ifndef ... |
fe83176a31587b4b9ded2d6d39527e889d12735d | 179bbb85856a929baad02c00061ca80da9d1d0f8 | raakka/v8 | /src/wasm/wasm-debug.cc | C++ | cc | 43,608 | permissive | // Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/wasm/wasm-debug.h"
#include <iomanip>
#include <unordered_map>
#include "src/base/optional.h"
#include "src/base/platform/wrappers.h"
#i... |
0f3968ec72c0ac3b2007a2b435de53952635c87e | e7827712c893142a7c7c63db144b28696263e362 | smil-in-javascript/blink | /Source/platform/SharedBuffer.cpp | C++ | cpp | 11,562 | permissive | /*
* Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
* Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of s... |
e197578b3d9929304f975c0f6be5a69e9eccf507 | 10a41cd939b9a6cc2c771b048d8c16b037381fb9 | bluebambu/Leetcode_cpp | /4.1.2 longest parenthesis pair/main.cpp | C++ | cpp | 4,620 | no_license | #include <iostream>
#include <stdlib.h>
#include <math.h>
#include <list>
#include <vector>
#include <algorithm> // std::for_each
#include <unordered_map>
#include <stack>
using namespace std;
inline int exchg(int &a, int &b) {int c=a; a=b; b=c;}
inline int log2(int N){return log10(N)/log10(2);}
inline float min(... |
4405478d1953e7dd761205016ce68b5db5834243 | 187fa8ded1fa3b3a9fc585eecf573a9392a2bc7d | YaYanush/software-engineering | /programowanie-i-struktury-danych/kolokwium-3/rope.hpp | C++ | hpp | 825 | permissive | #ifndef ROPE
#define ROPE
#include<iostream>
#include<cstddef>
template<typename T>
class Rope {
private:
struct Node {
T value;
Node* next;
Node(const T &new_value): value(new_value), next(nullptr) {};
};
Node* head;
std::size_t size;
p... |
0d81e1a48082847f3438ae0b5216cc2ca54f27e0 | b272af4e553b5652e243f1336d106b640d98c99c | mattclapham/NUbots | /shared/utility/io/uart.cpp | C++ | cpp | 5,838 | no_license | #include "uart.h"
#include <fcntl.h>
#include <linux/serial.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <unistd.h>
#include <cerrno>
#include <cstring>
#include <stdexcept>
namespace utility {
namespace io {
uart::uart() : device(""), fd(-1) {}
uart::uart(const std::string& device, const unsigned... |
03e4f151d285e64e6f1da6c37477d719a4af97b6 | 1f85f39146801a68811c5b2852901f3fc1431154 | Vineelanrl02/Become-Coder-Cpp | /factors.cpp | C++ | cpp | 282 | no_license | #include<bits/stdc++.h>
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
//cout<<1<<" ";
for(int i=2;i*i<=n;i++)
{
if(n%i==0)
{
cout<<i<<" "<<n/i<<" ";
}
}
//cout<<n;
return 0;
}
OUTPUT:
30
2 15 3 10 5 6
//output:
30
1 2 15 3 10 5 6 30
|
a66718500a4f08898a99cf640b1415ef960261ed | 7a3affb4d4f1674696c0a2a36b0849275bf894fb | SteveZhangSZ/CSE180_script | /Cellar/blast/2.8.1/include/ncbi-tools++/connect/services/srv_connections.hpp | C++ | hpp | 5,296 | no_license | #ifndef CONNECT_SERVICES__SERVER_CONN_HPP_1
#define CONNECT_SERVICES__SERVER_CONN_HPP_1
/* $Id: srv_connections.hpp 573297 2018-10-25 16:49:18Z ivanov $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center... |
62f8e573c3b3a1105b7854cecc28c2c39a435b04 | 5973d70da7ac526f59406dcfc69e768d947019ab | abdulmajid1994/chromium | /chrome/browser/ui/views/message_box_dialog.cc | C++ | cc | 12,980 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/simple_message_box.h"
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
#include "base/compiler_speci... |
51ddbdced672865508b020e5caa1722b12441e7e | 5d5c88e54dd55dd0b32d05c23aa4a943d30e11e9 | Zielon/PBRenderer | /src/rasterizer/shader_manager.cpp | C++ | cpp | 821 | permissive | #include "shader_manager.h"
#include <stdexcept>
rasterizer::ShaderManager::ShaderManager(){
shaders["FLAT"] = std::make_shared<Shader>(R"(flat\flat.vert)", R"(flat\flat.frag)", R"(flat\flat.geo)");
shaders["NORMALS"] = std::make_shared<Shader>(R"(flat\flat.vert)", R"(normals\normals.frag)", R"(flat\flat.geo)");
... |
007a8bae37283b2a50e5af75b486b375de6c0511 | cbdd28c4c3138c8bfcd48ff9331d8a90e21a98c0 | khaled-98/grid_localisation | /include/gridLocalisationNode.hpp | C++ | hpp | 1,553 | no_license | #ifndef SRC_GRID_LOCALISATION_INCLUDE_GRIDLOCALISATIONNODE
#define SRC_GRID_LOCALISATION_INCLUDE_GRIDLOCALISATIONNODE
#include "ros/ros.h"
#include "../include/motionModel.hpp"
#include "../include/measurementModel.hpp"
#include "../include/gridLocalisation.hpp"
#include "tf2_ros/buffer.h"
#include "tf2_ros/transform_... |
a1ebe5b9172bcb8e144e48b96293ed042cd8d86d | 6f2dd4e700b38d0a479d447a4b0a5c7ae835e5e0 | kocobi/cuda-api-wrappers | /src/cuda/api/memory.hpp | C++ | hpp | 21,784 | permissive | /**
* @file memory.hpp
*
* @brief freestanding wrapper functions for working with CUDA's various
* kinds of memory spaces, arranged into a relevant namespace hierarchy.
*/
#pragma once
#ifndef CUDA_API_WRAPPERS_MEMORY_HPP_
#define CUDA_API_WRAPPERS_MEMORY_HPP_
#include <cuda/api/error.hpp>
#include <cuda/api/cons... |
948829ebc3148ba05bf3a5026d095a9e5a45b619 | 7401f9ce6c9eeda1fbedee7d5fdbf3491544aa7e | isoundy000/LumixEngine | /src/renderer/model.cpp | C++ | cpp | 20,212 | permissive | #include "engine/lumix.h"
#include "renderer/model.h"
#include "engine/array.h"
#include "engine/crc32.h"
#include "engine/fs/file_system.h"
#include "engine/log.h"
#include "engine/lua_wrapper.h"
#include "engine/path_utils.h"
#include "engine/profiler.h"
#include "engine/resource_manager.h"
#include "engine/resource... |
04edbfda913ff05f6ced0b4ba3ba4770bddc7c64 | 3603f4700044f8185d3f86951b72a0bb672868a3 | yssource/build2 | /build2/cli/rule.hxx | C++ | hxx | 729 | permissive | // file : build2/cli/rule.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#ifndef BUILD2_CLI_RULE_HXX
#define BUILD2_CLI_RULE_HXX
#include <build2/types.hxx>
#include <build2/utility.hxx>
#include <build2/rule.hxx>
namespace build2
{
... |
cf88e16200751ad8c06d3dee2a628c3c81519eda | 8cc5d1f4c61ac7833ce7ad5953cfc374f0adc77a | siddhi-droid/tesseract | /src/textord/tabfind.cpp | C++ | cpp | 58,649 | permissive | ///////////////////////////////////////////////////////////////////////
// File: tabfind.cpp
// Description: Subclass of BBGrid to find vertically aligned blobs.
// Author: Ray Smith
// Created: Fri Mar 21 15:03:01 PST 2008
//
// (C) Copyright 2008, Google Inc.
// Licensed under the Apache License, Vers... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.