ttma1046 最近的时间轴更新
ttma1046's repos on GitHub
TypeScript · 23 人关注
asp.net-core-ngx-admin
asp.net-core-ngx-admin
TypeScript · 10 人关注
practical-rxjs-old
Practical Rxjs
Java · 3 人关注
Algorithms-CC
Algorithms
CSS · 2 人关注
candidate-matching
Candidate Matching
JavaScript · 2 人关注
hmr
Webpack Hot Module Replacement
TypeScript · 1 人关注
angular-form-cva
angular form - control value accessor
TypeScript · 1 人关注
angular-form-in-depth
Angular Form in Depth
TypeScript · 1 人关注
angular-karam-testing
angular-karam-testing
JavaScript · 1 人关注
angular-library-cli
A CLI tool for building Angular library
JavaScript · 1 人关注
angular-starter
Angular Starter
TypeScript · 1 人关注
angular-unit-test
angular-unit-test
JavaScript · 1 人关注
angularjs-directive
Angular Directives
1 人关注
awesome-frameworkless
A collection of awesome things regarding Frameworkless
TypeScript · 1 人关注
chenhotel
Chen Hotel
Batchfile · 1 人关注
dotfiles
dotfiles
TypeScript · 1 人关注
dotnet_ngx_admin
dotnet + ngx-admin
JavaScript · 1 人关注
functional-in-js
Python · 1 人关注
ghtopdep
CLI tool for sorting dependents repo by stars
TypeScript · 1 人关注
GithubAPIIntegration
Github API Integration
1 人关注
GithubMergeDemo
GithubMergeDemo
1 人关注
jest-preset-angular
Jest configuration preset for Angular projects.
JavaScript · 1 人关注
js-training
js-training
1 人关注
leetcode
LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)
HTML · 1 人关注
master-detail
master-detail
TypeScript · 1 人关注
ng-profiler
Angular Profiler for Ivy, debugging and visualization tools
TypeScript · 1 人关注
ngrx-store-effects-app
ngrx-store-effects-app
TypeScript · 1 人关注
ngxs-app
Ngxs
JavaScript · 1 人关注
node-mssql
node-mssql
JavaScript · 1 人关注
noname
1 人关注
nx
Extensible Dev Tools for Monorepos
TypeScript · 1 人关注
nx-demo
nx-demo
TypeScript · 1 人关注
practical-rxjs
Practical Rxjs Examples
TypeScript · 0 人关注
ac-forms
C# · 0 人关注
algo-practice
Algorithms Practice
JavaScript · 0 人关注
AlgoCasts
C# · 0 人关注
Algorithms
ttma1046/Algorithms
Java · 0 人关注
algs4
algs4
TypeScript · 0 人关注
angular
Deliver web apps with confidence 🚀
0 人关注
Angular-2-Resources
Angular 2 Resources
TypeScript · 0 人关注
Angular-Demo
Demo site done in 90 minutes
TypeScript · 0 人关注
angular-di
Angular Dependency Injection
TypeScript · 0 人关注
angular-hero-ssr
Angular Hero Sample with Angular Universal (SSR)
JavaScript · 0 人关注
angular-ivy-demo
Demo repository showing how ivy allows significant API simplification.
JavaScript · 0 人关注
angular-presentation
Sample code and slides for my angular presentation.
TypeScript · 0 人关注
angular-pro-course-1
angular-tutorial-advanced
TypeScript · 0 人关注
angular-pro-course-2
UltimateAngular Angular Pro Course
TypeScript · 0 人关注
angular-pro-course-3
angular-pro-course
TypeScript · 0 人关注
angular-seed
Modular starter project for Angular 2 (and beyond) with statically typed build and AoT compilation
TypeScript · 0 人关注
angular-shopping-cart
TypeScript · 0 人关注
angular-tour-of-heroes
Angular.io Tutorial
JavaScript · 0 人关注
angular2-quickstart
Angular.io Basics
TypeScript · 0 人关注
angular2-test
Little Angular 2 test demo based on Angular.io Testing.
TypeScript · 0 人关注
angular2-tour-of-heroes
angular2-tour-of-heroes V2
TypeScript · 0 人关注
angular2-tour-of-heros
Angular 2 Tour of Heroes
0 人关注
AngularJSHelloWorldFromJohnLindquist
AngularJSHelloWorldFromJohnLindquist
TypeScript · 0 人关注
aot-sample
AOT Sample
TypeScript · 0 人关注
asp.net-core-ng-bootstrap
asp.net-core-ng-bootstrap
Java · 0 人关注
basic-java
Basic Java
TypeScript · 0 人关注
book-collection
book-collection
C# · 0 人关注
BookService
BookService
Python · 0 人关注
cassandra_snapshotter
A tool to backup cassandra nodes using snapshots and incremental backups on S3
TypeScript · 0 人关注
ci-example
Travis CI Project
TypeScript · 0 人关注
coachmarks
Angular Coach Marks Demo
C# · 0 人关注
ContosoSite
ContosoSite
C# · 0 人关注
ContosoUniversity
ContosoUniversity
0 人关注
ContosoUniversityData
ContosoUniversityData
C# · 0 人关注
CorsDemo
CorsDemo
TypeScript · 0 人关注
custom-rxjs-operators
Custom Rxjs Operators
JavaScript · 0 人关注
egghead
Egghead
JavaScript · 0 人关注
egghead.io
Tutorials from egghead.io
Java · 0 人关注
everything-app
Everything App based on Angular
TypeScript · 0 人关注
firestore-apollo-graphql
firestore-apollo-graphql
C# · 0 人关注
generics_csharp
Generics C#
HTML · 0 人关注
gh-issues
Polycast 26 - iron-ajax
0 人关注
git
C# · 0 人关注
GossipDesignPattern
Notes for book "Gossip of Design Patterns"
0 人关注
hashbrown
Hashbrown is a framework for building generative user interfaces in Angular and React
TypeScript · 0 人关注
http-demo
http demo
TypeScript · 0 人关注
HttpModule
HttpModule
C# · 0 人关注
IdentityServer
Identity Server
JavaScript · 0 人关注
jsfp-course
C# · 0 人关注
Just-Eat
Just Eat
TypeScript · 0 人关注
LazyDemo
Angular 2 lazy loading demo.
JavaScript · 0 人关注
microcafe
Sample code to show microservices using NET, in the context of a cafe
TypeScript · 0 人关注
migrating-angularjs-features-to-angular
Angular 2 code samples for common feature implementation.
JavaScript · 0 人关注
mosh_node
Mosh's Node.js Course.
C# · 0 人关注
MvcMovie
MvcMovie
TypeScript · 0 人关注
my-dream-app
TypeScript · 0 人关注
nextjs-dashboard
nextjs-dashboard
TypeScript · 0 人关注
ng-BehaviorSubject-DumbComponent
A Live Search Demo with Reactive Form, Dumb Component and BehaviorSubject
HTML · 0 人关注
ng-dashboard
Angular admin dashboard framework
TypeScript · 0 人关注
ng-hold-to-delete
Angular "Hold to Delete" Directive
TypeScript · 0 人关注
ng-testing-examples
Angular testing guide - examples
TypeScript · 0 人关注
ngx-shopping-cart
Angular Shopping Cart
JavaScript · 0 人关注
node-demo
Simple beginner demo for meetup
HTML · 0 人关注
polymer-starter-kit
A starting point for Polymer 1.0 apps
HTML · 0 人关注
primeng
UI Components for Angular 2
TypeScript · 0 人关注
reactive-forms
Reactive Forms
TypeScript · 0 人关注
routing-demo
Angular Routing Demo
JavaScript · 0 人关注
rxjs-practial
Rxjs Practial
ttma1046

ttma1046

V2EX 第 126872 号会员,加入于 2015-07-13 09:17:43 +08:00
求帮忙做到题!谢谢谢谢!
程序员  •  ttma1046  •  2016-02-11 16:08:43 PM  •  最后回复来自 sengxian
14
求删
Chamber  •  ttma1046  •  2015-11-07 06:24:29 AM  •  最后回复来自 ynyounuo
1
ttma1046 最近回复了
页面最底下有个下拉框可以选国家的
Feedly + pocket
2016-03-07 13:02:03 +08:00
回复了 hoythan 创建的主题 Linux 救命,我可能要被老板砍死了。
@yeyeye thumbs up!
2016-03-05 10:20:51 +08:00
回复了 xdlailai 创建的主题 程序员 百度前端技术学院求认真的队友组队
求组队, qq 66730717
string 加任何玩儿,都是把任何玩儿先变成 string, 再做 concat.
百撕不得骑姐楼主怎么略懂 JS 的 ?
ecmascript 的官方文档
2016-02-07 06:09:58 +08:00
回复了 ttma1046 创建的主题 程序员 求帮忙做到题!谢谢谢谢!
```csharp
public int solution(int[] selectiveDates)
{
int [] minCost = new int[31];

for (int date = 0; date < 31; date++)
{
int oneDayAgo = 0;
if (date - 1 > 0)
oneDayAgo = date - 1;


if (selectiveDates.Contains(date))
{
int sevenDaysAgo = 0;
if (date - 7 > 0)
sevenDaysAgo = date - 7;

int thirtyDaysAgo = 0;
if (date - 30 > 0)
thirtyDaysAgo = date - 30;

minCost[date] = Math.Min(minCost[sevenDaysAgo] + 7, minCost[thirtyDaysAgo] + 25);
minCost[date] = Math.Min(minCost[date], minCost[oneDayAgo] + 2);
}
else
{
minCost[date] = minCost[oneDayAgo];
}
}

return minCost[30];
}
```
2016-02-07 06:09:31 +08:00
回复了 ttma1046 创建的主题 程序员 求帮忙做到题!谢谢谢谢!
@yuriko @3pointer
写的很垃圾,求拍砖

public int solution(int[] selectiveDates)
{
int [] minCost = new int[31];

for (int date = 0; date < 31; date++)
{
int oneDayAgo = 0;
if (date - 1 > 0)
oneDayAgo = date - 1;


if (selectiveDates.Contains(date))
{
int sevenDaysAgo = 0;
if (date - 7 > 0)
sevenDaysAgo = date - 7;

int thirtyDaysAgo = 0;
if (date - 30 > 0)
thirtyDaysAgo = date - 30;

minCost[date] = Math.Min(minCost[sevenDaysAgo] + 7, minCost[thirtyDaysAgo] + 25);
minCost[date] = Math.Min(minCost[date], minCost[oneDayAgo] + 2);
}
else
{
minCost[date] = minCost[oneDayAgo];
}
}

return minCost[30];
}
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2485 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms · UTC 04:00 · PVG 12:00 · LAX 20:00 · JFK 23:00
♥ Do have faith in what you're doing.