paste bin
Author
Language
C++
Plain text
Accesslog
Action script
Ada
Apache
Arduino
Armasm
Autohotkey
Awk
Bash
Basic
Brainfuck
C
Clojure
Cmake
C#
css
D
Delphi
Dockerfile
Erlang
Fortran
F#
Gauss
Go
Gradle
Graphql
Groovy
Haskell
Ini
Java
JavaScript
json
Julia
Kotlin
Lasso
LaTeX
Leaf
lisp
llvm
Lua
Makefile
Markdown
Mathematica
Matlab
Nginx
Objective-C
Ocaml
Oxygene
Perl
PgSQL
php
Powershell
Processing
Profile
Properties
Puppet
Purebasic
Python
Q
QML
R
Ruby
Rust
Scala
Scheme
Scilab
Shell
Smalltalk
SQL
Swift
Typescript
VB.NET
VB Script
Verilog
Vim
Wasm
x86asm
Xml
Xquery
Yaml
source code:
#include <cstdio> #include <cstring> void attack(char *s1,char *s2); void getNum(char *s); int main(void) { char s1[12],s2[12]; scanf("%s%s",s1,s2); attack(s1,s2); getNum(s1); getNum(s2); return 0; } void attack(char *s1,char *s2) { int i1=strlen(s1)-1,i2=strlen(s2)-1; while(i1>=0 && i2>=0) { if(s1[i1]<s2[i2]) s1[i1]=','; else if(s2[i2] < s1[i1]) s2[i2]=','; i1--; i2--; } return ; } void getNum(char *s) { bool isNum=false; int i,num=0,len=strlen(s); for(i=0;i<len;i++) { if('0'<=s[i] && s[i]<='9') { isNum=true; num=num*10+s[i]-'0'; } } if(isNum) printf("%d\n",num); else printf("YODA\n"); return ; }
comment: